Getting Started — Version 0.11.0.dev0

# Getting Started

## Prerequisites

You can find the complete list of the dependencies in the following table:

Dependency | Minimum Version | Purpose
--- | --- | ---
numpy | 1.17.3 | build, install
scipy | 1.5.0 | build, install
joblib | 1.1.1 | install
threadpoolctl | 2.0.0 | install
cython | 0.29.33 | build
matplotlib | 3.1.3 | benchmark, docs, examples, tests
scikit-image | 0.16.2 | docs, examples, tests
pandas | 1.0.5 | benchmark, docs, examples, tests
seaborn | 0.9.0 | docs, examples
memory_profiler | 0.57.0 | benchmark, docs
pytest | 7.1.2 | tests
pytest-cov | 2.9.0 | tests
ruff | 0.0.272 | tests
black | 23.3.0 | tests
mypy | 1.3 | tests
pyamg | 4.0.0 | tests
sphinx | 6.0.0 | docs
sphinx-copybutton | 0.5.2 | docs
sphinx-gallery | 0.10.1 | docs
numpydoc | 1.2.0 | docs, tests
Pillow | 7.1.2 | docs
pooch | 1.6.0 | docs, examples, tests
sphinx-prompt | 1.3.0 | docs
sphinxext-opengraph | 0.4.2 | docs
plotly | 5.14.0 | docs, examples
conda-lock | 2.0.0 | maintenance

## Install

### From PyPi or conda-forge repositories

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

    pip install -U imbalanced-learn

The package is released also on the Anaconda Cloud platform:

    conda install -c conda-forge imbalanced-learn

### From source available on GitHub

If 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.git
    cd imbalanced-learn
    pip install .

Be aware that you can install in developer mode with:

    pip install --no-build-isolation --editable .

If you wish to make pull-requests on GitHub, we advise you to install pre-commit:

    pip install pre-commit
    pre-commit install

## 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

## Contribute

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.

previous

imbalanced-learn documentation

next

User Guide