a2rl.DiscreteTokenizer.fit_transform#
- DiscreteTokenizer.fit_transform(df, check=True)[source]#
Call
fit()
thentransform()
.- Parameters:
df (
WiDataFrame
) – Data-frame used as the training data for fitting this tokenizer, and then to be tokenized.check (
bool
) – WhenTrue
, ensure thatdf
, when used for fitting, contains sufficient variance (i.e., a column must not have just a single value), and numerical columns contains only finite values.
- Return type:
- Returns:
Tokenized data frame.
- Raises:
ValueError – when
check=True
and violations found on input data.
See also
check_numerical_columns
Checks performed on numerical columns.
check_categorical_columns
Checks performed on categorical columns.