Skip to content

An implementation of the minimum description length principal expert binning algorithm by Usama Fayyad

Notifications You must be signed in to change notification settings

achidlow/mdlp-discretization

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimum Description Length Binning

This is an implementation of Usama Fayyad's entropy based expert binning method.

Please read the original paper here for more information.

Installation and Usage

You'll need to install Cython and numpy first, if you haven't already.

This project is not yet on PyPI, but you can install the lastest master through pip like so:

$ pip install https://github.com/hlin117/mdlp-discretization/archive/master.zip

Here's a quick usage example:

>>> from discretization import MDLP
>>> from sklearn.datasets import load_iris
>>> iris = load_iris()
>>> X = iris.data
>>> y = iris.target
>>> mdlp = MDLP()
>>> X_discrete = mdlp.fit_transform(X, y)

Afterwards, X_discrete will have the same shape as X but will be integer valued.

Tests

To run the unit tests, make sure you have nose installed. Afterwards,

$ make test

should do the trick.

About

An implementation of the minimum description length principal expert binning algorithm by Usama Fayyad

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Makefile 0.5%