scikit-learn-contrib / hiclass

A python library for hierarchical classification compatible with scikit-learn
BSD 3-Clause "New" or "Revised" License
113 stars 20 forks source link

[Question] About "Hierarchy as a parameter in constructor" #124

Open tcsmaster opened 3 months ago

tcsmaster commented 3 months ago

In the LocalClassifierPerParentNode file, there is a "TODO: Add parameter to receive hierarchy as parameter in constructor" line. My question would be: how would the classifiers behave if there is a label that has no corresponding data, but is in the hierarchy?

mirand863 commented 3 months ago

Hi @tcsmaster,

This feature was available in one of the earliest releases of the library, but when I refactored I decided to remove it and never had the time to add it back. I would expect the training to fail if there is no data for a given local classifier or at least for it not to do anything during prediction since it has not been trained.