Skip to main content

Coniferous forests for better machine learning

Project description

coniferest

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 Cython and multi-threading (the latter is not currently available on macOS).
  • 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.

Installation

The project is using Cython for performance and requires compilation. However, binary wheels are available for Linux, macOS and Windows, so you can install the package with pip install coniferest on these platforms with no build-time dependencies. Currently multithreading is not available in macOS ARM wheels, but you can install the package from the source to enable it, see instructions below.

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.

Note, that we are using OpenMP for multi-threading, which is not available on macOS with the Apple LLVM Clang compiler. You still can install the package with Apple LLVM, but it will be single-threaded. Alternatively, you can install the package with Clang from Homebrew (brew install llvm libomp) or GCC (brew install gcc), which will enable multi-threading. In this case you will need to set environment variables CC=gcc-12 (or whatever version you have installed) or CC=$(brew --preifx llvm)/bin/clang and CONIFEREST_FORCE_OPENMP_ON_MACOS=1.

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

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.0.13.tar.gz (9.0 MB view details)

Uploaded Source

Built Distributions

coniferest-0.0.13-cp311-cp311-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.11 Windows x86-64

coniferest-0.0.13-cp311-cp311-win32.whl (9.1 MB view details)

Uploaded CPython 3.11 Windows x86

coniferest-0.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

coniferest-0.0.13-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

coniferest-0.0.13-cp311-cp311-macosx_11_0_arm64.whl (9.2 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

coniferest-0.0.13-cp311-cp311-macosx_10_9_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

coniferest-0.0.13-cp310-cp310-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.10 Windows x86-64

coniferest-0.0.13-cp310-cp310-win32.whl (9.1 MB view details)

Uploaded CPython 3.10 Windows x86

coniferest-0.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

coniferest-0.0.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

coniferest-0.0.13-cp310-cp310-macosx_11_0_arm64.whl (9.2 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

coniferest-0.0.13-cp310-cp310-macosx_10_9_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

coniferest-0.0.13-cp39-cp39-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.9 Windows x86-64

coniferest-0.0.13-cp39-cp39-win32.whl (9.1 MB view details)

Uploaded CPython 3.9 Windows x86

coniferest-0.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

coniferest-0.0.13-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

coniferest-0.0.13-cp39-cp39-macosx_11_0_arm64.whl (9.2 MB view details)

Uploaded CPython 3.9 macOS 11.0+ ARM64

coniferest-0.0.13-cp39-cp39-macosx_10_9_x86_64.whl (9.5 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: coniferest-0.0.13.tar.gz
  • Upload date:
  • Size: 9.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for coniferest-0.0.13.tar.gz
Algorithm Hash digest
SHA256 576848083512dddeb9ba92ec2fe1c7e30dd11cd4c7a2dc9c6c5c5bec38689bc3
MD5 1710459a77d13c9128df479a5ecc4eed
BLAKE2b-256 4b8f9a852b0367c9b64a59f844cdad3c3043f64df6d98afb0f7b667e87094b6a

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3a7234077a5647ce635ab37e0679cafbff00e1357469638c1480f4a794da6e92
MD5 aadfe179c9a31c93fe0ed9f5ae597e2a
BLAKE2b-256 686cb068166a6f1695c0c8a5b2ba2430a95fe0a5d7127af30202d838594eb2d7

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp311-cp311-win32.whl.

File metadata

  • Download URL: coniferest-0.0.13-cp311-cp311-win32.whl
  • Upload date:
  • Size: 9.1 MB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for coniferest-0.0.13-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 a94488580548c391fae9b2a55c013e717f92746e8056957c1c81fea17cc06443
MD5 53732e63b77167ee8569a6a5ffa54b27
BLAKE2b-256 dae00b94ce146224ccbb479b6d006ab7e4fa31cb03268f7416628dd19f93f75c

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3984abe038f0c4a407397237f97e60f462f9b35f00f9b02dab4dde7997918484
MD5 24724ab5942d88c9c5f7d680cf59b6d6
BLAKE2b-256 607a987c4d5600bbca9d260cfb5d77b611dd1b9e30386217c7f4a33a5b07d69a

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8e834c99b69b2afb9a24258196b5ed8093b0a9b879b706503be941fa6a4cd830
MD5 d9ad089eea802f8e387c9435c7929232
BLAKE2b-256 da1a47a8e8ed362765e8eaa46649d032106401ee7e1a5a918821376732d78b07

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7440829bd25ced9f712fddc168d7d29d3b0c49418cca2215d92b27d123df3279
MD5 31550055f2ca0ba8ce925ec47f15038c
BLAKE2b-256 c90a2baae60158761c920acc8e70d771e86eb659dd33e9ff84f90509a919c453

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 916abf7af9a08d9e03c41dad2f791f0bec4646a6df7773cc6a84d9027534cd29
MD5 64cfdb52d014e40b46c0f5c66318844b
BLAKE2b-256 92791b8468cff29a6a087bc782a3bb13120cc87757bd58820418f3c8394c4591

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0869cdc018e24f1c95e5b9f74c110b63b32876f7d426955bc89bcba6df4dfc06
MD5 c5eab9c865c30fabd09e3c0c1e9ef374
BLAKE2b-256 5cf1e7163b2d3fcf46bea7ab0a1f46e113eded9306906b236b3ece15fafd9515

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp310-cp310-win32.whl.

File metadata

  • Download URL: coniferest-0.0.13-cp310-cp310-win32.whl
  • Upload date:
  • Size: 9.1 MB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for coniferest-0.0.13-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 327764ec13651812d83ac612d57ee14a2cc2602336f7cd9eabd742364065dcfe
MD5 5a14cb36eb2e01577359ac5443563da4
BLAKE2b-256 d204372d1bf2b6595761c7000b5bf265e4535a44fa6e040f98c5e922793f640c

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 10352c6593c589241a5ef7f46c4dd6083029efba94b7e2b39a369d43dfb463c6
MD5 8ca1228a9ac2bd86ff1026026ade9f72
BLAKE2b-256 16bca47a304ede38e87ee7b87a0c567487a6af15ee362fb56cad5ccc88498807

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 05b0845907edd71396c91f61c5ce81b8c01da57acaae82bc8cf077245fa1d378
MD5 88157e4d0cb5b405b76e799eb28ab22c
BLAKE2b-256 d903941d2ff4fd01dd41d21ca20c9da3d564c13b888cec2e7cd0b400a4ff8b90

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e81f59f7f86271528f67f1abb7a11d87494ea8823267c3084687367a7ce5a6ae
MD5 e7d92b3025b7e20355c65954c08f1ac9
BLAKE2b-256 be8db9e5ac9b29a1393b1d6c96e7c7a74a71cc9e831dc94dd62b5f234f79961e

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7133428dcb473fef79631f85c146cde15331f806b674dc9be485614416c17ba7
MD5 ba2ec0942588de651b9196ef58d5a80e
BLAKE2b-256 91b977eb05bad3f62392e41c5496ab84e5565b4bf99e2b8913d59a8bb50ca1e4

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e175e3301a482384d6b1a0fb40b6475d80fbd0586abc14cd6eef40fda5398b61
MD5 bc208834958562a097414e6b066b15b0
BLAKE2b-256 b12e9f877517e8f4728f457592694ce1a362f5e451759876b8a6695c65f42d82

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp39-cp39-win32.whl.

File metadata

  • Download URL: coniferest-0.0.13-cp39-cp39-win32.whl
  • Upload date:
  • Size: 9.1 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for coniferest-0.0.13-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 f31504bbefd5b4a2bfcb7e87c11996053ff56a53d6a75351e129d711a538bc4d
MD5 5cad0edaf2fb6f25cf36df0ee27a2b46
BLAKE2b-256 e6fdc7b84beca326ae13d0f77d878b12853a9d30d1397a056bc9e82742ea293f

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 956fe02081ee05ba31fcbdee80ecfa1de34548c43dfc804d7adc47b22c9cfe05
MD5 d2028ba215e8ac976460b61969c4efba
BLAKE2b-256 a97d6203d973d1e5e857835c43a07c7e2d3416ddc8e6de6e9ff18c487d6c048d

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d4cc731cff2cfd4d05d9e74c1fb24f291c085df4f5e755134c487be5abca0b97
MD5 b3eab0601d4e81bf8cbf35bd214b5333
BLAKE2b-256 3f8cd1c317129ecec77839ca67cc8b4130902012a7fd89983fe918b13b8095e4

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9107ff298523fa5d809656f63c5aa106123497ae4426877dd711a9d8ca55d1ff
MD5 2810606be504d910e66e60cf799db3d8
BLAKE2b-256 781eac28af79261a907bb8113bef0d51f700853e10b43e333cb251bcebc60015

See more details on using hashes here.

File details

Details for the file coniferest-0.0.13-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for coniferest-0.0.13-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a521793a480bd230f173e63c6aa2f35b984d1cc8b4333670073d429b1b2995de
MD5 cf5c737eaa30b3fc2e31e1e839032f39
BLAKE2b-256 e7e334933bd29d655d5a72b228d5200cc1ca121c0684bec4246132f71ac44904

See more details on using hashes here.

Supported by

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