Skip to content

Hierarchical classification module based on scikit-learn's interfaces

License

Notifications You must be signed in to change notification settings

asitang/sklearn-hierarchical-classification

Repository files navigation

sklearn-hierarchical-classification

Hierarchical classification module based on scikit-learn's interfaces and conventions.

Installation

To install, simply install this package via pip into your desired virtualenv, e.g:

pip install sklearn-hierarchical-classification

Usage

See examples/ for usage examples.

Jupyter notebooks

Support for interactive development is built in to the HierarchicalClassifier class. This will enable progress bars (using the excellent tqdm library) in various places during training and may otherwise enable more visibility into the classifier which is useful during interactive use. To enable this make sure widget extensions are enabled by running:

jupyter nbextension enable --py --sys-prefix widgetsnbextension

You can then instantiate a classifier with the interactive=True flag set:

clf = HierarchicalClassifier(
    base_estimator=svm.LinearSVC(),
    class_hierarchy=class_hierarchy,
    interactive=True,
)

Documentation

Auto-generated documentation is provided via sphinx. To build / view:

$ cd docs/
$ make html
$ open _build/index.html

Further Reading

this module is heavily influenced by the following previous work and papers:

About

Hierarchical classification module based on scikit-learn's interfaces

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages