Giter VIP home page Giter VIP logo

megamix's Introduction

Documentation Status Build Status on Travis version available on PyPI

MeGaMix

The MeGaMix python package provides several clustering models like k-Means and other Gaussian Mixture Models.

Installation

The package depends on numpy, scipy, h5py, joblib and cython (automatically installed by the setup script). Install it with:

$ python setup.py install

Or you can install it with pip:

$ pip install megamix

Documentation

See the complete documentation online

Test

The package comes with a unit-tests suit. To run it, first install pytest on your Python environment:

$ pip install pytest

Then run the tests with:

$ pytest

megamix's People

Contributors

14thibea avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

marvinlvn

megamix's Issues

invalid value encountered

Not sure why but when i'm testing this into toy data, it returns warning message an nan value for score function?

import numpy as np
import pandas as pd
from megamix.batch import DPVariationalGaussianMixture
train=np.random.randn(10000, 100)
gmm = DPVariationalGaussianMixture(20,init='VBGMM',n_jobs=4)
gmm.fit(train)
t=gmm.predict_log_resp(train)
score=gmm.score(train)

Fitting process returning Runtime Warning:

/home/lemma/anaconda2/lib/python2.7/site-packages/megamix-0.3.2-py2.7.egg/megamix/batch/base.py:161: RuntimeWarning: invalid value encountered in double_scalars
return gammaln(np.sum(alpha)) - np.sum(gammaln(alpha))
('Number of iterations :', 101)
/home/lemma/anaconda2/lib/python2.7/site-packages/megamix-0.3.2-py2.7.egg/megamix/batch/DPGMM.py:409: RuntimeWarning: invalid value encountered in double_scalars
result += np.sum(betaln(self.alpha.T[0],self.alpha.T[1]))

Score function returning nan:

score=gmm.score(train)
/home/lemma/anaconda2/lib/python2.7/site-packages/megamix-0.3.2-py2.7.egg/megamix/batch/DPGMM.py:482: RuntimeWarning: invalid value encountered in double_scalars
lower_bound[i] += (np.sum(N[i+1::]) + self.alpha_0 - self.alpha[i,1]) * (psi(self.alpha[i,1]) - psi(np.sum(self.alpha[i])))

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.