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.4.tar.gz (34.7 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.4-cp310-abi3-win_amd64.whl (240.0 kB view details)

Uploaded CPython 3.10+Windows x86-64

coniferest-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (337.7 kB view details)

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

coniferest-0.1.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (323.4 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

coniferest-0.1.4-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (615.1 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.4.tar.gz.

File metadata

  • Download URL: coniferest-0.1.4.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for coniferest-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d31a57d230ab9fa0d973767fbc3355f5726442a2d857733c66535d42509e3a27
MD5 6fdd95519c6f4c4be482e927c152d2fd
BLAKE2b-256 5f3f476b81c58df3af99d25d5934704740ed99f6d0d4041413ae42eeae31b83c

See more details on using hashes here.

Provenance

The following attestation bundles were made for coniferest-0.1.4.tar.gz:

Publisher: wheels.yml on snad-space/coniferest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

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

File hashes

Hashes for coniferest-0.1.4-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0d8e133964c023b90851760c0d187241415d114c9490a81f520db1252651a4b2
MD5 c02879fd4ec597f2de0f8604643d5fda
BLAKE2b-256 ca2e3ce7066781d1e0452f7991e00f1ef7eb3fa0c50354bc518a763aa885b781

See more details on using hashes here.

Provenance

The following attestation bundles were made for coniferest-0.1.4-cp310-abi3-win_amd64.whl:

Publisher: wheels.yml on snad-space/coniferest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for coniferest-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ca942c27b51126d7da6af6798de3a84b01d1d42dfde366e5ee6fa982355c7628
MD5 7b0d61da6777834652b8b38ceada0324
BLAKE2b-256 3d0ee6a7dc042a57c810b890edc1c4d0c3b4f8303580072f2f1c3903320f5687

See more details on using hashes here.

Provenance

The following attestation bundles were made for coniferest-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on snad-space/coniferest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for coniferest-0.1.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d7891789f29b9fcf6eed434845840684b6f6c197059cb2dda98c5f16b1bdd354
MD5 a04bf8cc81668c082926cf14406a785a
BLAKE2b-256 2f1e720c5a7f2b9c32a8ce4c33492f5f0fb71f438c454bfed0a06b5e9dbff39b

See more details on using hashes here.

Provenance

The following attestation bundles were made for coniferest-0.1.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on snad-space/coniferest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coniferest-0.1.4-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.4-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 e526335ecad96c6f0db52292f0c014792ff3ac962f44941331c2a97be1d57e29
MD5 6eb1011597915e941e583da47fef8b86
BLAKE2b-256 2f6f5d49fe91e53b5c55633a70602f4a53b87fe49887beb078b20775dd40252c

See more details on using hashes here.

Provenance

The following attestation bundles were made for coniferest-0.1.4-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: wheels.yml on snad-space/coniferest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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