hyperimpute.plugins.imputers.plugin_sklearn_ice module

class SKLearnIterativeChainedEquationsPlugin(max_iter: int = 1000, tol: float = 0.001, initial_strategy: int = 0, imputation_order: int = 0, random_state: int = 0)

Bases: ImputerPlugin

Imputation plugin for completing missing values using the Multivariate Iterative chained equations Imputation strategy.

Method:

Multivariate Iterative chained equations(MICE) methods model each feature with missing values as a function of other features in a round-robin fashion. For each step of the round-robin imputation, we use a BayesianRidge estimator, which does a regularized linear regression.

Parameters:
  • max_iter – int, default=500 maximum number of imputation rounds to perform.

  • random_state – int, default set to the current time. seed of the pseudo random number generator to use.

Example

>>> import numpy as np
>>> from hyperimpute.plugins.imputers import Imputers
>>> plugin = Imputers().get("ice")
>>> 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) SKLearnIterativeChainedEquationsPlugin
_transform(X: DataFrame) DataFrame
static hyperparameter_space(*args: Any, **kwargs: Any) List[Params]
imputation_order_vals = ['ascending', 'descending', 'roman', 'arabic', 'random']
initial_strategy_vals = ['mean', 'median', 'most_frequent', 'constant']
module_relative_path: Optional[Path]
static name() str
plugin

alias of SKLearnIterativeChainedEquationsPlugin