imputr.strategy.mean#

Module Contents#

Classes#

MeanStrategy

Mean imputation strategy. Imputes calculated mean for numeric columns

class imputr.strategy.mean.MeanStrategy(target_column: imputr.domain.Column)#

Bases: imputr.strategy._base._UnivariateStrategy

Mean imputation strategy. Imputes calculated mean for numeric columns and median for categoric columns.

supported_data_types :List#
classmethod from_dict(target_column: imputr.domain.Column, **kwargs: Dict)#

Class constructor that uses the dictionary to build strategy.

Uses a part of the dictionary given to imputer constructor.

Parameters

target_column (Column) – Column that needs imputation by strategy.

fit() None#

Gets mean or median value from Column to be imputed.

impute_column() pandas.Series#

Imputes column with mean value.

Returns

pd.Series (fully imputed data column.)