hyperimpute.plugins.imputers.plugin_mean module
- class MeanPlugin(random_state: int = 0)
Bases:
ImputerPlugin
Imputation plugin for completing missing values using the Mean Imputation strategy.
- Method:
The Mean Imputation strategy replaces the missing values using the mean along each column.
Example
>>> import numpy as np >>> from hyperimpute.plugins.imputers import Imputers >>> plugin = Imputers().get("mean") >>> plugin.fit_transform([[1, 1, 1, 1], [np.nan, np.nan, np.nan, np.nan], [1, 2, 2, 1], [2, 2, 2, 2]])
- _abc_impl = <_abc_data object>
- _fit(X: DataFrame, *args: Any, **kwargs: Any) MeanPlugin
- _transform(X: DataFrame) DataFrame
- module_relative_path: Optional[Path]
- static name() str
- plugin
alias of
MeanPlugin