# pyFTS.models.incremental package — pyFTS 1.6 documentation

# pyFTS.models.incremental package

## Module contents

FTS methods with incremental/online learning

## Submodules

## pyFTS.models.incremental.TimeVariant module

Meta model that wraps another FTS method and continously retrain it using a data window with the most recent data

class `pyFTS.models.incremental.TimeVariant.``Retrainer`(**kwargs)

  Bases: `pyFTS.common.fts.FTS`

  Meta model for incremental/online learning that retrain its internal model after data windows controlled by the parameter ‘batch_size’, using as the training data a window of recent lags, whose size is controlled by the parameter ‘window_length’.

  `auto_update`

    If true the model is updated at each time and not recreated

  `batch_size`

    The batch interval between each retraining

  `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`(data, steps, **kwargs)

    Point 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 (default: 1)

      - start_at – in the multi step forecasting, the index of the data where to start forecasting (default: 0)

    Returns

      a list with the forecasted values

  `fts_method`

    The FTS method to be called when a new model is build

  `fts_params`

    The FTS method specific parameters

  `model`

    The most recent trained model

  `offset`()

    Returns the number of lags to skip in the input test data in order to synchronize it with the forecasted values given by the predict function. This is necessary due to the order of the model, among other parameters.

    Returns

      An integer with the number of lags to skip

  `partitioner`

    The most recent trained partitioner

  `partitioner_method`

    The partitioner method to be called when a new model is build

  `partitioner_params`

    The partitioner method parameters

  `train`(data, **kwargs)

    Method specific parameter fitting

    Parameters

      - data – training time series data

      - kwargs – Method specific parameters

  `window_length`

    The memory window length

## pyFTS.models.incremental.IncrementalEnsemble module

Time Variant/Incremental Ensemble of FTS methods

class `pyFTS.models.incremental.IncrementalEnsemble.``IncrementalEnsembleFTS`(**kwargs)

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

  Time Variant/Incremental Ensemble of FTS methods

  `batch_size`

    The batch interval between each retraining

  `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`(data, steps, **kwargs)

    Point 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 (default: 1)

      - start_at – in the multi step forecasting, the index of the data where to start forecasting (default: 0)

    Returns

      a list with the forecasted values

  `fts_method`

    The FTS method to be called when a new model is build

  `fts_params`

    The FTS method specific parameters

  `num_models`

    The number of models to hold in the ensemble

  `offset`()

    Returns the number of lags to skip in the input test data in order to synchronize it with the forecasted values given by the predict function. This is necessary due to the order of the model, among other parameters.

    Returns

      An integer with the number of lags to skip

  `partitioner_method`

    The partitioner method to be called when a new model is build

  `partitioner_params`

    The partitioner method parameters

  `train`(data, **kwargs)

    Method specific parameter fitting

    Parameters

      - data – training time series data

      - kwargs – Method specific parameters

  `window_length`

    The memory window length