A lightweight toolbox for multilabel classification algorithms based on the k-nearest neighbors
Project description
multilabel_knn
multilabel_knn
is a lightweight toolbox for the multilabel classifications based on the k-nearest neighbor graphs.
The following algorithms are implemented:
- k-nearest neighbor classifier
- multilabel k-nearest neighbor classifier
- [binomial multilabel k-nearest neighbor classifier](see here)
- [binomial multilabel graph neighbor classifer](see here)
Requirements
- Python 3.7 or later
Doc
https://multilabel_knn.readthedocs.io/en/latest/
Install
pip install multilabel_knn
multilabel_knn
uses faiss library, which has two versions, faiss-cpu
and faiss-gpu
.
As the name stands, faiss-gpu
can leverage GPUs, thureby faster if you have GPUs. multilabel_knn
uses faiss-cpu
by default to avoid unnecessary GPU-related troubles.
But, if you have gpus compatible with the faiss-gpu
, you can benefit the gpu accelarations by installing faiss-gpu
by
you can still leverage the GPUs (which is recommended if you have) by installing
with conda:
conda install -c conda-forge faiss-gpu
or with pip:
pip install faiss-gpu
Don't forget to pass gpu_id
to the init
argument to enable GPU
Maintenance
Code Linting:
conda install -y -c conda-forge pre-commit
pre-commit install
Docsctring: sphinx format
Test:
python -m unittest tests/simple_test.py
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 Distribution
Hashes for multilabel_knn-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e94b4a36fcc6484fe109cec46ba8fc459b9c77934e37f525a4e387b2ad65a76e |
|
MD5 | 2bc1822e6807ec34606fe70821a6a51d |
|
BLAKE2b-256 | 26830d8913e252787af1a0ce5b660f02b43b583c377ea34b1516e72bb2aa51c0 |