Comments (2)
Hi Jieyu,
I reproduced your problem. The root cause is in the first line of the traceback: it tells us that there's zero probability for some sample. This should be prevented by only evaluating the probability of each sample over the neighborhood H
. In your case (the default configuration), this neighborhood comprises all samples, including some that may have very low probability under any of the GMM components. So, you've got a numerical underflow. I suspect that this happens because some components shrink very strongly.
Use the argument cutoff=5
in fit
, which limits the evaluation to 5-sigma neighborhoods of each component (where each sigma refers to the covariance of the component). That prevents the underflow by ignoring samples that are too far away for any component and speeds up the process considerably. I just ran the full simu
with K=10
in 5 seconds.
Another option is increasing the minimum component covariance w
to something larger. 1e-6
doesn't help for the range your data cover.
from pygmmis.
Thanks for helping me out and for a quick reply!! Now it works fine for my model.
from pygmmis.
Related Issues (18)
- fix component HOT 13
- Arbitrary termination conceals unstable EM steps? HOT 1
- Early termination with truncated samples 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
- Code is unlicensed HOT 1
- Symmetric Gaussian? HOT 1
- Troubled by 1 instance of np.flatnonzero HOT 3
- 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
- Cutoff: explanation/documentation HOT 6
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.