tabensemb.data.dataderiver.SampleWeightDeriver._derive#

method

SampleWeightDeriver._derive(df, datamodule)[source]#

The main function for a data-deriver.

Parameters:
df:

The tabular dataset.

datamodule:

A DataModule instance. Data-derivers might use information in the DataModule, but would not change its contents.

Returns:
np.ndarray

The derived data. If it is one-dimensional, use reshape(-1, 1) to transform it into two-dimensional.