# Are there any implementations/examples of hierarchical classifiers?

Currently, I'm using Scikit-learn in Python 3.6 to classify data with a 7-8 classes (e.g. [C, A.1, A.2, B.3, B.1.1, B.1.2, B.2.1, B.2.2] represented by dark borders below) but I started realizing that there is an inherent hierarchy in these groups that could be used during classification. I was going to write my own algorithm but I don't want to reinvent the wheel if one exists.

Does an algorithm that can predict class-labels in hierarchical manner like this exist (preferably in Python)? If not, are there any examples of an approach like this being used? It reminds me of layers in a neural network but I do not have nearly enough samples for a neural net.

For example, A.1 and A.2 in Level-1 are subgroups of Level-0_A. Level-0_C has no subgroups.

I couldn't find an implementation of Hierarchical Classification on scikit-learn official documentation. But I found this repository recently. This module is based on scikit-learn's interfaces and conventions. I hope this will be useful.

https://github.com/globality-corp/sklearn-hierarchical-classification

It's possible to install it with pip:

pip install sklearn-hierarchical-classification


A thorough usage example is provided in the repo .

• Hi! If anyone was able to figure out how to use this package for deep hierarchy - please post a ling here if you could? For me it works for depth as in provided example, but I am not certain how to properly pass a deeper hierarchy – Maksim Khaitovich Aug 29 '18 at 17:40
• This link does not work anymore – Snow Sep 28 at 9:46