Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tpeterw/probabilistic-majority-voting

Generic Majority Voting procedure for probabilities of categories in ML classification algorithms (Available on PyPI)
https://github.com/tpeterw/probabilistic-majority-voting

machine-learning majority-judgement-voting pypi python python3

Last synced: about 1 month ago
JSON representation

Generic Majority Voting procedure for probabilities of categories in ML classification algorithms (Available on PyPI)

Awesome Lists containing this project

README

        

# Probabilistic Majority Voting
Generic Majority Judgement Voting procedure for probabilities of categories in machine learning


## Usage
To install through PyPI in command line

pip install majorityvoting

And to use majority judgement voting in your code

from majorityvoting import MajorityVoting

voter = MajorityVoting.Voter(probabilities, categories)
indices, names = voter.vote(windows=5)

The initializer takes in 2 arguments
* probabilities - a `numpy.ndarray` of lists (2d array) with equal length, each embedded list contains the probability of categories predicted by some machine learning algorithm, exactly the same you will get from [scikit-learn](http://scikit-learn.org/stable/)'s [`predict_proba()`](http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html#sklearn.linear_model.LogisticRegression.predict_proba) function
* categories - a list of names of categories, each category must match the index of it's probability in each and every embedded list in `probabilities`

## TODOs
1. It's a pain to manually check the size of the lists and embedded ones, will require input argument to be `pandas.DataFrame` type in the next version