tabensemb.data.datamodule.DataModule.get_feature_types_idx#

method

DataModule.get_feature_types_idx(features: List[str], allow_unknown: bool = False) List[str][source]#

For each feature, get the index in unique_feature_types of its type defined in feature_types in the configuration.

Parameters:
features

A list of features.

allow_unknown

Regard unknown features as “Unknown” features (whose index is the number of known feature types). If False, an error will be raised if unknown features are found.

Returns:
list

The index of the type for each feature