HiClass
HiClass is an open-source python library for hierarchical classification compatible with scikit-learn
✨ Here are a couple of demos that show HiClass in action on hierarchical datasets:
- Classify a consumer complaints dataset from the consumer financial protection bureau: consumer-complaints
- Classify a 16S rRNA dataset from the TAXXI benchmark: 16s-rrna
Quick Links
- Features
- Benchmarks
- Roadmap
- Who is using HiClass
- Install
- Quick start
- Step-by-step- walk-through
- API documentation
- FAQ
- Support
- Contributing
- Getting latest updates
- Citation
Install
Option 1: Conda
HiClass and its dependencies can be easily installed with conda:
conda install -c conda-forge hiclass
Option 2: Pip
Alternatively, HiClass and its dependencies can also be installed with pip:
pip install hiclass
Quick start
Here's a quick example showcasing how you can train and predict using a local classifier per node.
from hiclass import LocalClassifierPerNode
from sklearn.ensemble import RandomForestClassifier
# define data
X_train, X_test = get_some_train_data() # (n, num_features)
Y_train = get_some_labels() # (n, num_largest_hierarchy)
# Use random forest classifiers for every node and run a classification
rf = RandomForestClassifier()
lcpn = LocalClassifierPerNode(local_classifier=rf)
lcpn.fit(X_train, Y_train)
predictions = lcpn.predict(X_test)
Step-by-step walk-through
A step-by-step walk-through is available on our interactive notebook hosted on Google Colab.
This will guide you through the process of installing hiclass with conda, training and predicting a small dataset.
API Documentation
Here's our official API documentation, available on Read the Docs.
If you notice any issues with the documentation or walk-through, please let us know by opening an issue here: https://github.com/mirand863/hiclass/issues.
Contributing
We are a small team on a mission to democratize hierarchical classification, and we'll take all the help we can get! If you'd like to get involved, here's information on where we could use your help: Contributing.md
Getting Latest Updates
If you'd like to get updates when we release new versions, please click on the "Watch" button on the top and select "Releases only". Github will then send you notifications along with a changelog with each new release.
Citation
If you use HiClass, please cite:
Miranda, Fábio M., Niklas Köehnecke, and Bernhard Y. Renard. "HiClass: a Python library for local hierarchical classification compatible with scikit-learn." arXiv preprint arXiv:2112.06560 (2021).
@article{miranda2021hiclass,
title={HiClass: a Python library for local hierarchical classification compatible with scikit-learn},
author={Miranda, F{\'a}bio M and K{\"o}ehnecke, Niklas and Renard, Bernhard Y},
journal={arXiv preprint arXiv:2112.06560},
year={2021}
}
In addition, we would like to list publications that use our software on our repository. Please email the reference, the name of your lab, department and institution to fabio.malchermiranda@hpi.de
Metadata
Release files for hiclass 3.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hiclass-3.1.2.tar.gz | 41.3 kB | Without provenance | Details for hiclass-3.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hiclass-3.1.2-py3-none-any.whl | Python 3 | none | any | Details for hiclass-3.1.2-py3-none-any.whl |
Total release size: 71.6 kB
Release files / hiclass-3.1.2.tar.gz
| Download URL | hiclass-3.1.2.tar.gz |
|---|---|
| Size | 41.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db4e83c6d1f38b8b66ed18a487eb55af9bce97d3fb76d1259ffb3a36ea0341c4
|
|
BLAKE2b-256 checksum How to use checksums |
5997bd2e1a0b866e1bce539a47bc6b7bba4e42ff2adeaebc00754e47f5836209
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
|
Release files / hiclass-3.1.2-py3-none-any.whl
| Download URL | hiclass-3.1.2-py3-none-any.whl |
|---|---|
| Size | 30.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9f6e90efb7574604fc16c83fa12290021b59f626fcf33caabf41f4eb1fdfa28
|
|
BLAKE2b-256 checksum How to use checksums |
26a2253a0e123bcfa80cb27831261e7f55dd3460e0b99c3f2f1a5b63d9f56cca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.11
|
Security for hiclass 3.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.