Installation Dependenciesimbalanced-learn is tested to work under Python 2.7 and Python 3.6, and 3.7. The dependency requirements are based on the last scikit-learn release:
- scipy(>=0.13.3)
- numpy(>=1.8.2)
- scikit-learn(>=0.20)
- keras 2 (optional)
- tensorflow (optional)
Additionally, to run the examples, you need matplotlib(>=2.0.0) and pandas(>=0.22).
imbalanced-learn 0.4 is the last version to support Python 2.7
Installationimbalanced-learn is currently available on the PyPi’s repository and you can install it via pip:
pip install -U imbalanced-learnThe package is release also in Anaconda Cloud platform:
conda install -c conda-forge imbalanced-learnIf you prefer, you can clone it and run the setup.py file. Use the following commands to get a copy from GitHub and install all dependencies:
git clone https://github.com/scikit-learn-contrib/imbalanced-learn.gitcd imbalanced-learnpip install .
Or install using pip and GitHub:
pip install -U git+https://github.com/scikit-learn-contrib/imbalanced-learn.git
Testing
After installation, you can use pytest to run the test suite:
make coverage