Imputation

class getml.preprocessors.Imputation(add_dummies=False)[source]

Bases: getml.preprocessors.preprocessor._Preprocessor

Imputation replaces all NULL values in numerical columns with the mean of the remaining columns.

Optionally, it can additionally add a dummy column that signifies whether the original value was imputed.

imputation = getml.preprocessors.Imputation()

pipe = getml.pipeline.Pipeline(
    population=population_placeholder,
    peripheral=[order_placeholder, trans_placeholder],
    preprocessors=[imputation],
    feature_learners=[feature_learner_1, feature_learner_2],
    feature_selectors=feature_selector,
    predictors=predictor,
    share_selected_features=0.5
)
Args:
add_dummies (bool): Whether you want to add dummy variables

that signify whether the original value was imputed..