Imputer¶
-
class
sktime.transformations.series.impute.
Imputer
(method, random_state=None, value=None, forecaster=None, missing_values=None)[source]¶ Missing value imputation
- Parameters
method (Method to fill values.) –
“drift” : drift/trend values by sktime.PolynomialTrendForecaster()
”linear” : linear interpolation, by pd.Series.interpolate()
”nearest” : use nearest value, by pd.Series.interpolate()
”constant” : same constant value (given in arg value) for all NaN
”mean” : pd.Series.mean()
”median” : pd.Series.median()
”backfill”/”bfill” : adapted from pd.Series.fillna()
”pad”/”ffill” : adapted from pd.Series.fillna()
”random” : random values between pd.Series.min() and .max()
”forecaster” : use an sktime Forecaster, given in arg forecaster
missing_values (int/float/str, optional) – The placeholder for the missing values. All occurrences of missing_values will be imputed. Default, None (np.nan)
value (int/float, optional) – Value to fill NaN, by default None
forecaster (Any Forecaster based on sktime.BaseForecaster, optinal) – Use a given Forecaster to impute by insample predictions. Before fitting, missing data is imputed with method=”ffill”/”bfill” as heuristic.
random_state (int/float/str, optional) – Value to set random.seed() if method=”random”, default None