snakescott / mdlp-discretization

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Tests

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

$ make test

should do the trick.

Installation and Usage

This code was built using Cython, so you have to run the makefile in the directory.

$ make

Afterwards, assuming that discretization.py and _mdlp.so are in the same directory, you can import the MDLP class.

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

I recommend creating a virtual environment for this project.

About

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

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 99.5%Language:Makefile 0.5%