tempor.methods.preprocessing.scaling.temporal.plugin_ts_minmax_scaler module¶
MinMax scaling for the temporal data.
-
class tempor.methods.preprocessing.scaling.temporal.plugin_ts_minmax_scaler.TimeSeriesMinMaxScalerParams(feature_range: tuple[int, int] =
(0, 1), clip: bool =False)[source]¶ Bases:
objectInitialization parameters for
TimeSeriesMinMaxScaler.-
feature_range : tuple[int, int] =
(0, 1)¶ Desired range of transformed data. See
sklearn.preprocessing.MinMaxScaler.
-
clip : bool =
False¶ Set to True to clip transformed values of held-out data to provided
feature_range. Seesklearn.preprocessing.MinMaxScaler.
-
feature_range : tuple[int, int] =
- class tempor.methods.preprocessing.scaling.temporal.plugin_ts_minmax_scaler.TimeSeriesMinMaxScaler(**params: Any)[source]¶
Bases:
BaseScalerMinMax scaling for the time-series data.
Transform the temporal features by scaling each feature to a given range. This estimator scales and translates each feature individually such that it is in the given range on the training set, e.g. between zero and one.
The time series data will be represented as a multi-index
(sample_idx, time_idx)dataframe of features, and the scaling will be applied to this dataframe.- Parameters:¶
- **params : Any
Parameters and defaults as defined in
TimeSeriesMinMaxScalerParams.
Example
>>> from tempor import plugin_loader >>> >>> dataset = plugin_loader.get("prediction.one_off.sine", plugin_type="datasource").load() >>> >>> # Load the model: >>> model = plugin_loader.get("preprocessing.scaling.temporal.ts_minmax_scaler") >>> >>> # Train: >>> model.fit(dataset) TimeSeriesMinMaxScaler(...) >>> >>> # Scale: >>> scaled = model.transform(dataset)- ParamsDefinition¶
alias of
TimeSeriesMinMaxScalerParams
- params : TimeSeriesMinMaxScalerParams¶
-
category : ClassVar[plugin_typing.PluginCategory] =
'preprocessing.scaling.temporal'¶ Plugin category, such as
'prediction.one_off.classification'. Must be set by the plugin class using@register_plugin.
-
name : ClassVar[plugin_typing.PluginName] =
'ts_minmax_scaler'¶ Plugin name, such as
'my_nn_classifier'. Must be set by the plugin class using@register_plugin.
-
plugin_type : ClassVar[plugin_typing.PluginTypeArg] =
'method'¶ Plugin type, such as
'method'. May be optionally set by the plugin class using@register_plugin, else will set the default plugin type.