tempor.methods.prediction.temporal.regression.plugin_seq2seq_regressor module¶
Temporal classification estimator based on Seq2Seq model.
- class tempor.methods.prediction.temporal.regression.plugin_seq2seq_regressor.Seq2seqRegressor(**params: Any)[source]¶
Bases:
BaseTemporalRegressorSeq2seq regressor.
- Parameters:¶
- **params : Any
Parameters and defaults as defined in
Seq2seqParams.
Example
>>> import doctest; doctest.ELLIPSIS_MARKER = "[...]" # Doctest config, ignore. >>> >>> from tempor.data import dataset >>> from tempor import plugin_loader >>> >>> raw_data = plugin_loader.get("prediction.one_off.sine", plugin_type="datasource", temporal_dim=5).load() >>> data = dataset.TemporalPredictionDataset( ... time_series=raw_data.time_series.dataframe(), ... static=raw_data.static.dataframe(), ... targets=raw_data.time_series.dataframe(), ... ) >>> >>> # Load the model: >>> model = plugin_loader.get("prediction.temporal.regression.seq2seq_regressor", epochs=50) >>> >>> # Train: >>> model.fit(data) [...] >>> >>> # Predict: >>> assert model.predict(data, n_future_steps = 10).numpy().shape == (len(data), 10, 5) >>> >>> doctest.ELLIPSIS_MARKER = "..." # Doctest config, ignore.- ParamsDefinition¶
alias of
Seq2seqParams
- params : Seq2seqParams¶
- static hyperparameter_space(*args: Any, **kwargs: Any) list[Params][source]¶
The hyperparameter search domain, used for tuning.
Can provide variadics
*argsand**kwargs, these will be received fromsample_hyperparameters.
-
category : ClassVar[plugin_typing.PluginCategory] =
'prediction.temporal.regression'¶ Plugin category, such as
'prediction.one_off.classification'. Must be set by the plugin class using@register_plugin.
-
name : ClassVar[plugin_typing.PluginName] =
'seq2seq_regressor'¶ 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.