@@ -52,7 +52,7 @@ class IterativeImputer(_BaseImputer):
52
52
If ``sample_posterior`` is True, the estimator must support
53
53
``return_std`` in its ``predict`` method.
54
54
55
- missing_values : int, np.nan, optional ( default=np.nan)
55
+ missing_values : int, np.nan, default=np.nan
56
56
The placeholder for the missing values. All occurrences of
57
57
``missing_values`` will be imputed.
58
58
@@ -62,18 +62,18 @@ class IterativeImputer(_BaseImputer):
62
62
``return_std`` in its ``predict`` method if set to ``True``. Set to
63
63
``True`` if using ``IterativeImputer`` for multiple imputations.
64
64
65
- max_iter : int, optional ( default=10)
65
+ max_iter : int, default=10
66
66
Maximum number of imputation rounds to perform before returning the
67
67
imputations computed during the final round. A round is a single
68
68
imputation of each feature with missing values. The stopping criterion
69
69
is met once `abs(max(X_t - X_{t-1}))/abs(max(X[known_vals]))` < tol,
70
70
where `X_t` is `X` at iteration `t. Note that early stopping is only
71
71
applied if ``sample_posterior=False``.
72
72
73
- tol : float, optional ( default=1e-3)
73
+ tol : float, default=1e-3
74
74
Tolerance of the stopping condition.
75
75
76
- n_nearest_features : int, optional ( default=None)
76
+ n_nearest_features : int, default=None
77
77
Number of other features to use to estimate the missing values of
78
78
each feature column. Nearness between features is measured using
79
79
the absolute correlation coefficient between each feature pair (after
@@ -83,12 +83,12 @@ class IterativeImputer(_BaseImputer):
83
83
imputed target feature. Can provide significant speed-up when the
84
84
number of features is huge. If ``None``, all features will be used.
85
85
86
- initial_strategy : str, optional ( default=" mean")
86
+ initial_strategy : str, default=' mean'
87
87
Which strategy to use to initialize the missing values. Same as the
88
88
``strategy`` parameter in :class:`sklearn.impute.SimpleImputer`
89
89
Valid values: {"mean", "median", "most_frequent", or "constant"}.
90
90
91
- imputation_order : str, optional ( default=" ascending")
91
+ imputation_order : str, default=' ascending'
92
92
The order in which the features will be imputed. Possible values:
93
93
94
94
"ascending"
@@ -102,34 +102,34 @@ class IterativeImputer(_BaseImputer):
102
102
"random"
103
103
A random order for each round.
104
104
105
- skip_complete : boolean, optional ( default=False)
105
+ skip_complete : boolean, default=False
106
106
If ``True`` then features with missing values during ``transform``
107
107
which did not have any missing values during ``fit`` will be imputed
108
108
with the initial imputation method only. Set to ``True`` if you have
109
109
many features with no missing values at both ``fit`` and ``transform``
110
110
time to save compute.
111
111
112
- min_value : float, optional ( default=None)
112
+ min_value : float, default=None
113
113
Minimum possible imputed value. Default of ``None`` will set minimum
114
114
to negative infinity.
115
115
116
- max_value : float, optional ( default=None)
116
+ max_value : float, default=None
117
117
Maximum possible imputed value. Default of ``None`` will set maximum
118
118
to positive infinity.
119
119
120
- verbose : int, optional ( default=0)
120
+ verbose : int, default=0
121
121
Verbosity flag, controls the debug messages that are issued
122
122
as functions are evaluated. The higher, the more verbose. Can be 0, 1,
123
123
or 2.
124
124
125
- random_state : int, RandomState instance or None, optional ( default=None)
125
+ random_state : int, RandomState instance or None, default=None
126
126
The seed of the pseudo random number generator to use. Randomizes
127
127
selection of estimator features if n_nearest_features is not None, the
128
128
``imputation_order`` if ``random``, and the sampling from posterior if
129
129
``sample_posterior`` is True. Use an integer for determinism.
130
130
See :term:`the Glossary <random_state>`.
131
131
132
- add_indicator : boolean, optional ( default=False)
132
+ add_indicator : boolean, default=False
133
133
If True, a :class:`MissingIndicator` transform will stack onto output
134
134
of the imputer's transform. This allows a predictive estimator
135
135
to account for missingness despite imputation. If a feature has no
@@ -443,7 +443,7 @@ def _get_abs_corr_mat(self, X_filled, tolerance=1e-6):
443
443
X_filled : ndarray, shape (n_samples, n_features)
444
444
Input data with the most recent imputations.
445
445
446
- tolerance : float, optional ( default=1e-6)
446
+ tolerance : float, default=1e-6
447
447
``abs_corr_mat`` can have nans, which will be replaced
448
448
with ``tolerance``.
449
449
0 commit comments