a2rl.DiscreteTokenizer.fit_transform#

DiscreteTokenizer.fit_transform(df, check=True)[source]#

Call fit() then transform().

Parameters:
  • df (WiDataFrame) – Data-frame used as the training data for fitting this tokenizer, and then to be tokenized.

  • check (bool) – When True, ensure that df, 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:

WiDataFrame

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.