# pyFTS.models.ensemble package — pyFTS 1.6 documentation

# 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)

  Bases: `pyFTS.models.ensemble.ensemble.EnsembleFTS`

  Creates an EnsembleFTS with all point forecast methods, sharing the same partitioner

  `set_transformations`(model)
  `train`(data, **kwargs)

    Method specific parameter fitting

    Parameters

      - data – training time series data

      - kwargs – Method specific parameters

class `pyFTS.models.ensemble.ensemble.``EnsembleFTS`(**kwargs)

  Bases: `pyFTS.common.fts.FTS`

  Ensemble FTS

  `alpha`

    The quantiles

  `append_model`(model)

    Append a new trained model to the ensemble

    Parameters

      model – FTS model

  `forecast`(data, **kwargs)

    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)

    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)

    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)

    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)

    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`()

    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

  `get_distribution_interquantile`(forecasts, alpha)
  `get_interval`(forecasts)
  `get_models_forecasts`(data)
  `get_point`(forecasts, **kwargs)
  `interval_method`

    The method used to mix the several model’s forecasts into a interval forecast. Options: quantile, extremum, normal

  `models`

    A list of FTS models, the ensemble components

  `parameters`

    A list with the parameters for each component model

  `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)

    Method specific parameter fitting

    Parameters

      - data – training time series data

      - kwargs – Method specific parameters

class `pyFTS.models.ensemble.ensemble.``SimpleEnsembleFTS`(**kwargs)

  Bases: `pyFTS.models.ensemble.ensemble.EnsembleFTS`

  An homogeneous FTS method ensemble with variations on partitionings and orders.

  `method`

    FTS method class that will be used on internal models

  `orders`

    Possible variations of order on internal models

  `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)

    Method specific parameter fitting

    Parameters

      - data – training time series data

      - kwargs – Method specific parameters

`pyFTS.models.ensemble.ensemble.``sampler`(data, quantiles, bounds=False)

## 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)

  Bases: `pyFTS.models.ensemble.ensemble.EnsembleFTS`

  `forecast_distribution`(data, **kwargs)

    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

  `train`(data, **kwargs)

    Method specific parameter fitting

    Parameters

      - data – training time series data

      - kwargs – Method specific parameters

  `update_uod`(data)

`pyFTS.models.ensemble.multiseasonal.``train_individual_model`(partitioner, train_data, indexer)

## Module contents

Meta FTS that aggregates other FTS methods