hyperimpute.plugins.imputers.plugin_sklearn_missforest module

class SKLearnMissForestPlugin(n_estimators: int = 10, max_iter: int = 100, max_depth: int = 3, bootstrap: bool = True, random_state: int = 0)

Bases: ImputerPlugin

Imputation plugin for completing missing values using the MissForest strategy.

Method:

Iterative chained equations(ICE) 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 ExtraTreesRegressor, which fits a number of randomized extra-trees and averages the results.

Parameters:
  • n_estimators – int, default=10 The number of trees in the forest.

  • 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.

HyperImpute Hyperparameters:

n_estimators: The number of trees in the forest.

Example

>>> import numpy as np
>>> from hyperimpute.plugins.imputers import Imputers
>>> plugin = Imputers().get("sklearn_missforest")
>>> plugin.fit_transform([[1, 1, 1, 1], [np.nan, np.nan, np.nan, np.nan], [1, 2, 2, 1], [2, 2, 2, 2]])
     0    1    2    3
0  1.0  1.0  1.0  1.0
1  1.0  1.9  1.9  1.0
2  1.0  2.0  2.0  1.0
3  2.0  2.0  2.0  2.0
_abc_impl = <_abc_data object>
_fit(**kwargs: Any) Any
_transform(**kwargs: Any) Any
static hyperparameter_space(*args: Any, **kwargs: Any) List[Params]
module_relative_path: Optional[Path]
static name() str
plugin

alias of SKLearnMissForestPlugin