Coniferous forests for better machine learning
Project description
coniferest
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file coniferest-0.0.14.tar.gz
.
File metadata
- Download URL: coniferest-0.0.14.tar.gz
- Upload date:
- Size: 22.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dde126dae582be2db9c5b2a11e0907505933ef71251ea36bfcb3d2918527773 |
|
MD5 | e3daf21f71dfa1a79f87784021a237b2 |
|
BLAKE2b-256 | 449970cbf427cc5df7d0773fcdc32fcef039fde5ca61d0ef23c55b2ab429fd88 |
File details
Details for the file coniferest-0.0.14-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51a8470d320482be6800312222cb03a50d9efa8f4871609a424595bc533e151f |
|
MD5 | 952ca6d3732c80933ba7af5b034a5828 |
|
BLAKE2b-256 | dd7d05524683ae34836d2ccd39f55984fd3aec308815b5b3332dafb8f45ef3e5 |
File details
Details for the file coniferest-0.0.14-cp312-cp312-win32.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp312-cp312-win32.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.12, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15e9cda6e8bdb84ab586507a46d2bd0bb5542b8071e826d56f73f53d54bd5c88 |
|
MD5 | 06ecc020f6882b181a1f2c307099bba6 |
|
BLAKE2b-256 | 7956a17ef366863bff54989a20a6861f78c6588a346726c0c3a67ef6cb83bff6 |
File details
Details for the file coniferest-0.0.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 23.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0548322357a4e07145076ef450fff13a33595f988d77bbba2c78475e616fae4 |
|
MD5 | eabb1fa2d6fd0daadc5b34ea4d95a4e8 |
|
BLAKE2b-256 | 2f69f540db5ca420fe7c88187cf2f66e1536099b0f8d62618b41428a96bd2483 |
File details
Details for the file coniferest-0.0.14-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 23.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e91768d546ce7db32085df7d22267fb69abbd3d8fdcabd82d1ec0689e3f7c639 |
|
MD5 | 218b8c7146877fe39a32904d31667dd7 |
|
BLAKE2b-256 | c760003e6956dd9bebff9d41dc26236a424ea14b97e11ea96ee9a2e54cf18a76 |
File details
Details for the file coniferest-0.0.14-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddd990dc41be91c2d4a17cb283f41d155cee4902b27244557f172e76838dc3b4 |
|
MD5 | c27ba1d8cdf2b847b0a344ee53a5b79c |
|
BLAKE2b-256 | 62b311c72e780f565df73b101c48b1275785203d41503ff82ec1b1ea3773c603 |
File details
Details for the file coniferest-0.0.14-cp312-cp312-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp312-cp312-macosx_10_9_x86_64.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.12, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ccd92f679abd05a93a7525335c313012730272cec921155075d01a934e57d9a6 |
|
MD5 | df4183b3bf4402d7b1b15cbbb9bc55fc |
|
BLAKE2b-256 | 614b01af54f162f6c0cc4f97cce2c25ba74c839c1ac452c44dbdfbf2cc72ea00 |
File details
Details for the file coniferest-0.0.14-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b6094ad4390a5966ac7952c193be1f9c2ff7f783cf91820de005d80253c0641 |
|
MD5 | e2200edf6b466a096af5aa6b374662a9 |
|
BLAKE2b-256 | 72e47e8f81094ef85c38271edc08f68395afc4c0ce04b5e2b094bd15b83a3620 |
File details
Details for the file coniferest-0.0.14-cp311-cp311-win32.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp311-cp311-win32.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69e68b1de71586e726ad6de69ff76e1370f13495ee9f856af640795b7c05f104 |
|
MD5 | 33c30fff2a6976f47a6db2427669eefa |
|
BLAKE2b-256 | 2eb3e5d0b6be07a6484a2bd5c79a38c88dc527e52c4840b2cf7e975ce6c6903a |
File details
Details for the file coniferest-0.0.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 23.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b2054d1ed698d7cb35c0cbdfb7091c9343c0a21d79e8ecb748d1bc5b6cb9cc5 |
|
MD5 | 85376e39ed12f4ea44e6a01e4b17500d |
|
BLAKE2b-256 | e116070ed1674ce7827e34288f47d2f2500bc607bd27d3ae95ca5e4e4772cd50 |
File details
Details for the file coniferest-0.0.14-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 23.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fff65c3301b7f6f5aaa246d5c4eec5293761c52fb0c6ac34d9307fc6b6d60702 |
|
MD5 | 80c97a7d6fac240d748dc4e44f8e5103 |
|
BLAKE2b-256 | 90221842f3a72b033bf0aafcd2331115116655f55936c729aff53026eee849db |
File details
Details for the file coniferest-0.0.14-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1d1f6b16189a971f4f7d1e42bfe43b1cadd35601328a8e7101c4797ac8a5383 |
|
MD5 | b1a69097226bcf9643798e6842f1e697 |
|
BLAKE2b-256 | 6d2e061b019304189cd5085912108eb9de804abf96e631aac67c33e96a531ae3 |
File details
Details for the file coniferest-0.0.14-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81050cfe68c8a17fb6838ca8194c37ab8c73043fb6637a2ea3d2e2e597c7b32f |
|
MD5 | 2d80d8c82388c3c54a57b08d19b2bec0 |
|
BLAKE2b-256 | cc011506a634e01f992ef355dd611cf9015b4a524cc0c8a0e758f875ad0e542d |
File details
Details for the file coniferest-0.0.14-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13cbb30a1482f7434b693064fabee770931265cc5e811b90e9434bda48e08c58 |
|
MD5 | 60ebf87fed72634e0221ee0fbf07f64f |
|
BLAKE2b-256 | c7e3ffe7ae3ed3cd5266a9c963944573121f4ebbe5fdd7e06bb5260e3b65c361 |
File details
Details for the file coniferest-0.0.14-cp310-cp310-win32.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp310-cp310-win32.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5ad462380776b6ba404db18fb82b5543b2dcee16e3bf2fb9f817c8c7753ea65 |
|
MD5 | a9fa39b9cab49687612512114fbd8068 |
|
BLAKE2b-256 | c9b07908769968e1096cf159758bc2c4ec545d8dc9c65c813f3dc776dc608794 |
File details
Details for the file coniferest-0.0.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 23.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19828a1c8565da553a6c62fb303cd7c4c3d5adbf49da0f367ee20fdfddd044e5 |
|
MD5 | 0a8d8827aaa22dde6bd05b8188afda10 |
|
BLAKE2b-256 | 8393636591a2b67630ec4037af31d33694dae4728366309be739b44c393eedee |
File details
Details for the file coniferest-0.0.14-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 23.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96804a798debcf238b195598fb463c3cdf6dd863e16b62215714fe7ecd2f96bb |
|
MD5 | ad9768d64f0a4bb1a5fe202d49c01e96 |
|
BLAKE2b-256 | 0115130e923a8eee0d246f6c5559df215cf37d486510b1b3ee92bb465e728cdb |
File details
Details for the file coniferest-0.0.14-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4468b6cb1cf1cf6b54951f1f2b9dfa5693b8e7491a99bbf6df049d05ca75960c |
|
MD5 | 7f551380407355519a99cbd599730436 |
|
BLAKE2b-256 | d2c0a9f6926a52c52a5f6ad005aaea0870a2775cd10c9c36231c1dab90febc51 |
File details
Details for the file coniferest-0.0.14-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16996811f2f161694a4e5886da834de0616b6767039a2c222b94e55777628cd8 |
|
MD5 | 82d04add83cf8732e4d3e1fd259316d3 |
|
BLAKE2b-256 | a3d36570df5e6abdf60b5e0c074723a9c910a944ad44e1f3c038d59fd84e0452 |
File details
Details for the file coniferest-0.0.14-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f5f07663bf1f977c9f9575ec97439cfd9104b3dbf6b17822d6ee7e6c1c78b69 |
|
MD5 | d74836b48de806d20762416e689fb4b5 |
|
BLAKE2b-256 | 5b2603c2e3724320e6e069f48655ccc946da6c79667807b2ccad8e01e46df4da |
File details
Details for the file coniferest-0.0.14-cp39-cp39-win32.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp39-cp39-win32.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3d42c0789fd7caa1fb2fba4934be96beb5eaa996842e477930ef223177f6c59 |
|
MD5 | 465feacaa85267d8e8fada40278f31e3 |
|
BLAKE2b-256 | 795684372cf14cfa6e61a731a264b5a9ea4c931b9670bc73b0fe479b5aa2aecf |
File details
Details for the file coniferest-0.0.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 23.6 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f77a7f2f6861bf6074a807446b9bb641281cbf8121c0a2f61db51e38012b6eff |
|
MD5 | 66701fd69e5a7150dfbe592ef69a6682 |
|
BLAKE2b-256 | 5fb7040a0ca2a0b32047f2196c39e70b2e4d5ede40f9fc46357934756656c6be |
File details
Details for the file coniferest-0.0.14-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 23.6 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27fd3525b700a053114ba94fa2a0edd67f87e0443e4e17c00e0d804ee42e08cc |
|
MD5 | efba9dab331a25462b58349ee02645d3 |
|
BLAKE2b-256 | 56aa719d66c078ea1caa51a4070ced8bbbace4a544820ee80a0c4e83b2507579 |
File details
Details for the file coniferest-0.0.14-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07c803a82d8ad09a20adf0dbb88e1f927d9e49f8754848f7b2911750ef57548f |
|
MD5 | de59f5c3c5239af8b3e0fdaf5ce8728b |
|
BLAKE2b-256 | 741fec5be7207ac46c92eeb7ba8463d0bb438149888f5c894740a54d8580d311 |
File details
Details for the file coniferest-0.0.14-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: coniferest-0.0.14-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 22.9 MB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9066fdb0e680d3f32dec6eeed2973c7cfd3ec60800c5f46dafb43a8044e184d |
|
MD5 | 0c31ff25a8f0586b2b711136df31b96c |
|
BLAKE2b-256 | bfe35dce931234233ba5e5241cae93792faa198fd7db586e278b1ba420fbe4fa |