Install and Quickstart#

User Installation#

pip install cyclic-boosting


from cyclic_boosting.pipelines import pipeline_CBPoissonRegressor
CB_est = pipeline_CBPoissonRegressor(), y)
yhat = CB_est.predict(X_test)

Development and Tests#

For developing, please run poetry install. This installs all package and development dependencies. Run poetry install --with docs to install the dependencies to build the docs. Installing with --with jupyter adds a jupyter lab to the virtual environment.

Don’t forget to either activate the env with poetry shell or prepend your commands (e.g., poetry run black .) The command poetry env info provides you with information about the environment including the path to the python interpreter which might be required to set up your IDE.


git clone
cd cyclic-boosting
poetry install --with jupyter,docs
# either
poetry run pytest tests
# or
poetry shell
pytest tests

Linting and Formatting#

We use black for file formatting and ruff for linting. Both tools execute really fast. Every time a commit is pushed to the repository, all files are checked with these tools. It is therefore recommend that you check all files beforehand. A configuration for pre-commit is included in this repository. To activate automatic checking each time you commit, please add a commit hook to your local git repository:

poetry run pre-commit install

You cannot commit then if not all files comply (but you can circumvent this limitation by using the --no-verify or -n switch when committing).

Alternatively, you can run the following each time before pushing:

poetry run pre-commit run --all-files