morphoclass.transforms.add_one_hot_labels module¶
Implementation of the AddOneHotLabels transform.
-
class
morphoclass.transforms.add_one_hot_labels.AddOneHotLabels(fn_get_oh_label)¶ Bases:
objectAdd one-hot labels to data.
The prerequisite is that data already contains numerical sparse labels. These sparse labels are transformed into one-hot labels using the function provided in the constructor.
- Parameters
fn_get_oh_label (callable) – Function that maps sparse labels to one-hot labels.