Install and contribution


The imbalanced-learn package requires the following dependencies:

  • numpy (>=1.11)
  • scipy (>=0.17)
  • scikit-learn (>=0.21)
  • keras 2 (optional)
  • tensorflow (optional)


imbalanced-learn is currently available on the PyPi’s reporitories and you can install it via pip:

pip install -U imbalanced-learn

The package is release also in Anaconda Cloud platform:

conda install -c conda-forge imbalanced-learn

If you prefer, you can clone it and run the file. Use the following commands to get a copy from Github and install all dependencies:

git clone
cd imbalanced-learn
pip install .

Or install using pip and GitHub:

pip install -U git+

Test and coverage

You want to test the code before to install:

$ make test

You wish to test the coverage of your version:

$ make coverage

You can also use pytest:

$ pytest imblearn -v


You can contribute to this code through Pull Request on GitHub. Please, make sure that your code is coming with unit tests to ensure full coverage and continuous integration in the API.