tapas.datasets.utils.encode_data
- tapas.datasets.utils.encode_data(dataset, infer_ranges=False)
Convert raw data to an np.ndarray with continuous features normalised and categorical features one-hot encoded.
- Parameters
dataset (TabularDataset) – Tabular dataset to encode.
infer_ranges (bool) – If false, will use ranges provided in metadata, otherwise, will use input data to infer ranges of the continuous variables and will update metadata in-place with the new ranges.
- Returns
encoded_data – Encoded data (normalised and one-hot encoded).
- Return type
np.ndarray