Git Product home page Git Product logo

Comments (6)

pmelchior avatar pmelchior commented on July 30, 2024

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.

philastrophist avatar philastrophist commented on July 30, 2024

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.

pmelchior avatar pmelchior commented on July 30, 2024

There shouldn't be errors with cutoff=None. Can you post the error and the traceback, please.

from pygmmis.

philastrophist avatar philastrophist commented on July 30, 2024

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.

pmelchior avatar pmelchior commented on July 30, 2024

Can you post the call of pygmmis.fit as well please.

from pygmmis.

philastrophist avatar philastrophist commented on July 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.