/expectation-maximization

An implementation of the expectation maximization algorithm

Primary LanguagePythonMIT LicenseMIT

Expectation Maximization

This is an implementation of the expectation maximization.

Usage

Compilation/Install

git clone https://github.com/ali92hm/expectation-maximization

Execution

The library code is under the algorithm folder. But to see how to use the algorithm you can look at the demo.py script.

python demo.py sample_input/input.csv

Input Data

The input data consists of a CSV file in the following order:

input_data_value, expectation_of_category_1 , expectation_of_category_2 , ..., expectation_of_category_n

Dependencies

Structure

expectation-maximization
├── LICENSE
├── demo.py                     - Demo of the algorithm in use
├── sample_input
│   └── input.csv               - Sample input file
└── algorithm                   - Algorithm implementation
    └── EM.py                   - Expectation Maximization algorithm

License

MIT license