pyFTS.models.ensemble package¶
Submodules¶
pyFTS.models.ensemble.ensemble module¶
EnsembleFTS wraps several FTS methods to ensemble their forecasts, providing point, interval and probabilistic forecasting.
Silva, P. C. L et al. Probabilistic Forecasting with Seasonal Ensemble Fuzzy Time-Series XIII Brazilian Congress on Computational Intelligence, 2017. Rio de Janeiro, Brazil.
- class pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS(**kwargs)[source]¶
Bases:
pyFTS.models.ensemble.ensemble.EnsembleFTS
Creates an EnsembleFTS with all point forecast methods, sharing the same partitioner
- benchmark_only: bool¶
A boolean value indicating a façade for external (non-FTS) model used on benchmarks or ensembles.
- has_interval_forecasting: bool¶
A boolean value indicating if the model supports interval forecasting, default: False
- has_point_forecasting: bool¶
A boolean value indicating if the model supports point forecasting, default: True
- has_probability_forecasting: bool¶
A boolean value indicating if the model support probabilistic forecasting, default: False
- has_seasonality: bool¶
A boolean value indicating if the model supports seasonal indexers, default: False
- is_clustered: bool¶
A boolean value indicating if the model support multivariate time series (Pandas DataFrame), but works like a monovariate method, default: False
- is_high_order: bool¶
A boolean value indicating if the model support orders greater than 1, default: False
- is_multivariate: bool¶
A boolean value indicating if the model support multivariate time series (Pandas DataFrame), default: False
- log: pd.DataFrame¶
- max_lag: int¶
A integer indicating the largest lag used by the model. This value also indicates the minimum number of past lags needed to forecast a single step ahead
- min_order: int¶
In high order models, this integer value indicates the minimal order supported for the model, default: 1
- original_max: float¶
A float with the upper limit of the Universe of Discourse, the maximal value found on training data
- original_min: float¶
A float with the lower limit of the Universe of Discourse, the minimal value found on training data
- partitioner: partitioner.Partitioner¶
A pyFTS.partitioners.Partitioner object with the Universe of Discourse partitioner used on the model. This is a mandatory dependecy.
- train(data, **kwargs)[source]¶
Method specific parameter fitting
- Parameters
data – training time series data
kwargs – Method specific parameters
- transformations: list[transformation.Transformation]¶
A list with the data transformations (common.Transformations) applied on model pre and post processing, default: []
- class pyFTS.models.ensemble.ensemble.EnsembleFTS(**kwargs)[source]¶
Bases:
pyFTS.common.fts.FTS
Ensemble FTS
- alpha¶
The quantiles
- append_model(model)[source]¶
Append a new trained model to the ensemble
- Parameters
model – FTS model
- benchmark_only: bool¶
A boolean value indicating a façade for external (non-FTS) model used on benchmarks or ensembles.
- forecast(data, **kwargs)[source]¶
Point forecast one step ahead
- Parameters
data – time series data with the minimal length equal to the max_lag of the model
kwargs – model specific parameters
- Returns
a list with the forecasted values
- forecast_ahead_distribution(data, steps, **kwargs)[source]¶
Probabilistic forecast from 1 to H steps ahead, where H is given by the steps parameter
- Parameters
data – time series data with the minimal length equal to the max_lag of the model
steps – the number of steps ahead to forecast
start_at – in the multi step forecasting, the index of the data where to start forecasting (default: 0)
- Returns
a list with the forecasted Probability Distributions
- forecast_ahead_interval(data, steps, **kwargs)[source]¶
Interval forecast from 1 to H steps ahead, where H is given by the steps parameter
- Parameters
data – time series data with the minimal length equal to the max_lag of the model
steps – the number of steps ahead to forecast
start_at – in the multi step forecasting, the index of the data where to start forecasting (default: 0)
- Returns
a list with the forecasted intervals
- forecast_distribution(data, **kwargs)[source]¶
Probabilistic forecast one step ahead
- Parameters
data – time series data with the minimal length equal to the max_lag of the model
kwargs – model specific parameters
- Returns
a list with probabilistic.ProbabilityDistribution objects representing the forecasted Probability Distributions
- forecast_interval(data, **kwargs)[source]¶
Interval forecast one step ahead
- Parameters
data – time series data with the minimal length equal to the max_lag of the model
kwargs – model specific parameters
- Returns
a list with the prediction intervals
- get_UoD()[source]¶
Returns the interval of the known bounds of the universe of discourse (UoD), i. e., the known minimum and maximum values of the time series.
- Returns
A set with the lower and the upper bounds of the UoD
- has_interval_forecasting: bool¶
A boolean value indicating if the model supports interval forecasting, default: False
- has_point_forecasting: bool¶
A boolean value indicating if the model supports point forecasting, default: True
- has_probability_forecasting: bool¶
A boolean value indicating if the model support probabilistic forecasting, default: False
- has_seasonality: bool¶
A boolean value indicating if the model supports seasonal indexers, default: False
- interval_method¶
The method used to mix the several model’s forecasts into a interval forecast. Options: quantile, extremum, normal
- is_clustered: bool¶
A boolean value indicating if the model support multivariate time series (Pandas DataFrame), but works like a monovariate method, default: False
- is_high_order: bool¶
A boolean value indicating if the model support orders greater than 1, default: False
- is_multivariate: bool¶
A boolean value indicating if the model support multivariate time series (Pandas DataFrame), default: False
- log: pd.DataFrame¶
- max_lag: int¶
A integer indicating the largest lag used by the model. This value also indicates the minimum number of past lags needed to forecast a single step ahead
- min_order: int¶
In high order models, this integer value indicates the minimal order supported for the model, default: 1
- models¶
A list of FTS models, the ensemble components
- original_max: float¶
A float with the upper limit of the Universe of Discourse, the maximal value found on training data
- original_min: float¶
A float with the lower limit of the Universe of Discourse, the minimal value found on training data
- parameters¶
A list with the parameters for each component model
- partitioner: partitioner.Partitioner¶
A pyFTS.partitioners.Partitioner object with the Universe of Discourse partitioner used on the model. This is a mandatory dependecy.
- point_method¶
The method used to mix the several model’s forecasts into a unique point forecast. Options: mean, median, quantile, exponential
- train(data, **kwargs)[source]¶
Method specific parameter fitting
- Parameters
data – training time series data
kwargs – Method specific parameters
- transformations: list[transformation.Transformation]¶
A list with the data transformations (common.Transformations) applied on model pre and post processing, default: []
- class pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS(**kwargs)[source]¶
Bases:
pyFTS.models.ensemble.ensemble.EnsembleFTS
An homogeneous FTS method ensemble with variations on partitionings and orders.
- benchmark_only: bool¶
A boolean value indicating a façade for external (non-FTS) model used on benchmarks or ensembles.
- has_interval_forecasting: bool¶
A boolean value indicating if the model supports interval forecasting, default: False
- has_point_forecasting: bool¶
A boolean value indicating if the model supports point forecasting, default: True
- has_probability_forecasting: bool¶
A boolean value indicating if the model support probabilistic forecasting, default: False
- has_seasonality: bool¶
A boolean value indicating if the model supports seasonal indexers, default: False
- is_clustered: bool¶
A boolean value indicating if the model support multivariate time series (Pandas DataFrame), but works like a monovariate method, default: False
- is_high_order: bool¶
A boolean value indicating if the model support orders greater than 1, default: False
- is_multivariate: bool¶
A boolean value indicating if the model support multivariate time series (Pandas DataFrame), default: False
- log: pd.DataFrame¶
- max_lag: int¶
A integer indicating the largest lag used by the model. This value also indicates the minimum number of past lags needed to forecast a single step ahead
- method¶
FTS method class that will be used on internal models
- min_order: int¶
In high order models, this integer value indicates the minimal order supported for the model, default: 1
- orders¶
Possible variations of order on internal models
- original_max: float¶
A float with the upper limit of the Universe of Discourse, the maximal value found on training data
- original_min: float¶
A float with the lower limit of the Universe of Discourse, the minimal value found on training data
- partitioner: partitioner.Partitioner¶
A pyFTS.partitioners.Partitioner object with the Universe of Discourse partitioner used on the model. This is a mandatory dependecy.
- partitioner_method¶
UoD partitioner class that will be used on internal methods
- partitions¶
Possible variations of number of partitions on internal models
- train(data, **kwargs)[source]¶
Method specific parameter fitting
- Parameters
data – training time series data
kwargs – Method specific parameters
- transformations: list[transformation.Transformation]¶
A list with the data transformations (common.Transformations) applied on model pre and post processing, default: []
pyFTS.models.ensemble.multiseasonal module¶
Silva, P. C. L et al. Probabilistic Forecasting with Seasonal Ensemble Fuzzy Time-Series XIII Brazilian Congress on Computational Intelligence, 2017. Rio de Janeiro, Brazil.
- class pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS(name, **kwargs)[source]¶
Bases:
pyFTS.models.ensemble.ensemble.EnsembleFTS
- benchmark_only: bool¶
A boolean value indicating a façade for external (non-FTS) model used on benchmarks or ensembles.
- forecast_distribution(data, **kwargs)[source]¶
Probabilistic forecast one step ahead
- Parameters
data – time series data with the minimal length equal to the max_lag of the model
kwargs – model specific parameters
- Returns
a list with probabilistic.ProbabilityDistribution objects representing the forecasted Probability Distributions
- has_interval_forecasting: bool¶
A boolean value indicating if the model supports interval forecasting, default: False
- has_point_forecasting: bool¶
A boolean value indicating if the model supports point forecasting, default: True
- has_probability_forecasting: bool¶
A boolean value indicating if the model support probabilistic forecasting, default: False
- has_seasonality: bool¶
A boolean value indicating if the model supports seasonal indexers, default: False
- is_clustered: bool¶
A boolean value indicating if the model support multivariate time series (Pandas DataFrame), but works like a monovariate method, default: False
- is_high_order: bool¶
A boolean value indicating if the model support orders greater than 1, default: False
- is_multivariate: bool¶
A boolean value indicating if the model support multivariate time series (Pandas DataFrame), default: False
- log: pd.DataFrame¶
- max_lag: int¶
A integer indicating the largest lag used by the model. This value also indicates the minimum number of past lags needed to forecast a single step ahead
- min_order: int¶
In high order models, this integer value indicates the minimal order supported for the model, default: 1
- original_max: float¶
A float with the upper limit of the Universe of Discourse, the maximal value found on training data
- original_min: float¶
A float with the lower limit of the Universe of Discourse, the minimal value found on training data
- partitioner: partitioner.Partitioner¶
A pyFTS.partitioners.Partitioner object with the Universe of Discourse partitioner used on the model. This is a mandatory dependecy.
- train(data, **kwargs)[source]¶
Method specific parameter fitting
- Parameters
data – training time series data
kwargs – Method specific parameters
- transformations: list[transformation.Transformation]¶
A list with the data transformations (common.Transformations) applied on model pre and post processing, default: []
Module contents¶
Meta FTS that aggregates other FTS methods