# Hierarchical labelling for independent variable in training data

I have data where the objective is to use supervised learning to predict 4 different outcomes.

Say the classes are 1, 2, 3, 4. Though discrete, they are also hierarchical, where class 2 is of an extreme 'nature' than say class 1.

My question is how do I redefine the label column in such a way that it incorporates the hierarchical/weighting nature of the label classes?

I tried to redefine the label space into a (0,1) space where I can the map the classes to 1, 0.3,0.67 and 1 in in the space. This way, the problem becomes a regression problem. Is this a feasible route?

Another route is to fashion it as a straight multi-label problem but this does not reflect the hierarchical nature of the label.

I've had a look at How to conduct a multilevel model/regression for panel data in Python? but not much headway.

Suggestions on how to address the problem are welcome.

I saw a research paper “The Synthetic Data Vault: Generative Modeling for Relational Databases” that assisted with the definition of the label feature.

It suggested the following:

1. Sort the categories from most frequently occurring to least.

2. Split the interval [0, 1] into sections based on the cumulative probability for each category.

3. To convert a category, find the interval [, ] ∈ [0, 1] that corresponds to the category.

4. Chose value between and by sampling from a truncated Gaussian distribution with at the center of the interval, and = (−)/ 6 .

This way, I'm able to redefine into the (0,1) space but also consider the weighting of each class in the definition.