ladder.data.real_data.MetadataConverter#
- class ladder.data.real_data.MetadataConverter(metadata_df)#
Class used to convert numerical torch tensors into categorical equivalents.
Allows mapping of numerical tensors with information that would usually be expected in
obsinto categorical equivalent with literals from the original metadata. This class allows for arbitrary subsets of data to be mapped back.
Methods table#
|
The function that actually does the metadata mapping. |
Methods#
- MetadataConverter.map_to_df(met_val_string)#
The function that actually does the metadata mapping.
- Parameters:
met_val_string (
Tensor) – Tensor shaped likeTensorDataset.- Return type:
- Returns:
metadata_mapping :
ndarrayNumerical tensor converted back to categorical equivalent.