Skip to content

utils

PreprocessorConfig dataclass

Configuration for data preprocessors.

Attributes:

Name Type Description
name Literal['per_feature', 'power', 'safepower', 'power_box', 'safepower_box', 'quantile_uni_coarse', 'quantile_norm_coarse', 'quantile_uni', 'quantile_norm', 'quantile_uni_fine', 'quantile_norm_fine', 'robust', 'kdi', 'none', 'kdi_random_alpha', 'kdi_uni', 'kdi_random_alpha_uni', 'adaptive', 'norm_and_kdi', 'kdi_alpha_0.3_uni', 'kdi_alpha_0.5_uni', 'kdi_alpha_0.8_uni', 'kdi_alpha_1.0_uni', 'kdi_alpha_1.2_uni', 'kdi_alpha_1.5_uni', 'kdi_alpha_2.0_uni', 'kdi_alpha_3.0_uni', 'kdi_alpha_5.0_uni', 'kdi_alpha_0.3', 'kdi_alpha_0.5', 'kdi_alpha_0.8', 'kdi_alpha_1.0', 'kdi_alpha_1.2', 'kdi_alpha_1.5', 'kdi_alpha_2.0', 'kdi_alpha_3.0', 'kdi_alpha_5.0']

Name of the preprocessor.

categorical_name Literal['none', 'numeric', 'onehot', 'ordinal', 'ordinal_shuffled', 'ordinal_very_common_categories_shuffled']

Name of the categorical encoding method. Options: "none", "numeric", "onehot", "ordinal", "ordinal_shuffled", "none".

append_original bool

Whether to append original features to the transformed features

subsample_features float

Fraction of features to subsample. -1 means no subsampling.

global_transformer_name Union[str, None]

Name of the global transformer to use.

to_dict

to_dict() -> Dict[str, Any]

Convert the PreprocessorConfig instance to a dictionary.

Returns:

Type Description
Dict[str, Any]

Dict[str, Any]: Dictionary containing the configuration parameters.