tabensemb.data.AbstractDeriver#

class tabensemb.data.AbstractDeriver(**kwargs)[source]#

Bases: AbstractDataStep

Methods

__init__(**kwargs)[source]#

The base class for all data-derivers, which will derive new features based on the input DataFrame and return the derived values, or load and return multimodal data. It is recommended to learn the derivation on the training set only.

Parameters:
kwargs

Arguments required by the deriver. It will be stored as self.kwargs.

derive(df, datamodule)

The method automatically checks input column names and the DataFrame, calls the _derive() method, and checks the output of the derived data.

_check_exist(df, name)

Check whether the required column name exists in the tabular dataset.

_check_values(values)

Check whether the returned derived data is two-dimensional.

_cls_required_kwargs()

kwargs required by the class.

_derive(df, datamodule)

The main function for a data-deriver.

_derived_names()

Default names for each column of the derived data.

_generate_col_names(length)

Use the derived_name argument to generate column names for each column of the derived data.

_required_cols()

Required column names in the tabular dataset by the data-deriver.