Comments (1)
OK, apologies that it took a while to get back to this issue. Life...
Thanks for your clear report, I can confirm it. However, PR #12 is only a workaround, not the actual solution. So let me address the problem here.
The problem, as you have determined yourself, is not in the EM equations themselves, otherwise the solution wouldn't have converged to something meaningful, but in the reported likelihood, which is used for convergence testing.
In a completely observed GMM, the likelihood of a sample x is
p(x | GMM) = 1 / Z sum_k alpha_k p_k(x)
with Z = int dx sum_k alpha_k p_k(x). Since the p_k or normalized and the alphas sum to 1, this normalization constant is dropped. But for incomplete samples, we cannot do that. The process that led the the observed samples is
p (x | GMM, Omega) = 1 / Z' Omega(x) sum_k alpha_k p_k(x)
with Z' = int dx Omega sum_k alpha_k p_k(x). As Omega is <= 1, this normalization term boosts the value of logL. Z' tells us the fraction of the probability mass that is observed. It can be very efficiently computed with Monte Carlo integration. My last commit 0e33ac6 does exactly that. With it the drop in logL doesn't arise and #12 is not necessary.
from pygmmis.
Related Issues (18)
- fix component HOT 13
- Code is unlicensed HOT 1
- Handling Missing Data HOT 7
- Background amplitude fitting as part of normal EM, not hierarchical HOT 1
- numpy.linalg.linalg.LinAlgError: Singular matrix HOT 2
- [Errno 12] Cannot allocate memory HOT 6
- Divide by zero warning? HOT 2
- Cutoff: explanation/documentation HOT 6
- Arbitrary termination conceals unstable EM steps? HOT 1
- README for pypi HOT 1
- Test script: ModuleNotFoundError: No module named 'parmap' HOT 2
- Can't install via pip: multiprocessing is already present in Python 3 HOT 1
- Empty "U" / responsibilities from "fit" HOT 3
- High memory usage HOT 8
- Fitting two simple Gaussians HOT 12
- Symmetric Gaussian? HOT 1
- Troubled by 1 instance of np.flatnonzero HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygmmis.