Skip to main content

Coniferous forests for better machine learning

Project description

ascl:2507.009 PyPI version Documentation Status Test Workflow Build and publish wheels pre-commit.ci status

Package for active anomaly detection with isolation forests, made by SNAD collaboration.

It includes:

  • IsolationForest - reimplementation of scikit-learn's isolation forest with much better scoring performance due to the use of Rust programming language and multi-threading.
  • AADForest - reimplementation of Active Anomaly detection algorithm with isolation forests from Shubhomoy Das' ad_examples package with better performance, much less code and more flexible dependencies.
  • PineForest - our own active learning model based on the idea of tree filtering.

Install the package with pip install coniferest.

See the documentation for the Tutorial.

asciicast

Installation

pip install coniferest

Binary wheels are available for Linux, macOS and Windows, so you can install the package from PyPI on these platforms with no build-time dependencies.

If your specific platform is not supported, or you need a development version, you can install the package from the source. To do so, clone the repository and run pip install . in the root directory.

Development

You can install the package in editable mode with pip install -e .[dev] to install the development dependencies.

Linters and formatters

This project makes use of pre-commit hooks, you can install them with pre-commit install. Pre-commit CI is used for continuous integration of the hooks, they are applied to every pull request, and CI is responsible for auto-updating the hooks.

Testing and benchmarking

We use tox to build and test the package in isolated environments with different Python versions. To run tests locally, install tox with pip install tox and run tox in the root directory. We configure tox to skip long tests.

The project uses pytest as a testing framework. Tests are located in the tests directory, and can be run with pytest tests in the root directory. By default, all tests are run, but you can select specific tests with -k option, e.g. pytest tests -k test_onnx.test_onnx_aadforest. You can also deselect a specific group of tests with -m option, e.g. pytest tests -m'not long', see pyproject.toml for the list of markers.

We use pytest-benchmark for benchmarking. You can run benchmarks with pytest tests --benchmark-enable -m benchmark in the root directory. Most of the benchmarks have n_jobs fixture set to 1 by default, you can change it with --n_jobs option. You can adjust the minimum number of iterations with --benchmark-min-rounds and maximum execution time per benchmark with --benchmark-max-time (note that the latter can be exceeded if the minimum number of rounds is not reached). See pyproject.toml for the default benchmarking options. You can make a snapshot the current benchmark result with --benchmark-save=NAME or with --benchmark-autosave, and compare benchmarks with pytest-benchmark compare command.

We also run these benchmarks with GitHub Actions using codspeed.

Citation

If you found this project useful for your research, please cite Kornilov, Korolev, Malanchev, et al., 2025

@article{Kornilov2025,
	title = {Coniferest: A complete active anomaly detection framework},
	journal = {Astronomy and Computing},
	volume = {52},
	pages = {100960},
	year = {2025},
	issn = {2213-1337},
	doi = {10.1016/j.ascom.2025.100960},
	url = {https://www.sciencedirect.com/science/article/pii/S2213133725000332},
	author = {M.V. Kornilov and V.S. Korolev and K.L. Malanchev and A.D. Lavrukhina and E. Russeil and T.A. Semenikhin and E. Gangler and E.E.O. Ishida and M.V. Pruzhinskaya and A.A. Volnova and S. Sreejith},
}

Additionally, you may also cite the ASCL record for the package

@software{2025ascl.soft07009K,
       author = {{Korolev}, Vladimir and {Kornolov}, Matwey and {Malanchev}, Konstantin and {SNAD Team}},
        title = "{Coniferest: Python package for active anomaly detection}",
 howpublished = {Astrophysics Source Code Library, record ascl:2507.009},
         year = 2025,
        month = jul,
          eid = {ascl:2507.009},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2025ascl.soft07009K},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coniferest-0.1.3.tar.gz (32.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

coniferest-0.1.3-cp310-abi3-win_amd64.whl (236.4 kB view details)

Uploaded CPython 3.10+Windows x86-64

coniferest-0.1.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (335.5 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

coniferest-0.1.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (320.7 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

coniferest-0.1.3-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (623.0 kB view details)

Uploaded CPython 3.10+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file coniferest-0.1.3.tar.gz.

File metadata

  • Download URL: coniferest-0.1.3.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coniferest-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7460119b0628d2c45de69719355be8d48cb10bc22d2312ca39d11fb6a6d33b10
MD5 8ca91e256285720ac09ddbb6ea13008e
BLAKE2b-256 681c2483952569125cf1988d400b2ad05c19d7e84d90ecd1b86b2b784c41e69b

See more details on using hashes here.

File details

Details for the file coniferest-0.1.3-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: coniferest-0.1.3-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 236.4 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coniferest-0.1.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 dd46f7b9060d1250ef3f24c1dd94fc81bd664161cce693676924e1177fa2616a
MD5 824e0a8fef2ce50d8a94c41eddfd0ec7
BLAKE2b-256 e67697ec056b865a79a80150b1968c62168c77f5591265325c9170303797eb02

See more details on using hashes here.

File details

Details for the file coniferest-0.1.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coniferest-0.1.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f7ebaf399de03ef322ef49bc3f1c5c4ba37fe0a286c43508f7254740a332e88a
MD5 433ad7fd25bbe307962c47771aae5f0d
BLAKE2b-256 796b3db9d2d203121873576cbaacbe87f95adb2b03f91636ca1a07043e9a30ba

See more details on using hashes here.

File details

Details for the file coniferest-0.1.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for coniferest-0.1.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 005c8d831ed16b39aff40f11918142a8e43431bbe689bc14a3141086ef0d7f04
MD5 917060ac6dafa24f1750896769b41c3c
BLAKE2b-256 8826a3260b7e783d7e747520f4031783478cbe9c0a6a187efd05fd6b2fc87869

See more details on using hashes here.

File details

Details for the file coniferest-0.1.3-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for coniferest-0.1.3-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 b09fd7f4ad7af516faad74cc894d22cc7beaec15e3eab2e0c40ef429ad172e45
MD5 3ac3b866c05e54a4933fbd82164290b5
BLAKE2b-256 20cae2af6f48c811bb6993720d78ba45f83cd0ac920a3b7f5efd1e5a61dad198

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page