is_time_variant flag on FTS; offset() function in FTS; Documentation update

This commit is contained in:
Petrônio Cândido 2019-11-15 16:48:47 -03:00
parent 517a715a1d
commit bc6a632a6d
18 changed files with 86 additions and 27 deletions

Binary file not shown.

Binary file not shown.

View File

@ -76,6 +76,13 @@ pyFTS.partitioners.Simple module
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
pyFTS.partitioners.SubClust module
----------------------------------
.. automodule:: pyFTS.partitioners.SubClust
:members:
:undoc-members:
:show-inheritance:
pyFTS.partitioners.Util module pyFTS.partitioners.Util module
------------------------------ ------------------------------

View File

@ -205,6 +205,7 @@
<li class="toctree-l4"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Huarng">pyFTS.partitioners.Huarng module</a></li> <li class="toctree-l4"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Huarng">pyFTS.partitioners.Huarng module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Singleton">pyFTS.partitioners.Singleton module</a></li> <li class="toctree-l4"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Singleton">pyFTS.partitioners.Singleton module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Simple">pyFTS.partitioners.Simple module</a></li> <li class="toctree-l4"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Simple">pyFTS.partitioners.Simple module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.partitioners.html#pyfts-partitioners-subclust-module">pyFTS.partitioners.SubClust module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Util">pyFTS.partitioners.Util module</a></li> <li class="toctree-l4"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Util">pyFTS.partitioners.Util module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.parallel_util">pyFTS.partitioners.parallel_util module</a></li> <li class="toctree-l4"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.parallel_util">pyFTS.partitioners.parallel_util module</a></li>
</ul> </ul>

View File

@ -211,7 +211,7 @@
<dl class="class"> <dl class="class">
<dt id="pyFTS.common.FLR.FLR"> <dt id="pyFTS.common.FLR.FLR">
<em class="property">class </em><code class="descclassname">pyFTS.common.FLR.</code><code class="descname">FLR</code><span class="sig-paren">(</span><em>LHS</em>, <em>RHS</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.FLR.FLR" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.common.FLR.</code><code class="descname">FLR</code><span class="sig-paren">(</span><em>LHS</em>, <em>RHS</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.FLR.FLR" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Fuzzy Logical Relationship</p> <p>Fuzzy Logical Relationship</p>
<p>Represents a temporal transition of the fuzzy set LHS on time t for the fuzzy set RHS on time t+1.</p> <p>Represents a temporal transition of the fuzzy set LHS on time t for the fuzzy set RHS on time t+1.</p>
</dd></dl> </dd></dl>
@ -299,7 +299,7 @@
<dl class="class"> <dl class="class">
<dt id="pyFTS.common.FuzzySet.FuzzySet"> <dt id="pyFTS.common.FuzzySet.FuzzySet">
<em class="property">class </em><code class="descclassname">pyFTS.common.FuzzySet.</code><code class="descname">FuzzySet</code><span class="sig-paren">(</span><em>name</em>, <em>mf</em>, <em>parameters</em>, <em>centroid</em>, <em>alpha=1.0</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.common.FuzzySet.</code><code class="descname">FuzzySet</code><span class="sig-paren">(</span><em>name</em>, <em>mf</em>, <em>parameters</em>, <em>centroid</em>, <em>alpha=1.0</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Fuzzy Set</p> <p>Fuzzy Set</p>
<dl class="method"> <dl class="method">
<dt id="pyFTS.common.FuzzySet.FuzzySet.membership"> <dt id="pyFTS.common.FuzzySet.FuzzySet.membership">
@ -663,7 +663,7 @@
<dl class="class"> <dl class="class">
<dt id="pyFTS.common.SortedCollection.SortedCollection"> <dt id="pyFTS.common.SortedCollection.SortedCollection">
<em class="property">class </em><code class="descclassname">pyFTS.common.SortedCollection.</code><code class="descname">SortedCollection</code><span class="sig-paren">(</span><em>iterable=()</em>, <em>key=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.common.SortedCollection.</code><code class="descname">SortedCollection</code><span class="sig-paren">(</span><em>iterable=()</em>, <em>key=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Sequence sorted by a key function.</p> <p>Sequence sorted by a key function.</p>
<p>SortedCollection() is much easier to work with than using bisect() directly. <p>SortedCollection() is much easier to work with than using bisect() directly.
It supports key functions like those use in sorted(), min(), and max(). It supports key functions like those use in sorted(), min(), and max().
@ -1048,7 +1048,7 @@ bisect but with a simpler API and support for key functions.</p>
<dl class="class"> <dl class="class">
<dt id="pyFTS.common.Transformations.Transformation"> <dt id="pyFTS.common.Transformations.Transformation">
<em class="property">class </em><code class="descclassname">pyFTS.common.Transformations.</code><code class="descname">Transformation</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.Transformations.Transformation" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.common.Transformations.</code><code class="descname">Transformation</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.Transformations.Transformation" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Data transformation used on pre and post processing of the FTS</p> <p>Data transformation used on pre and post processing of the FTS</p>
<dl class="method"> <dl class="method">
<dt id="pyFTS.common.Transformations.Transformation.apply"> <dt id="pyFTS.common.Transformations.Transformation.apply">
@ -1433,7 +1433,7 @@ bisect but with a simpler API and support for key functions.</p>
<dl class="class"> <dl class="class">
<dt id="pyFTS.common.flrg.FLRG"> <dt id="pyFTS.common.flrg.FLRG">
<em class="property">class </em><code class="descclassname">pyFTS.common.flrg.</code><code class="descname">FLRG</code><span class="sig-paren">(</span><em>order</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.flrg.FLRG" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.common.flrg.</code><code class="descname">FLRG</code><span class="sig-paren">(</span><em>order</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.flrg.FLRG" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Fuzzy Logical Relationship Group</p> <p>Fuzzy Logical Relationship Group</p>
<p>Group a set of FLRs with the same LHS. Represents the temporal patterns for time t+1 (the RHS fuzzy sets) <p>Group a set of FLRs with the same LHS. Represents the temporal patterns for time t+1 (the RHS fuzzy sets)
when the LHS pattern is identified on time t.</p> when the LHS pattern is identified on time t.</p>
@ -1535,7 +1535,7 @@ when the LHS pattern is identified on time t.</p>
<dl class="class"> <dl class="class">
<dt id="pyFTS.common.fts.FTS"> <dt id="pyFTS.common.fts.FTS">
<em class="property">class </em><code class="descclassname">pyFTS.common.fts.</code><code class="descname">FTS</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.fts.FTS" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.common.fts.</code><code class="descname">FTS</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.fts.FTS" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Fuzzy Time Series object model</p> <p>Fuzzy Time Series object model</p>
<dl class="method"> <dl class="method">
<dt id="pyFTS.common.fts.FTS.append_log"> <dt id="pyFTS.common.fts.FTS.append_log">
@ -1946,14 +1946,14 @@ models that accept the actual values and forecast new ones.</li>
<dl class="class"> <dl class="class">
<dt id="pyFTS.common.tree.FLRGTree"> <dt id="pyFTS.common.tree.FLRGTree">
<em class="property">class </em><code class="descclassname">pyFTS.common.tree.</code><code class="descname">FLRGTree</code><a class="headerlink" href="#pyFTS.common.tree.FLRGTree" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.common.tree.</code><code class="descname">FLRGTree</code><a class="headerlink" href="#pyFTS.common.tree.FLRGTree" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Represents a FLRG set with a tree structure</p> <p>Represents a FLRG set with a tree structure</p>
</dd></dl> </dd></dl>
<dl class="class"> <dl class="class">
<dt id="pyFTS.common.tree.FLRGTreeNode"> <dt id="pyFTS.common.tree.FLRGTreeNode">
<em class="property">class </em><code class="descclassname">pyFTS.common.tree.</code><code class="descname">FLRGTreeNode</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.tree.FLRGTreeNode" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.common.tree.</code><code class="descname">FLRGTreeNode</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.tree.FLRGTreeNode" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Tree node for</p> <p>Tree node for</p>
<dl class="method"> <dl class="method">
<dt id="pyFTS.common.tree.FLRGTreeNode.appendChild"> <dt id="pyFTS.common.tree.FLRGTreeNode.appendChild">

View File

@ -172,7 +172,7 @@ If the file dont already exists, it will be downloaded and decompressed.</p>
<dl class="class"> <dl class="class">
<dt id="pyFTS.data.artificial.SignalEmulator"> <dt id="pyFTS.data.artificial.SignalEmulator">
<em class="property">class </em><code class="descclassname">pyFTS.data.artificial.</code><code class="descname">SignalEmulator</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.data.artificial.SignalEmulator" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.data.artificial.</code><code class="descname">SignalEmulator</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.data.artificial.SignalEmulator" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Emulate a complex signal built from several additive and non-additive components</p> <p>Emulate a complex signal built from several additive and non-additive components</p>
<dl class="method"> <dl class="method">
<dt id="pyFTS.data.artificial.SignalEmulator.blip"> <dt id="pyFTS.data.artificial.SignalEmulator.blip">

View File

@ -265,6 +265,7 @@
<li class="toctree-l2"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Huarng">pyFTS.partitioners.Huarng module</a></li> <li class="toctree-l2"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Huarng">pyFTS.partitioners.Huarng module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Singleton">pyFTS.partitioners.Singleton module</a></li> <li class="toctree-l2"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Singleton">pyFTS.partitioners.Singleton module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Simple">pyFTS.partitioners.Simple module</a></li> <li class="toctree-l2"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Simple">pyFTS.partitioners.Simple module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.partitioners.html#pyfts-partitioners-subclust-module">pyFTS.partitioners.SubClust module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Util">pyFTS.partitioners.Util module</a></li> <li class="toctree-l2"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.Util">pyFTS.partitioners.Util module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.parallel_util">pyFTS.partitioners.parallel_util module</a></li> <li class="toctree-l2"><a class="reference internal" href="pyFTS.partitioners.html#module-pyFTS.partitioners.parallel_util">pyFTS.partitioners.parallel_util module</a></li>
</ul> </ul>

View File

@ -127,7 +127,7 @@
<dl class="class"> <dl class="class">
<dt id="pyFTS.models.multivariate.FLR.FLR"> <dt id="pyFTS.models.multivariate.FLR.FLR">
<em class="property">class </em><code class="descclassname">pyFTS.models.multivariate.FLR.</code><code class="descname">FLR</code><a class="headerlink" href="#pyFTS.models.multivariate.FLR.FLR" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.models.multivariate.FLR.</code><code class="descname">FLR</code><a class="headerlink" href="#pyFTS.models.multivariate.FLR.FLR" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Multivariate Fuzzy Logical Relationship</p> <p>Multivariate Fuzzy Logical Relationship</p>
<dl class="method"> <dl class="method">
<dt id="pyFTS.models.multivariate.FLR.FLR.set_lhs"> <dt id="pyFTS.models.multivariate.FLR.FLR.set_lhs">
@ -206,7 +206,7 @@
<dl class="class"> <dl class="class">
<dt id="pyFTS.models.multivariate.variable.Variable"> <dt id="pyFTS.models.multivariate.variable.Variable">
<em class="property">class </em><code class="descclassname">pyFTS.models.multivariate.variable.</code><code class="descname">Variable</code><span class="sig-paren">(</span><em>name</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.multivariate.variable.Variable" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.models.multivariate.variable.</code><code class="descname">Variable</code><span class="sig-paren">(</span><em>name</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.multivariate.variable.Variable" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>A variable of a fuzzy time series multivariate model. Each variable contains its own <p>A variable of a fuzzy time series multivariate model. Each variable contains its own
transformations and partitioners.</p> transformations and partitioners.</p>
<dl class="method"> <dl class="method">

View File

@ -225,7 +225,7 @@
<dl class="class"> <dl class="class">
<dt id="pyFTS.models.seasonal.SeasonalIndexer.SeasonalIndexer"> <dt id="pyFTS.models.seasonal.SeasonalIndexer.SeasonalIndexer">
<em class="property">class </em><code class="descclassname">pyFTS.models.seasonal.SeasonalIndexer.</code><code class="descname">SeasonalIndexer</code><span class="sig-paren">(</span><em>num_seasons</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.seasonal.SeasonalIndexer.SeasonalIndexer" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.models.seasonal.SeasonalIndexer.</code><code class="descname">SeasonalIndexer</code><span class="sig-paren">(</span><em>num_seasons</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.seasonal.SeasonalIndexer.SeasonalIndexer" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Seasonal Indexer. Responsible to find the seasonal index of a data point inside its data set</p> <p>Seasonal Indexer. Responsible to find the seasonal index of a data point inside its data set</p>
<dl class="method"> <dl class="method">
<dt id="pyFTS.models.seasonal.SeasonalIndexer.SeasonalIndexer.get_data"> <dt id="pyFTS.models.seasonal.SeasonalIndexer.SeasonalIndexer.get_data">
@ -358,7 +358,7 @@
<dl class="class"> <dl class="class">
<dt id="pyFTS.models.seasonal.common.DateTime"> <dt id="pyFTS.models.seasonal.common.DateTime">
<em class="property">class </em><code class="descclassname">pyFTS.models.seasonal.common.</code><code class="descname">DateTime</code><a class="headerlink" href="#pyFTS.models.seasonal.common.DateTime" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.models.seasonal.common.</code><code class="descname">DateTime</code><a class="headerlink" href="#pyFTS.models.seasonal.common.DateTime" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.Enum" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">enum.Enum</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/enum.html#enum.Enum" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">enum.Enum</span></code></a></p>
<p>Data and Time granularity for time granularity and seasonality identification</p> <p>Data and Time granularity for time granularity and seasonality identification</p>
<dl class="attribute"> <dl class="attribute">
<dt id="pyFTS.models.seasonal.common.DateTime.day_of_month"> <dt id="pyFTS.models.seasonal.common.DateTime.day_of_month">

View File

@ -73,6 +73,7 @@
<li><a class="reference internal" href="#module-pyFTS.partitioners.Huarng">pyFTS.partitioners.Huarng module</a></li> <li><a class="reference internal" href="#module-pyFTS.partitioners.Huarng">pyFTS.partitioners.Huarng module</a></li>
<li><a class="reference internal" href="#module-pyFTS.partitioners.Singleton">pyFTS.partitioners.Singleton module</a></li> <li><a class="reference internal" href="#module-pyFTS.partitioners.Singleton">pyFTS.partitioners.Singleton module</a></li>
<li><a class="reference internal" href="#module-pyFTS.partitioners.Simple">pyFTS.partitioners.Simple module</a></li> <li><a class="reference internal" href="#module-pyFTS.partitioners.Simple">pyFTS.partitioners.Simple module</a></li>
<li><a class="reference internal" href="#pyfts-partitioners-subclust-module">pyFTS.partitioners.SubClust module</a></li>
<li><a class="reference internal" href="#module-pyFTS.partitioners.Util">pyFTS.partitioners.Util module</a></li> <li><a class="reference internal" href="#module-pyFTS.partitioners.Util">pyFTS.partitioners.Util module</a></li>
<li><a class="reference internal" href="#module-pyFTS.partitioners.parallel_util">pyFTS.partitioners.parallel_util module</a></li> <li><a class="reference internal" href="#module-pyFTS.partitioners.parallel_util">pyFTS.partitioners.parallel_util module</a></li>
</ul> </ul>
@ -126,7 +127,7 @@
<dl class="class"> <dl class="class">
<dt id="pyFTS.partitioners.partitioner.Partitioner"> <dt id="pyFTS.partitioners.partitioner.Partitioner">
<em class="property">class </em><code class="descclassname">pyFTS.partitioners.partitioner.</code><code class="descname">Partitioner</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.partitioners.partitioner.Partitioner" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.partitioners.partitioner.</code><code class="descname">Partitioner</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.partitioners.partitioner.Partitioner" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Universe of Discourse partitioner. Split data on several fuzzy sets</p> <p>Universe of Discourse partitioner. Split data on several fuzzy sets</p>
<dl class="method"> <dl class="method">
<dt id="pyFTS.partitioners.partitioner.Partitioner.build"> <dt id="pyFTS.partitioners.partitioner.Partitioner.build">
@ -554,6 +555,9 @@ Fuzzy Sets Syst., vol. 123, no. 3, pp. 387394, Nov. 2001.</p>
</dd></dl> </dd></dl>
</div>
<div class="section" id="pyfts-partitioners-subclust-module">
<h2>pyFTS.partitioners.SubClust module<a class="headerlink" href="#pyfts-partitioners-subclust-module" title="Permalink to this headline"></a></h2>
</div> </div>
<div class="section" id="module-pyFTS.partitioners.Util"> <div class="section" id="module-pyFTS.partitioners.Util">
<span id="pyfts-partitioners-util-module"></span><h2>pyFTS.partitioners.Util module<a class="headerlink" href="#module-pyFTS.partitioners.Util" title="Permalink to this headline"></a></h2> <span id="pyfts-partitioners-util-module"></span><h2>pyFTS.partitioners.Util module<a class="headerlink" href="#module-pyFTS.partitioners.Util" title="Permalink to this headline"></a></h2>

View File

@ -111,7 +111,7 @@
<dl class="class"> <dl class="class">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution"> <dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution">
<em class="property">class </em><code class="descclassname">pyFTS.probabilistic.ProbabilityDistribution.</code><code class="descname">ProbabilityDistribution</code><span class="sig-paren">(</span><em>type='KDE'</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.probabilistic.ProbabilityDistribution.</code><code class="descname">ProbabilityDistribution</code><span class="sig-paren">(</span><em>type='KDE'</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Represents a discrete or continous probability distribution <p>Represents a discrete or continous probability distribution
If type is histogram, the PDF is discrete If type is histogram, the PDF is discrete
If type is KDE the PDF is continuous</p> If type is KDE the PDF is continuous</p>
@ -368,7 +368,7 @@ such that Q(tau) = min( {x | F(x) &gt;= tau })</p>
<dl class="class"> <dl class="class">
<dt id="pyFTS.probabilistic.kde.KernelSmoothing"> <dt id="pyFTS.probabilistic.kde.KernelSmoothing">
<em class="property">class </em><code class="descclassname">pyFTS.probabilistic.kde.</code><code class="descname">KernelSmoothing</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.kde.KernelSmoothing" title="Permalink to this definition"></a></dt> <em class="property">class </em><code class="descclassname">pyFTS.probabilistic.kde.</code><code class="descname">KernelSmoothing</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.kde.KernelSmoothing" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Kernel Density Estimation</p> <p>Kernel Density Estimation</p>
<dl class="method"> <dl class="method">
<dt id="pyFTS.probabilistic.kde.KernelSmoothing.kernel_function"> <dt id="pyFTS.probabilistic.kde.KernelSmoothing.kernel_function">

File diff suppressed because one or more lines are too long

View File

@ -76,6 +76,13 @@ pyFTS.partitioners.Simple module
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
pyFTS.partitioners.SubClust module
----------------------------------
.. automodule:: pyFTS.partitioners.SubClust
:members:
:undoc-members:
:show-inheritance:
pyFTS.partitioners.Util module pyFTS.partitioners.Util module
------------------------------ ------------------------------

View File

@ -91,7 +91,7 @@ def format_experiment_table(df, exclude=[], replace={}, csv=True, std=False):
def test_mean_equality(tests, alpha=.05, method='friedman'): def test_mean_equality(tests, alpha=.05, method='friedman'):
''' """
Test for the equality of the means, with alpha confidence level. Test for the equality of the means, with alpha confidence level.
H_0: There's no significant difference between the means H_0: There's no significant difference between the means
@ -101,7 +101,7 @@ def test_mean_equality(tests, alpha=.05, method='friedman'):
:param alpha: :param alpha:
:param method: :param method:
:return: :return:
''' """
from stac.stac import nonparametric_tests as npt from stac.stac import nonparametric_tests as npt
methods = tests.columns[1:] methods = tests.columns[1:]
@ -119,7 +119,10 @@ def test_mean_equality(tests, alpha=.05, method='friedman'):
print("F-Value: {} \tp-Value: {}".format(f_value, p_value)) print("F-Value: {} \tp-Value: {}".format(f_value, p_value))
print("\nH0 is rejected!\n") if p_value < alpha else print("\nH0 is accepted!\n") if p_value < alpha:
print("\nH0 is rejected!\n")
else:
print("\nH0 is accepted!\n")
post_hoc = {} post_hoc = {}
rows = [] rows = []

View File

@ -70,6 +70,8 @@ class FTS(object):
needed to forecast a single step ahead""" needed to forecast a single step ahead"""
self.log = pd.DataFrame([],columns=["Datetime","Operation","Value"]) self.log = pd.DataFrame([],columns=["Datetime","Operation","Value"])
"""""" """"""
self.is_time_variant = False
"""A boolean value indicating if this model is time variant"""
def fuzzy(self, data): def fuzzy(self, data):
""" """
@ -410,7 +412,7 @@ class FTS(object):
""" """
Import the parameters values from other model Import the parameters values from other model
:param model: :param model: a model to clone the parameters
""" """
self.order = model.order self.order = model.order
@ -524,13 +526,37 @@ class FTS(object):
return data return data
def get_UoD(self): def get_UoD(self):
"""
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.
:return: A set with the lower and the upper bounds of the UoD
"""
if self.partitioner is not None: if self.partitioner is not None:
return [self.partitioner.min, self.partitioner.max] return (self.partitioner.min, self.partitioner.max)
else: else:
return [self.original_min, self.original_max] return (self.original_min, self.original_max)
def offset(self):
"""
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.
:return: An integer with the number of lags to skip
"""
if self.is_high_order:
return self.max_lag
else:
return 1
def __str__(self): def __str__(self):
"""String representation of the model""" """
String representation of the model
:return: a string containing the name of the model and the learned rules
(if the model was already trained)
"""
tmp = self.name + ":\n" tmp = self.name + ":\n"
if self.partitioner.type == 'common': if self.partitioner.type == 'common':

View File

@ -47,6 +47,9 @@ class IncrementalEnsembleFTS(ensemble.EnsembleFTS):
self.uod_clip = False self.uod_clip = False
self.max_lag = self.window_length + self.order self.max_lag = self.window_length + self.order
def offset(self):
return self.max_lag
def train(self, data, **kwargs): def train(self, data, **kwargs):
partitioner = self.partitioner_method(data=data, **self.partitioner_params) partitioner = self.partitioner_method(data=data, **self.partitioner_params)

View File

@ -1,5 +1,6 @@
""" """
Meta model that wraps another FTS method and continously retrain it using a data window with the most recent data Meta model that wraps another FTS method and continously retrain it using a data window with
the most recent data
""" """
import numpy as np import numpy as np
@ -9,7 +10,9 @@ from pyFTS.partitioners import Grid
class Retrainer(fts.FTS): class Retrainer(fts.FTS):
""" """
Meta model for incremental/online learning 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'.
""" """
def __init__(self, **kwargs): def __init__(self, **kwargs):
super(Retrainer, self).__init__(**kwargs) super(Retrainer, self).__init__(**kwargs)
@ -35,6 +38,7 @@ class Retrainer(fts.FTS):
self.batch_size = kwargs.get('batch_size', 10) self.batch_size = kwargs.get('batch_size', 10)
"""The batch interval between each retraining""" """The batch interval between each retraining"""
self.is_high_order = True self.is_high_order = True
self.is_time_variant = True
self.uod_clip = False self.uod_clip = False
self.max_lag = self.window_length + self.order self.max_lag = self.window_length + self.order
self.is_wrapper = True self.is_wrapper = True
@ -69,6 +73,9 @@ class Retrainer(fts.FTS):
return ret return ret
def offset(self):
return self.max_lag
def __str__(self): def __str__(self):
"""String representation of the model""" """String representation of the model"""

View File

@ -60,7 +60,7 @@ def subclust(data, ra, rb, eps_sup, eps_inf):
class SubClustPartitioner(partitioner.Partitioner): class SubClustPartitioner(partitioner.Partitioner):
"""SubClust Partitioner""" """Subtractive Clustering Partitioner"""
def __init__(self, **kwargs): def __init__(self, **kwargs):
self.ra = kwargs.get('ra', 0.8) self.ra = kwargs.get('ra', 0.8)
self.rb = kwargs.get('rb', self.ra * 1.5) self.rb = kwargs.get('rb', self.ra * 1.5)