Comments (6)
The cutoff
argument is meant to allow for speed-ups in cases of many components. It is unlikely that you will need all components for every sample, so setting e.g. cutoff=3
doesn't even attempt to fit samples outside of the 3-sigma region of a component. This works very well for data that are spread out a lot, and it also helps break degeneracies for many strongly overlapping components.
I realize that I should document this parameter better, you're not the first person to ask.
from pygmmis.
Ah ok that makes sense, cutoff=None
raises errors though, so I guess for now it's easier to just set cutoff=inf
for my purposes.
from pygmmis.
There shouldn't be errors with cutoff=None
. Can you post the error and the traceback, please.
from pygmmis.
Its an attribute error, trying to copy a None
ITER SAMPLES LOG_L STABLE
0 5000 -2.383 3
Traceback (most recent call last):
File "/local/home/sread/Apps/anaconda/envs/pymc3-uptodate/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2963, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-2-f61dddb7d343>", line 4, in <module>
runfile('/local/home/sread/Dropbox/pygmmis/models.py', wdir='/local/home/sread/Dropbox/pygmmis')
File "/local/home/sread/Apps/jetbrains-toolbox-1.4.2492/install_location/apps/PyCharm-P/ch-0/182.4129.5/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "/local/home/sread/Apps/jetbrains-toolbox-1.4.2492/install_location/apps/PyCharm-P/ch-0/182.4129.5/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/local/home/sread/Dropbox/pygmmis/models.py", line 122, in <module>
split_n_merge=gmm.K * (gmm.K - 1) * (gmm.K - 2) / 2)
File "/local/home/sread/Dropbox/pygmmis/pygmmis.py", line 689, in fit
U_ = [U[k].copy() for k in xrange(gmm.K)]
File "/local/home/sread/Dropbox/pygmmis/pygmmis.py", line 689, in <listcomp>
U_ = [U[k].copy() for k in xrange(gmm.K)]
AttributeError: 'NoneType' object has no attribute 'copy'
from pygmmis.
Can you post the call of pygmmis.fit
as well please.
from pygmmis.
Sure. It is here:
logL, U = pygmmis.fit(gmm, data, init_method='kmeans', w=0.01, cutoff=None, tol=1e-6, rng=rng, maxiter=1)
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
- 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
- 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.