<spanid="module-contents"></span><h2>Module contents<aclass="headerlink"href="#module-pyFTS.models.incremental"title="Permalink to this headline">¶</a></h2>
<p>FTS methods with incremental/online learning</p>
</div>
<divclass="section"id="submodules">
<h2>Submodules<aclass="headerlink"href="#submodules"title="Permalink to this headline">¶</a></h2>
<spanid="pyfts-models-incremental-timevariant-module"></span><h2>pyFTS.models.incremental.TimeVariant module<aclass="headerlink"href="#module-pyFTS.models.incremental.TimeVariant"title="Permalink to this headline">¶</a></h2>
<p>Meta model that wraps another FTS method and continously retrain it using a data window with
<emclass="property">class </em><codeclass="sig-prename descclassname">pyFTS.models.incremental.TimeVariant.</code><codeclass="sig-name descname">Retrainer</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pyFTS/models/incremental/TimeVariant.html#Retrainer"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">auto_update</code><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.auto_update"title="Permalink to this definition">¶</a></dt>
<dd><p>If true the model is updated at each time and not recreated</p>
<codeclass="sig-name descname">batch_size</code><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.batch_size"title="Permalink to this definition">¶</a></dt>
<dd><p>The batch interval between each retraining</p>
<codeclass="sig-name descname">forecast</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">data</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pyFTS/models/incremental/TimeVariant.html#Retrainer.forecast"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.forecast"title="Permalink to this definition">¶</a></dt>
<dd><p>Point forecast one step ahead</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>data</strong>– time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>kwargs</strong>– model specific parameters</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>a list with the forecasted values</p>
<codeclass="sig-name descname">forecast_ahead</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">data</span></em>, <emclass="sig-param"><spanclass="n">steps</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pyFTS/models/incremental/TimeVariant.html#Retrainer.forecast_ahead"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.forecast_ahead"title="Permalink to this definition">¶</a></dt>
<dd><p>Point forecast from 1 to H steps ahead, where H is given by the steps parameter</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>data</strong>– time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>steps</strong>– the number of steps ahead to forecast (default: 1)</p></li>
<li><p><strong>start_at</strong>– in the multi step forecasting, the index of the data where to start forecasting (default: 0)</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>a list with the forecasted values</p>
<codeclass="sig-name descname">fts_method</code><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.fts_method"title="Permalink to this definition">¶</a></dt>
<dd><p>The FTS method to be called when a new model is build</p>
<codeclass="sig-name descname">fts_params</code><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.fts_params"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">model</code><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.model"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">offset</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pyFTS/models/incremental/TimeVariant.html#Retrainer.offset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.offset"title="Permalink to this definition">¶</a></dt>
<dd><p>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.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>An integer with the number of lags to skip</p>
<codeclass="sig-name descname">partitioner</code><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.partitioner"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">partitioner_method</code><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.partitioner_method"title="Permalink to this definition">¶</a></dt>
<dd><p>The partitioner method to be called when a new model is build</p>
<codeclass="sig-name descname">partitioner_params</code><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.partitioner_params"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">train</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">data</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pyFTS/models/incremental/TimeVariant.html#Retrainer.train"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.train"title="Permalink to this definition">¶</a></dt>
<dd><p>Method specific parameter fitting</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>data</strong>– training time series data</p></li>
<li><p><strong>kwargs</strong>– Method specific parameters</p></li>
<codeclass="sig-name descname">window_length</code><aclass="headerlink"href="#pyFTS.models.incremental.TimeVariant.Retrainer.window_length"title="Permalink to this definition">¶</a></dt>
<spanid="pyfts-models-incremental-incrementalensemble-module"></span><h2>pyFTS.models.incremental.IncrementalEnsemble module<aclass="headerlink"href="#module-pyFTS.models.incremental.IncrementalEnsemble"title="Permalink to this headline">¶</a></h2>
<p>Time Variant/Incremental Ensemble of FTS methods</p>
<emclass="property">class </em><codeclass="sig-prename descclassname">pyFTS.models.incremental.IncrementalEnsemble.</code><codeclass="sig-name descname">IncrementalEnsembleFTS</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pyFTS/models/incremental/IncrementalEnsemble.html#IncrementalEnsembleFTS"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">batch_size</code><aclass="headerlink"href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.batch_size"title="Permalink to this definition">¶</a></dt>
<dd><p>The batch interval between each retraining</p>
<codeclass="sig-name descname">forecast</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">data</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pyFTS/models/incremental/IncrementalEnsemble.html#IncrementalEnsembleFTS.forecast"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.forecast"title="Permalink to this definition">¶</a></dt>
<dd><p>Point forecast one step ahead</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>data</strong>– time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>kwargs</strong>– model specific parameters</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>a list with the forecasted values</p>
<codeclass="sig-name descname">forecast_ahead</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">data</span></em>, <emclass="sig-param"><spanclass="n">steps</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pyFTS/models/incremental/IncrementalEnsemble.html#IncrementalEnsembleFTS.forecast_ahead"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.forecast_ahead"title="Permalink to this definition">¶</a></dt>
<dd><p>Point forecast from 1 to H steps ahead, where H is given by the steps parameter</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>data</strong>– time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>steps</strong>– the number of steps ahead to forecast (default: 1)</p></li>
<li><p><strong>start_at</strong>– in the multi step forecasting, the index of the data where to start forecasting (default: 0)</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p>a list with the forecasted values</p>
<codeclass="sig-name descname">fts_method</code><aclass="headerlink"href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.fts_method"title="Permalink to this definition">¶</a></dt>
<dd><p>The FTS method to be called when a new model is build</p>
<codeclass="sig-name descname">fts_params</code><aclass="headerlink"href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.fts_params"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">num_models</code><aclass="headerlink"href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.num_models"title="Permalink to this definition">¶</a></dt>
<dd><p>The number of models to hold in the ensemble</p>
<codeclass="sig-name descname">offset</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pyFTS/models/incremental/IncrementalEnsemble.html#IncrementalEnsembleFTS.offset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.offset"title="Permalink to this definition">¶</a></dt>
<dd><p>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.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Returns</dt>
<ddclass="field-odd"><p>An integer with the number of lags to skip</p>
<codeclass="sig-name descname">partitioner_method</code><aclass="headerlink"href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.partitioner_method"title="Permalink to this definition">¶</a></dt>
<dd><p>The partitioner method to be called when a new model is build</p>
<codeclass="sig-name descname">partitioner_params</code><aclass="headerlink"href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.partitioner_params"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">train</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">data</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pyFTS/models/incremental/IncrementalEnsemble.html#IncrementalEnsembleFTS.train"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.train"title="Permalink to this definition">¶</a></dt>
<dd><p>Method specific parameter fitting</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>data</strong>– training time series data</p></li>
<li><p><strong>kwargs</strong>– Method specific parameters</p></li>
<codeclass="sig-name descname">window_length</code><aclass="headerlink"href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.window_length"title="Permalink to this definition">¶</a></dt>