@@ -33,17 +33,20 @@ class CategoricalImputer(BaseEstimator, TransformerMixin):
3333 copy : boolean, optional (default=True)
3434 If True, a copy of X will be created.
3535
36- strategy : string, optional (default = 'mode')
37- If set to 'mode', replace all instances of `missing_values`
38- with the modal value. Otherwise, replace with
39- the value specified via `replacement`.
36+ strategy : string, optional (default = 'most_frequent')
37+ The imputation strategy.
38+
39+ - If "most_frequent", then replace missing using the most frequent
40+ value along each column. Can be used with strings or numeric data.
41+ - If "constant", then replace missing values with fill_value. Can be
42+ used with strings or numeric data.
4043
4144 replacement : string, optional (default='?')
4245 The value that all instances of `missing_values` are replaced
43- with if `strategy` is not set to 'mode' . This is useful if
46+ with if `strategy` is set to `constant` . This is useful if
4447 you don't want to impute with the mode, or if there are multiple
4548 modes in your data and you want to choose a particular one. If
46- `strategy` is set to `mode `, this parameter is ignored.
49+ `strategy` is not set to `constant `, this parameter is ignored.
4750
4851 Attributes
4952 ----------
0 commit comments