1821 lines
170 KiB
HTML
1821 lines
170 KiB
HTML
|
||
|
||
<!doctype html>
|
||
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>pyFTS.common package — pyFTS 1.7 documentation</title>
|
||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||
<link rel="stylesheet" type="text/css" href="_static/bizstyle.css" />
|
||
|
||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||
<script src="_static/jquery.js"></script>
|
||
<script src="_static/underscore.js"></script>
|
||
<script src="_static/doctools.js"></script>
|
||
<script src="_static/bizstyle.js"></script>
|
||
<link rel="index" title="Index" href="genindex.html" />
|
||
<link rel="search" title="Search" href="search.html" />
|
||
<link rel="next" title="pyFTS.common.transformations package" href="pyFTS.common.transformations.html" />
|
||
<link rel="prev" title="pyFTS.benchmarks package" href="pyFTS.benchmarks.html" />
|
||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||
<!--[if lt IE 9]>
|
||
<script src="_static/css3-mediaqueries.js"></script>
|
||
<![endif]-->
|
||
</head><body>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="pyFTS.common.transformations.html" title="pyFTS.common.transformations package"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="pyFTS.benchmarks.html" title="pyFTS.benchmarks package"
|
||
accesskey="P">previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="index.html">pyFTS 1.7 documentation</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="modules.html" >pyFTS</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="pyFTS.html" accesskey="U">pyFTS package</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">pyFTS.common package</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="pyfts-common-package">
|
||
<h1>pyFTS.common package<a class="headerlink" href="#pyfts-common-package" title="Permalink to this headline">¶</a></h1>
|
||
<div class="section" id="module-pyFTS.common">
|
||
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyFTS.common" title="Permalink to this headline">¶</a></h2>
|
||
</div>
|
||
<div class="section" id="submodules">
|
||
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
|
||
</div>
|
||
<div class="section" id="module-pyFTS.common.Composite">
|
||
<span id="pyfts-common-composite-module"></span><h2>pyFTS.common.Composite module<a class="headerlink" href="#module-pyFTS.common.Composite" title="Permalink to this headline">¶</a></h2>
|
||
<p>Composite Fuzzy Sets</p>
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Composite.FuzzySet">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pyFTS.common.Composite.</span></span><span class="sig-name descname"><span class="pre">FuzzySet</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">superset</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Composite.html#FuzzySet"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Composite.FuzzySet" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#pyFTS.common.FuzzySet.FuzzySet" title="pyFTS.common.FuzzySet.FuzzySet"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.common.FuzzySet.FuzzySet</span></code></a></p>
|
||
<p>Composite Fuzzy Set</p>
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Composite.FuzzySet.append">
|
||
<span class="sig-name descname"><span class="pre">append</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mf</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Composite.html#FuzzySet.append"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Composite.FuzzySet.append" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Adds a new function to composition</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>mf</strong> – </p></li>
|
||
<li><p><strong>parameters</strong> – </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Composite.FuzzySet.append_set">
|
||
<span class="sig-name descname"><span class="pre">append_set</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">set</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Composite.html#FuzzySet.append_set"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Composite.FuzzySet.append_set" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Adds a new function to composition</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>mf</strong> – </p></li>
|
||
<li><p><strong>parameters</strong> – </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Composite.FuzzySet.membership">
|
||
<span class="sig-name descname"><span class="pre">membership</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Composite.html#FuzzySet.membership"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Composite.FuzzySet.membership" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Calculate the membership value of a given input</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>x</strong> – input value</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>membership value of x at this fuzzy set</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Composite.FuzzySet.transform">
|
||
<span class="sig-name descname"><span class="pre">transform</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Composite.html#FuzzySet.transform"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Composite.FuzzySet.transform" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Preprocess the data point for non native types</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>x</strong> – </p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>return a native type value for the structured type</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-pyFTS.common.FLR">
|
||
<span id="pyfts-common-flr-module"></span><h2>pyFTS.common.FLR module<a class="headerlink" href="#module-pyFTS.common.FLR" title="Permalink to this headline">¶</a></h2>
|
||
<p>This module implements functions for Fuzzy Logical Relationship generation</p>
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FLR.FLR">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pyFTS.common.FLR.</span></span><span class="sig-name descname"><span class="pre">FLR</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">LHS</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">RHS</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FLR.html#FLR"><span class="viewcode-link"><span class="pre">[source]</span></span></a><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.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></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>
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FLR.FLR.LHS">
|
||
<span class="sig-name descname"><span class="pre">LHS</span></span><a class="headerlink" href="#pyFTS.common.FLR.FLR.LHS" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Left Hand Side fuzzy set</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FLR.FLR.RHS">
|
||
<span class="sig-name descname"><span class="pre">RHS</span></span><a class="headerlink" href="#pyFTS.common.FLR.FLR.RHS" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Right Hand Side fuzzy set</p>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FLR.IndexedFLR">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pyFTS.common.FLR.</span></span><span class="sig-name descname"><span class="pre">IndexedFLR</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">index</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">LHS</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">RHS</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FLR.html#IndexedFLR"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FLR.IndexedFLR" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bases: <a class="reference internal" href="#pyFTS.common.FLR.FLR" title="pyFTS.common.FLR.FLR"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.common.FLR.FLR</span></code></a></p>
|
||
<p>Season Indexed Fuzzy Logical Relationship</p>
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FLR.IndexedFLR.index">
|
||
<span class="sig-name descname"><span class="pre">index</span></span><a class="headerlink" href="#pyFTS.common.FLR.IndexedFLR.index" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>seasonal index</p>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FLR.generate_high_order_recurrent_flr">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FLR.</span></span><span class="sig-name descname"><span class="pre">generate_high_order_recurrent_flr</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fuzzyData</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FLR.html#generate_high_order_recurrent_flr"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FLR.generate_high_order_recurrent_flr" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Create a ordered FLR set from a list of fuzzy sets with recurrence</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>fuzzyData</strong> – ordered list of fuzzy sets</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>ordered list of FLR</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FLR.generate_indexed_flrs">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FLR.</span></span><span class="sig-name descname"><span class="pre">generate_indexed_flrs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sets</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">indexer</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">transformation</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">alpha_cut</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FLR.html#generate_indexed_flrs"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FLR.generate_indexed_flrs" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Create a season-indexed ordered FLR set from a list of fuzzy sets with recurrence</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>sets</strong> – fuzzy sets</p></li>
|
||
<li><p><strong>indexer</strong> – seasonality indexer</p></li>
|
||
<li><p><strong>data</strong> – original data</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>ordered list of FLR</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FLR.generate_non_recurrent_flrs">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FLR.</span></span><span class="sig-name descname"><span class="pre">generate_non_recurrent_flrs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fuzzyData</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">steps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FLR.html#generate_non_recurrent_flrs"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FLR.generate_non_recurrent_flrs" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Create a ordered FLR set from a list of fuzzy sets without recurrence</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>fuzzyData</strong> – ordered list of fuzzy sets</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>ordered list of FLR</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FLR.generate_recurrent_flrs">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FLR.</span></span><span class="sig-name descname"><span class="pre">generate_recurrent_flrs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fuzzyData</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">steps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FLR.html#generate_recurrent_flrs"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FLR.generate_recurrent_flrs" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Create a ordered FLR set from a list of fuzzy sets with recurrence</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>fuzzyData</strong> – ordered list of fuzzy sets</p></li>
|
||
<li><p><strong>steps</strong> – the number of steps ahead on the right side of FLR</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>ordered list of FLR</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-pyFTS.common.FuzzySet">
|
||
<span id="pyfts-common-fuzzyset-module"></span><h2>pyFTS.common.FuzzySet module<a class="headerlink" href="#module-pyFTS.common.FuzzySet" title="Permalink to this headline">¶</a></h2>
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.FuzzySet">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">FuzzySet</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><span class="pre">str</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">mf</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parameters</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">centroid</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.10)"><span class="pre">float</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">alpha</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.10)"><span class="pre">float</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">1.0</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#FuzzySet"><span class="viewcode-link"><span class="pre">[source]</span></span></a><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.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
|
||
<p>Fuzzy Set</p>
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.FuzzySet.Z">
|
||
<span class="sig-name descname"><span class="pre">Z</span></span><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.Z" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Partition function in respect to the membership function</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.FuzzySet.alpha">
|
||
<span class="sig-name descname"><span class="pre">alpha</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.10)"><span class="pre">float</span></a></em><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.alpha" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The alpha cut value</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.FuzzySet.centroid">
|
||
<span class="sig-name descname"><span class="pre">centroid</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.10)"><span class="pre">float</span></a></em><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.centroid" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The fuzzy set center of mass (or midpoint)</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.FuzzySet.membership">
|
||
<span class="sig-name descname"><span class="pre">membership</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#FuzzySet.membership"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.membership" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Calculate the membership value of a given input</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>x</strong> – input value</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>membership value of x at this fuzzy set</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.FuzzySet.mf">
|
||
<span class="sig-name descname"><span class="pre">mf</span></span><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.mf" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The membership function</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.FuzzySet.name">
|
||
<span class="sig-name descname"><span class="pre">name</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><span class="pre">str</span></a></em><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.name" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The fuzzy set name</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.FuzzySet.parameters">
|
||
<span class="sig-name descname"><span class="pre">parameters</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></em><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.parameters" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The parameters of the membership function</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.FuzzySet.partition_function">
|
||
<span class="sig-name descname"><span class="pre">partition_function</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">uod</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nbins</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">100</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#FuzzySet.partition_function"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.partition_function" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Calculate the partition function over the membership function.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>uod</strong> – </p></li>
|
||
<li><p><strong>nbins</strong> – </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.FuzzySet.transform">
|
||
<span class="sig-name descname"><span class="pre">transform</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#FuzzySet.transform"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.transform" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Preprocess the data point for non native types</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>x</strong> – </p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>return a native type value for the structured type</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.FuzzySet.type">
|
||
<span class="sig-name descname"><span class="pre">type</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><span class="pre">str</span></a></em><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.type" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The fuzzy set type (common, composite, nonstationary, etc)</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.FuzzySet.variable">
|
||
<span class="sig-name descname"><span class="pre">variable</span></span><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.variable" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>In multivariate time series, indicate for which variable this fuzzy set belogs</p>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.check_bounds">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">check_bounds</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fuzzy_sets</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ordered_sets</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#check_bounds"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.check_bounds" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.check_bounds_index">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">check_bounds_index</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fuzzy_sets</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ordered_sets</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#check_bounds_index"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.check_bounds_index" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.fuzzyfy">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">fuzzyfy</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">partitioner</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#fuzzyfy"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.fuzzyfy" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A general method for fuzzyfication.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>data</strong> – input value to be fuzzyfied</p></li>
|
||
<li><p><strong>partitioner</strong> – a trained pyFTS.partitioners.Partitioner object</p></li>
|
||
<li><p><strong>kwargs</strong> – dict, optional arguments</p></li>
|
||
<li><p><strong>alpha_cut</strong> – the minimal membership value to be considered on fuzzyfication (only for mode=’sets’)</p></li>
|
||
<li><p><strong>method</strong> – the fuzzyfication method (fuzzy: all fuzzy memberships, maximum: only the maximum membership)</p></li>
|
||
<li><p><strong>mode</strong> – the fuzzyfication mode (sets: return the fuzzy sets names, vector: return a vector with the membership</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
<p>values for all fuzzy sets, both: return a list with tuples (fuzzy set, membership value) )
|
||
:returns a list with the fuzzyfied values, depending on the mode</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.fuzzyfy_instance">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">fuzzyfy_instance</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inst</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fuzzy_sets</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><span class="pre">dict</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">ordered_sets</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.10)"><span class="pre">Optional</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#fuzzyfy_instance"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.fuzzyfy_instance" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Calculate the membership values for a data point given fuzzy sets</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>inst</strong> – data point</p></li>
|
||
<li><p><strong>fuzzy_sets</strong> – a dictionary where the key is the fuzzy set name and the value is the fuzzy set object.</p></li>
|
||
<li><p><strong>ordered_sets</strong> – a list with the fuzzy sets names ordered by their centroids.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>array of membership values</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.fuzzyfy_instances">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">fuzzyfy_instances</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">fuzzy_sets</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><span class="pre">dict</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">ordered_sets</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#fuzzyfy_instances"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.fuzzyfy_instances" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Calculate the membership values for a data point given fuzzy sets</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>inst</strong> – data point</p></li>
|
||
<li><p><strong>fuzzy_sets</strong> – a dictionary where the key is the fuzzy set name and the value is the fuzzy set object.</p></li>
|
||
<li><p><strong>ordered_sets</strong> – a list with the fuzzy sets names ordered by their centroids.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>array of membership values</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.fuzzyfy_series">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">fuzzyfy_series</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fuzzy_sets</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">method</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'maximum'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">alpha_cut</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ordered_sets</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#fuzzyfy_series"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.fuzzyfy_series" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.fuzzyfy_series_old">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">fuzzyfy_series_old</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fuzzy_sets</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">method</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'maximum'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#fuzzyfy_series_old"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.fuzzyfy_series_old" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.get_fuzzysets">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">get_fuzzysets</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inst</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fuzzy_sets</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><span class="pre">dict</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">ordered_sets</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Optional" title="(in Python v3.10)"><span class="pre">Optional</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">alpha_cut</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.10)"><span class="pre">float</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">0.0</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#get_fuzzysets"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.get_fuzzysets" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Return the fuzzy sets which membership value for a inst is greater than the alpha_cut</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>inst</strong> – data point</p></li>
|
||
<li><p><strong>fuzzy_sets</strong> – a dictionary where the key is the fuzzy set name and the value is the fuzzy set object.</p></li>
|
||
<li><p><strong>ordered_sets</strong> – a list with the fuzzy sets names ordered by their centroids.</p></li>
|
||
<li><p><strong>alpha_cut</strong> – Minimal membership to be considered on fuzzyfication process</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>array of membership values</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.get_maximum_membership_fuzzyset">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">get_maximum_membership_fuzzyset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inst</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fuzzy_sets</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ordered_sets</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference internal" href="#pyFTS.common.FuzzySet.FuzzySet" title="pyFTS.common.FuzzySet.FuzzySet"><span class="pre">pyFTS.common.FuzzySet.FuzzySet</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#get_maximum_membership_fuzzyset"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.get_maximum_membership_fuzzyset" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Fuzzify a data point, returning the fuzzy set with maximum membership value</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>inst</strong> – data point</p></li>
|
||
<li><p><strong>fuzzy_sets</strong> – a dictionary where the key is the fuzzy set name and the value is the fuzzy set object.</p></li>
|
||
<li><p><strong>ordered_sets</strong> – a list with the fuzzy sets names ordered by their centroids.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>fuzzy set with maximum membership</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.get_maximum_membership_fuzzyset_index">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">get_maximum_membership_fuzzyset_index</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">inst</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fuzzy_sets</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><span class="pre">int</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#get_maximum_membership_fuzzyset_index"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.get_maximum_membership_fuzzyset_index" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Fuzzify a data point, returning the fuzzy set with maximum membership value</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>inst</strong> – data point</p></li>
|
||
<li><p><strong>fuzzy_sets</strong> – dict of fuzzy sets</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>fuzzy set with maximum membership</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.grant_bounds">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">grant_bounds</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fuzzy_sets</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ordered_sets</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#grant_bounds"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.grant_bounds" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.FuzzySet.set_ordered">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.FuzzySet.</span></span><span class="sig-name descname"><span class="pre">set_ordered</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fuzzy_sets</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#set_ordered"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.FuzzySet.set_ordered" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Order a fuzzy set list by their centroids</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>fuzzy_sets</strong> – a dictionary where the key is the fuzzy set name and the value is the fuzzy set object.</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>a list with the fuzzy sets names ordered by their centroids.</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-pyFTS.common.Membership">
|
||
<span id="pyfts-common-membership-module"></span><h2>pyFTS.common.Membership module<a class="headerlink" href="#module-pyFTS.common.Membership" title="Permalink to this headline">¶</a></h2>
|
||
<p>Membership functions for Fuzzy Sets</p>
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Membership.bellmf">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Membership.</span></span><span class="sig-name descname"><span class="pre">bellmf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Membership.html#bellmf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Membership.bellmf" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Bell shaped membership function</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>x</strong> – </p></li>
|
||
<li><p><strong>parameters</strong> – </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Membership.gaussmf">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Membership.</span></span><span class="sig-name descname"><span class="pre">gaussmf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Membership.html#gaussmf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Membership.gaussmf" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Gaussian fuzzy membership function</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>x</strong> – data point</p></li>
|
||
<li><p><strong>parameters</strong> – a list with 2 real values (mean and variance)</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>the membership value of x given the parameters</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Membership.sigmf">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Membership.</span></span><span class="sig-name descname"><span class="pre">sigmf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Membership.html#sigmf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Membership.sigmf" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Sigmoid / Logistic membership function</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>x</strong> – </p></li>
|
||
<li><p><strong>parameters</strong> – an list with 2 real values (smoothness and midpoint)</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
<p>:return</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Membership.singleton">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Membership.</span></span><span class="sig-name descname"><span class="pre">singleton</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Membership.html#singleton"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Membership.singleton" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Singleton membership function, a single value fuzzy function</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>x</strong> – </p></li>
|
||
<li><p><strong>parameters</strong> – a list with one real value</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
<p>:returns</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Membership.trapmf">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Membership.</span></span><span class="sig-name descname"><span class="pre">trapmf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Membership.html#trapmf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Membership.trapmf" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Trapezoidal fuzzy membership function</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>x</strong> – data point</p></li>
|
||
<li><p><strong>parameters</strong> – a list with 4 real values</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>the membership value of x given the parameters</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Membership.trimf">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Membership.</span></span><span class="sig-name descname"><span class="pre">trimf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Membership.html#trimf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Membership.trimf" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Triangular fuzzy membership function</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>x</strong> – data point</p></li>
|
||
<li><p><strong>parameters</strong> – a list with 3 real values</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>the membership value of x given the parameters</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-pyFTS.common.SortedCollection">
|
||
<span id="pyfts-common-sortedcollection-module"></span><h2>pyFTS.common.SortedCollection module<a class="headerlink" href="#module-pyFTS.common.SortedCollection" title="Permalink to this headline">¶</a></h2>
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pyFTS.common.SortedCollection.</span></span><span class="sig-name descname"><span class="pre">SortedCollection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">iterable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">()</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">key</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection"><span class="viewcode-link"><span class="pre">[source]</span></span></a><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.10)"><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>SortedCollection() is much easier to work with than using bisect() directly.
|
||
It supports key functions like those use in sorted(), min(), and max().
|
||
The result of the key function call is saved so that keys can be searched
|
||
efficiently.</p>
|
||
<p>Instead of returning an insertion-point which can be hard to interpret, the
|
||
five find-methods return a specific item in the sequence. They can scan for
|
||
exact matches, the last item less-than-or-equal to a key, or the first item
|
||
greater-than-or-equal to a key.</p>
|
||
<p>Once found, an item’s ordinal position can be located with the index() method.
|
||
New items can be added with the insert() and insert_right() methods.
|
||
Old items can be deleted with the remove() method.</p>
|
||
<p>The usual sequence methods are provided to support indexing, slicing,
|
||
length lookup, clearing, copying, forward and reverse iteration, contains
|
||
checking, item counts, item removal, and a nice looking repr.</p>
|
||
<p>Finding and indexing are O(log n) operations while iteration and insertion
|
||
are O(n). The initial sort is O(n log n).</p>
|
||
<p>The key function is stored in the ‘key’ attibute for easy introspection or
|
||
so that you can assign a new key function (triggering an automatic re-sort).</p>
|
||
<p>In short, the class was designed to handle all of the common use cases for
|
||
bisect but with a simpler API and support for key functions.</p>
|
||
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pprint</span> <span class="k">import</span> <span class="n">pprint</span>
|
||
<span class="gp">>>> </span><span class="kn">from</span> <span class="nn">operator</span> <span class="k">import</span> <span class="n">itemgetter</span>
|
||
</pre></div>
|
||
</div>
|
||
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">s</span> <span class="o">=</span> <span class="n">SortedCollection</span><span class="p">(</span><span class="n">key</span><span class="o">=</span><span class="n">itemgetter</span><span class="p">(</span><span class="mi">2</span><span class="p">))</span>
|
||
<span class="gp">>>> </span><span class="k">for</span> <span class="n">record</span> <span class="ow">in</span> <span class="p">[</span>
|
||
<span class="gp">... </span> <span class="p">(</span><span class="s1">'roger'</span><span class="p">,</span> <span class="s1">'young'</span><span class="p">,</span> <span class="mi">30</span><span class="p">),</span>
|
||
<span class="gp">... </span> <span class="p">(</span><span class="s1">'angela'</span><span class="p">,</span> <span class="s1">'jones'</span><span class="p">,</span> <span class="mi">28</span><span class="p">),</span>
|
||
<span class="gp">... </span> <span class="p">(</span><span class="s1">'bill'</span><span class="p">,</span> <span class="s1">'smith'</span><span class="p">,</span> <span class="mi">22</span><span class="p">),</span>
|
||
<span class="gp">... </span> <span class="p">(</span><span class="s1">'david'</span><span class="p">,</span> <span class="s1">'thomas'</span><span class="p">,</span> <span class="mi">32</span><span class="p">)]:</span>
|
||
<span class="gp">... </span> <span class="n">s</span><span class="o">.</span><span class="n">insert</span><span class="p">(</span><span class="n">record</span><span class="p">)</span>
|
||
</pre></div>
|
||
</div>
|
||
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">pprint</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">s</span><span class="p">))</span> <span class="c1"># show records sorted by age</span>
|
||
<span class="go">[('bill', 'smith', 22),</span>
|
||
<span class="go"> ('angela', 'jones', 28),</span>
|
||
<span class="go"> ('roger', 'young', 30),</span>
|
||
<span class="go"> ('david', 'thomas', 32)]</span>
|
||
</pre></div>
|
||
</div>
|
||
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">s</span><span class="o">.</span><span class="n">find_le</span><span class="p">(</span><span class="mi">29</span><span class="p">)</span> <span class="c1"># find oldest person aged 29 or younger</span>
|
||
<span class="go">('angela', 'jones', 28)</span>
|
||
<span class="gp">>>> </span><span class="n">s</span><span class="o">.</span><span class="n">find_lt</span><span class="p">(</span><span class="mi">28</span><span class="p">)</span> <span class="c1"># find oldest person under 28</span>
|
||
<span class="go">('bill', 'smith', 22)</span>
|
||
<span class="gp">>>> </span><span class="n">s</span><span class="o">.</span><span class="n">find_gt</span><span class="p">(</span><span class="mi">28</span><span class="p">)</span> <span class="c1"># find youngest person over 28</span>
|
||
<span class="go">('roger', 'young', 30)</span>
|
||
</pre></div>
|
||
</div>
|
||
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">r</span> <span class="o">=</span> <span class="n">s</span><span class="o">.</span><span class="n">find_ge</span><span class="p">(</span><span class="mi">32</span><span class="p">)</span> <span class="c1"># find youngest person aged 32 or older</span>
|
||
<span class="gp">>>> </span><span class="n">s</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="n">r</span><span class="p">)</span> <span class="c1"># get the index of their record</span>
|
||
<span class="go">3</span>
|
||
<span class="gp">>>> </span><span class="n">s</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="c1"># fetch the record at that index</span>
|
||
<span class="go">('david', 'thomas', 32)</span>
|
||
</pre></div>
|
||
</div>
|
||
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">s</span><span class="o">.</span><span class="n">key</span> <span class="o">=</span> <span class="n">itemgetter</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="c1"># now sort by first name</span>
|
||
<span class="gp">>>> </span><span class="n">pprint</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">s</span><span class="p">))</span>
|
||
<span class="go">[('angela', 'jones', 28),</span>
|
||
<span class="go"> ('bill', 'smith', 22),</span>
|
||
<span class="go"> ('david', 'thomas', 32),</span>
|
||
<span class="go"> ('roger', 'young', 30)]</span>
|
||
</pre></div>
|
||
</div>
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.around">
|
||
<span class="sig-name descname"><span class="pre">around</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">k</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.around"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.around" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.between">
|
||
<span class="sig-name descname"><span class="pre">between</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ge</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">le</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.between"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.between" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.clear">
|
||
<span class="sig-name descname"><span class="pre">clear</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.clear"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.clear" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.copy">
|
||
<span class="sig-name descname"><span class="pre">copy</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.copy"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.copy" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.count">
|
||
<span class="sig-name descname"><span class="pre">count</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">item</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.count"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.count" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Return number of occurrences of item</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.find">
|
||
<span class="sig-name descname"><span class="pre">find</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">k</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.find"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.find" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Return first item with a key == k. Raise ValueError if not found.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.find_ge">
|
||
<span class="sig-name descname"><span class="pre">find_ge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">k</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.find_ge"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.find_ge" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Return first item with a key >= equal to k. Raise ValueError if not found</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.find_gt">
|
||
<span class="sig-name descname"><span class="pre">find_gt</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">k</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.find_gt"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.find_gt" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Return first item with a key > k. Raise ValueError if not found</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.find_le">
|
||
<span class="sig-name descname"><span class="pre">find_le</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">k</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.find_le"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.find_le" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Return last item with a key <= k. Raise ValueError if not found.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.find_lt">
|
||
<span class="sig-name descname"><span class="pre">find_lt</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">k</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.find_lt"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.find_lt" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Return last item with a key < k. Raise ValueError if not found.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.index">
|
||
<span class="sig-name descname"><span class="pre">index</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">item</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.index"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.index" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Find the position of an item. Raise ValueError if not found.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.insert">
|
||
<span class="sig-name descname"><span class="pre">insert</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">item</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.insert"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.insert" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Insert a new item. If equal keys are found, add to the left</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.insert_right">
|
||
<span class="sig-name descname"><span class="pre">insert_right</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">item</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.insert_right"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.insert_right" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Insert a new item. If equal keys are found, add to the right</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.inside">
|
||
<span class="sig-name descname"><span class="pre">inside</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ge</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">le</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.inside"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.inside" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py property">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.key">
|
||
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">key</span></span><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.key" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>key function</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.SortedCollection.SortedCollection.remove">
|
||
<span class="sig-name descname"><span class="pre">remove</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">item</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/SortedCollection.html#SortedCollection.remove"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.SortedCollection.SortedCollection.remove" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Remove first occurence of item. Raise ValueError if not found</p>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-pyFTS.common.Util">
|
||
<span id="pyfts-common-util-module"></span><h2>pyFTS.common.Util module<a class="headerlink" href="#module-pyFTS.common.Util" title="Permalink to this headline">¶</a></h2>
|
||
<p>Common facilities for pyFTS</p>
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.current_milli_time">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">current_milli_time</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.common.Util.current_milli_time" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.draw_sets_on_axis">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">draw_sets_on_axis</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">axis</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">model</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">size</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#draw_sets_on_axis"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.draw_sets_on_axis" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.enumerate2">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">enumerate2</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">step</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#enumerate2"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.enumerate2" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.load_env">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">load_env</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#load_env"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.load_env" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.load_obj">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">load_obj</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#load_obj"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.load_obj" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Load to memory an object stored filesystem. This function depends on Dill package</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>file</strong> – file name where the object is stored</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>object</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.persist_env">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">persist_env</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#persist_env"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.persist_env" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Persist an entire environment on file. This function depends on Dill package</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>file</strong> – file name to store the environment</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.persist_obj">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">persist_obj</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">file</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#persist_obj"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.persist_obj" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Persist an object on filesystem. This function depends on Dill package</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>obj</strong> – object on memory</p></li>
|
||
<li><p><strong>file</strong> – file name to store the object</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.plot_compared_intervals_ahead">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">plot_compared_intervals_ahead</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">original</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">models</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">colors</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">distributions</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">time_from</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">time_to</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intervals</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">save</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">file</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tam</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">[20,</span> <span class="pre">5]</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">resolution</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cmap</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'Blues'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">linewidth</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1.5</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#plot_compared_intervals_ahead"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.plot_compared_intervals_ahead" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Plot the forecasts of several one step ahead models, by point or by interval</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>original</strong> – Original time series data (list)</p></li>
|
||
<li><p><strong>models</strong> – List of models to compare</p></li>
|
||
<li><p><strong>colors</strong> – List of models colors</p></li>
|
||
<li><p><strong>distributions</strong> – True to plot a distribution</p></li>
|
||
<li><p><strong>time_from</strong> – index of data poit to start the ahead forecasting</p></li>
|
||
<li><p><strong>time_to</strong> – number of steps ahead to forecast</p></li>
|
||
<li><p><strong>interpol</strong> – Fill space between distribution plots</p></li>
|
||
<li><p><strong>save</strong> – Save the picture on file</p></li>
|
||
<li><p><strong>file</strong> – Filename to save the picture</p></li>
|
||
<li><p><strong>tam</strong> – Size of the picture</p></li>
|
||
<li><p><strong>resolution</strong> – </p></li>
|
||
<li><p><strong>cmap</strong> – Color map to be used on distribution plot</p></li>
|
||
<li><p><strong>option</strong> – Distribution type to be passed for models</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.plot_density_rectange">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">plot_density_rectange</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ax</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cmap</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">density</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fig</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">resolution</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">time_from</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">time_to</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#plot_density_rectange"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.plot_density_rectange" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Auxiliar function to plot_compared_intervals_ahead</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.plot_distribution">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">plot_distribution</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ax</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cmap</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">probabilitydist</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fig</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">time_from</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">reference_data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#plot_distribution"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.plot_distribution" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Plot forecasted ProbabilityDistribution objects on a matplotlib axis</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>ax</strong> – matplotlib axis</p></li>
|
||
<li><p><strong>cmap</strong> – matplotlib colormap name</p></li>
|
||
<li><p><strong>probabilitydist</strong> – list of ProbabilityDistribution objects</p></li>
|
||
<li><p><strong>fig</strong> – matplotlib figure</p></li>
|
||
<li><p><strong>time_from</strong> – starting time (on x axis) to begin the plots</p></li>
|
||
<li><p><strong>reference_data</strong> – </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.plot_distribution2">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">plot_distribution2</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">probabilitydist</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#plot_distribution2"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.plot_distribution2" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Plot distributions in y-axis over the time (x-axis)</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>probabilitydist</strong> – the forecasted probability distributions to plot</p></li>
|
||
<li><p><strong>data</strong> – the original test sample</p></li>
|
||
<li><p><strong>start_at</strong> – the time index (inside of data) to start to plot the probability distributions</p></li>
|
||
<li><p><strong>ax</strong> – a matplotlib axis. If no value was provided a new axis is created.</p></li>
|
||
<li><p><strong>cmap</strong> – a matplotlib colormap name, the default value is ‘Blues’</p></li>
|
||
<li><p><strong>quantiles</strong> – the list of quantiles intervals to plot, e. g. [.05, .25, .75, .95]</p></li>
|
||
<li><p><strong>median</strong> – a boolean value indicating if the median value will be plot.</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.plot_distribution_tiled">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">plot_distribution_tiled</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">distributions</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rows</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cols</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">5</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">index</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">axis</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">[10,</span> <span class="pre">20]</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#plot_distribution_tiled"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.plot_distribution_tiled" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Plot one distribution individually in each axis, with probability in y-axis and UoD on x-axis</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>distributions</strong> – </p></li>
|
||
<li><p><strong>data</strong> – </p></li>
|
||
<li><p><strong>rows</strong> – </p></li>
|
||
<li><p><strong>cols</strong> – </p></li>
|
||
<li><p><strong>index</strong> – </p></li>
|
||
<li><p><strong>axis</strong> – </p></li>
|
||
<li><p><strong>size</strong> – </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.plot_interval">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">plot_interval</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">axis</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">intervals</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">order</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">label</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">color</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'red'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">typeonlegend</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ls</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'-'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">linewidth</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#plot_interval"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.plot_interval" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Plot forecasted intervals on matplotlib</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>axis</strong> – matplotlib axis</p></li>
|
||
<li><p><strong>intervals</strong> – list of forecasted intervals</p></li>
|
||
<li><p><strong>order</strong> – order of the model that create the forecasts</p></li>
|
||
<li><p><strong>label</strong> – figure label</p></li>
|
||
<li><p><strong>color</strong> – matplotlib color name</p></li>
|
||
<li><p><strong>typeonlegend</strong> – </p></li>
|
||
<li><p><strong>ls</strong> – matplotlib line style</p></li>
|
||
<li><p><strong>linewidth</strong> – matplotlib width</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.plot_interval2">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">plot_interval2</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">intervals</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#plot_interval2"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.plot_interval2" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Plot forecasted intervals on matplotlib</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>intervals</strong> – list of forecasted intervals</p></li>
|
||
<li><p><strong>data</strong> – the original test sample</p></li>
|
||
<li><p><strong>start_at</strong> – the time index (inside of data) to start to plot the intervals</p></li>
|
||
<li><p><strong>label</strong> – figure label</p></li>
|
||
<li><p><strong>color</strong> – matplotlib color name</p></li>
|
||
<li><p><strong>typeonlegend</strong> – </p></li>
|
||
<li><p><strong>ls</strong> – matplotlib line style</p></li>
|
||
<li><p><strong>linewidth</strong> – matplotlib width</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.plot_probability_distributions">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">plot_probability_distributions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pmfs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lcolors</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tam</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">[15,</span> <span class="pre">7]</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#plot_probability_distributions"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.plot_probability_distributions" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.plot_rules">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">plot_rules</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">model</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">size</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">[5,</span> <span class="pre">5]</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">axis</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rules_by_axis</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">columns</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#plot_rules"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.plot_rules" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Plot the FLRG rules of a FTS model on a matplotlib axis</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>model</strong> – FTS model</p></li>
|
||
<li><p><strong>size</strong> – figure size</p></li>
|
||
<li><p><strong>axis</strong> – matplotlib axis</p></li>
|
||
<li><p><strong>rules_by_axis</strong> – number of rules plotted by column</p></li>
|
||
<li><p><strong>columns</strong> – number of columns</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.show_and_save_image">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">show_and_save_image</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">fig</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">file</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">flag</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lgd</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#show_and_save_image"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.show_and_save_image" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Show and image and save on file</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>fig</strong> – Matplotlib Figure object</p></li>
|
||
<li><p><strong>file</strong> – filename to save the picture</p></li>
|
||
<li><p><strong>flag</strong> – if True the image will be saved</p></li>
|
||
<li><p><strong>lgd</strong> – legend</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.sliding_window">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">sliding_window</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">windowsize</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">train</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.8</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">inc</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.1</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#sliding_window"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.sliding_window" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Sliding window method of cross validation for time series</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>data</strong> – the entire dataset</p></li>
|
||
<li><p><strong>windowsize</strong> – window size</p></li>
|
||
<li><p><strong>train</strong> – percentual of the window size will be used for training the models</p></li>
|
||
<li><p><strong>inc</strong> – percentual of data used for slide the window</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>window count, training set, test set</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.Util.uniquefilename">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.Util.</span></span><span class="sig-name descname"><span class="pre">uniquefilename</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Util.html#uniquefilename"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.Util.uniquefilename" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-pyFTS.common.flrg">
|
||
<span id="pyfts-common-flrg-module"></span><h2>pyFTS.common.flrg module<a class="headerlink" href="#module-pyFTS.common.flrg" title="Permalink to this headline">¶</a></h2>
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="pyFTS.common.flrg.FLRG">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pyFTS.common.flrg.</span></span><span class="sig-name descname"><span class="pre">FLRG</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">order</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/flrg.html#FLRG"><span class="viewcode-link"><span class="pre">[source]</span></span></a><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.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
|
||
<p>Fuzzy Logical Relationship Group</p>
|
||
<p>Group a set of FLR’s 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>
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.flrg.FLRG.LHS">
|
||
<span class="sig-name descname"><span class="pre">LHS</span></span><a class="headerlink" href="#pyFTS.common.flrg.FLRG.LHS" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Left Hand Side of the rule</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.flrg.FLRG.RHS">
|
||
<span class="sig-name descname"><span class="pre">RHS</span></span><a class="headerlink" href="#pyFTS.common.flrg.FLRG.RHS" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Right Hand Side of the rule</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.flrg.FLRG.append_rhs">
|
||
<span class="sig-name descname"><span class="pre">append_rhs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">set</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/flrg.html#FLRG.append_rhs"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.flrg.FLRG.append_rhs" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.flrg.FLRG.get_key">
|
||
<span class="sig-name descname"><span class="pre">get_key</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/flrg.html#FLRG.get_key"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.flrg.FLRG.get_key" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Returns a unique identifier for this FLRG</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.flrg.FLRG.get_lower">
|
||
<span class="sig-name descname"><span class="pre">get_lower</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sets</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/flrg.html#FLRG.get_lower"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.flrg.FLRG.get_lower" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Returns the lower bound value for the RHS fuzzy sets</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>sets</strong> – fuzzy sets</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>lower bound value</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.flrg.FLRG.get_membership">
|
||
<span class="sig-name descname"><span class="pre">get_membership</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sets</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/flrg.html#FLRG.get_membership"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.flrg.FLRG.get_membership" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Returns the membership value of the FLRG for the input data</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>data</strong> – input data</p></li>
|
||
<li><p><strong>sets</strong> – fuzzy sets</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>the membership value</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.flrg.FLRG.get_midpoint">
|
||
<span class="sig-name descname"><span class="pre">get_midpoint</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sets</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/flrg.html#FLRG.get_midpoint"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.flrg.FLRG.get_midpoint" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Returns the midpoint value for the RHS fuzzy sets</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>sets</strong> – fuzzy sets</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>the midpoint value</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.flrg.FLRG.get_midpoints">
|
||
<span class="sig-name descname"><span class="pre">get_midpoints</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sets</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/flrg.html#FLRG.get_midpoints"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.flrg.FLRG.get_midpoints" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.flrg.FLRG.get_upper">
|
||
<span class="sig-name descname"><span class="pre">get_upper</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">sets</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/flrg.html#FLRG.get_upper"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.flrg.FLRG.get_upper" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Returns the upper bound value for the RHS fuzzy sets</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>sets</strong> – fuzzy sets</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>upper bound value</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.flrg.FLRG.order">
|
||
<span class="sig-name descname"><span class="pre">order</span></span><a class="headerlink" href="#pyFTS.common.flrg.FLRG.order" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Number of lags on LHS</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.flrg.FLRG.reset_calculated_values">
|
||
<span class="sig-name descname"><span class="pre">reset_calculated_values</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/flrg.html#FLRG.reset_calculated_values"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.flrg.FLRG.reset_calculated_values" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-pyFTS.common.fts">
|
||
<span id="pyfts-common-fts-module"></span><h2>pyFTS.common.fts module<a class="headerlink" href="#module-pyFTS.common.fts" title="Permalink to this headline">¶</a></h2>
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pyFTS.common.fts.</span></span><span class="sig-name descname"><span class="pre">FTS</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS"><span class="viewcode-link"><span class="pre">[source]</span></span></a><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.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
|
||
<p>Fuzzy Time Series object model</p>
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.alpha_cut">
|
||
<span class="sig-name descname"><span class="pre">alpha_cut</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.10)"><span class="pre">float</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.alpha_cut" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A float with the minimal membership to be considered on fuzzyfication process</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.append_log">
|
||
<span class="sig-name descname"><span class="pre">append_log</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">operation</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.append_log"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.append_log" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.append_rule">
|
||
<span class="sig-name descname"><span class="pre">append_rule</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">flrg</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.append_rule"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.append_rule" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Append FLRG rule to the model</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>flrg</strong> – rule</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.append_transformation">
|
||
<span class="sig-name descname"><span class="pre">append_transformation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">transformation</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.append_transformation"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.append_transformation" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.apply_inverse_transformations">
|
||
<span class="sig-name descname"><span class="pre">apply_inverse_transformations</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.apply_inverse_transformations"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.apply_inverse_transformations" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Apply the data transformations for data postprocessing</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>data</strong> – input data</p></li>
|
||
<li><p><strong>params</strong> – transformation parameters</p></li>
|
||
<li><p><strong>updateUoD</strong> – </p></li>
|
||
<li><p><strong>kwargs</strong> – </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>postprocessed data</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.apply_transformations">
|
||
<span class="sig-name descname"><span class="pre">apply_transformations</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">updateUoD</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.apply_transformations"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.apply_transformations" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Apply the data transformations for data preprocessing</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>data</strong> – input data</p></li>
|
||
<li><p><strong>params</strong> – transformation parameters</p></li>
|
||
<li><p><strong>updateUoD</strong> – </p></li>
|
||
<li><p><strong>kwargs</strong> – </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>preprocessed data</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.auto_update">
|
||
<span class="sig-name descname"><span class="pre">auto_update</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><span class="pre">bool</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.auto_update" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A boolean value indicating that model is incremental</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.benchmark_only">
|
||
<span class="sig-name descname"><span class="pre">benchmark_only</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><span class="pre">bool</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.benchmark_only" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A boolean value indicating a façade for external (non-FTS) model used on benchmarks or ensembles.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.clip_uod">
|
||
<span class="sig-name descname"><span class="pre">clip_uod</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ndata</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.clip_uod"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.clip_uod" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.clone_parameters">
|
||
<span class="sig-name descname"><span class="pre">clone_parameters</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">model</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.clone_parameters"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.clone_parameters" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Import the parameters values from other model</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>model</strong> – a model to clone the parameters</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.detail">
|
||
<span class="sig-name descname"><span class="pre">detail</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><span class="pre">str</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.detail" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A string with the model detailed information</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.fit">
|
||
<span class="sig-name descname"><span class="pre">fit</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ndata</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.fit"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.fit" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Fit the model’s parameters based on the training data.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>ndata</strong> – training time series data</p></li>
|
||
<li><p><strong>kwargs</strong> – </p></li>
|
||
<li><p><strong>num_batches</strong> – split the training data in num_batches to save memory during the training process</p></li>
|
||
<li><p><strong>save_model</strong> – save final model on disk</p></li>
|
||
<li><p><strong>batch_save</strong> – save the model between each batch</p></li>
|
||
<li><p><strong>file_path</strong> – path to save the model</p></li>
|
||
<li><p><strong>distributed</strong> – boolean, indicate if the training procedure will be distributed in a dispy cluster</p></li>
|
||
<li><p><strong>nodes</strong> – a list with the dispy cluster nodes addresses</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.flrgs">
|
||
<span class="sig-name descname"><span class="pre">flrgs</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><span class="pre">dict</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.flrgs" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The list of Fuzzy Logical Relationship Groups - FLRG</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.forecast">
|
||
<span class="sig-name descname"><span class="pre">forecast</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.forecast"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.forecast" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Point forecast one step ahead</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="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>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>a list with the forecasted values</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.forecast_ahead">
|
||
<span class="sig-name descname"><span class="pre">forecast_ahead</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">steps</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.forecast_ahead"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.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>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="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>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>a list with the forecasted values</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.forecast_ahead_distribution">
|
||
<span class="sig-name descname"><span class="pre">forecast_ahead_distribution</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">steps</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.forecast_ahead_distribution"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.forecast_ahead_distribution" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Probabilistic forecast from 1 to H steps ahead, where H is given by the steps parameter</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="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</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>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>a list with the forecasted Probability Distributions</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.forecast_ahead_interval">
|
||
<span class="sig-name descname"><span class="pre">forecast_ahead_interval</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">steps</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.forecast_ahead_interval"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.forecast_ahead_interval" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Interval forecast from 1 to H steps ahead, where H is given by the steps parameter</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="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</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>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>a list with the forecasted intervals</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.forecast_ahead_multivariate">
|
||
<span class="sig-name descname"><span class="pre">forecast_ahead_multivariate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">steps</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">pandas.core.frame.DataFrame</span></span></span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.forecast_ahead_multivariate"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.forecast_ahead_multivariate" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Multivariate forecast n step ahead</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>data</strong> – Pandas dataframe with one column for each variable and 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</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>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>a Pandas Dataframe object representing the forecasted values for each variable</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.forecast_distribution">
|
||
<span class="sig-name descname"><span class="pre">forecast_distribution</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.forecast_distribution"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.forecast_distribution" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Probabilistic forecast one step ahead</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="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>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>a list with probabilistic.ProbabilityDistribution objects representing the forecasted Probability Distributions</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.forecast_interval">
|
||
<span class="sig-name descname"><span class="pre">forecast_interval</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.forecast_interval"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.forecast_interval" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Interval forecast one step ahead</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="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>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>a list with the prediction intervals</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.forecast_multivariate">
|
||
<span class="sig-name descname"><span class="pre">forecast_multivariate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><span class="pre">pandas.core.frame.DataFrame</span></span></span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.forecast_multivariate"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.forecast_multivariate" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Multivariate forecast one step ahead</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>data</strong> – Pandas dataframe with one column for each variable and 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>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>a Pandas Dataframe object representing the forecasted values for each variable</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.forecast_step">
|
||
<span class="sig-name descname"><span class="pre">forecast_step</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">step</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.forecast_step"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.forecast_step" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Point forecast for H steps ahead, where H is given by the step parameter</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="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>step</strong> – the forecasting horizon (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>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>a list with the forecasted values</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.fuzzy">
|
||
<span class="sig-name descname"><span class="pre">fuzzy</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.10)"><span class="pre">dict</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.fuzzy"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.fuzzy" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Fuzzify a data point</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>data</strong> – data point</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>maximum membership fuzzy set</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.get_UoD">
|
||
<span class="sig-name descname"><span class="pre">get_UoD</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#set" title="(in Python v3.10)"><span class="pre">set</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.get_UoD"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.get_UoD" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>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.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p>A set with the lower and the upper bounds of the UoD</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.has_interval_forecasting">
|
||
<span class="sig-name descname"><span class="pre">has_interval_forecasting</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><span class="pre">bool</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.has_interval_forecasting" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A boolean value indicating if the model supports interval forecasting, default: False</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.has_point_forecasting">
|
||
<span class="sig-name descname"><span class="pre">has_point_forecasting</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><span class="pre">bool</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.has_point_forecasting" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A boolean value indicating if the model supports point forecasting, default: True</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.has_probability_forecasting">
|
||
<span class="sig-name descname"><span class="pre">has_probability_forecasting</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><span class="pre">bool</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.has_probability_forecasting" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A boolean value indicating if the model support probabilistic forecasting, default: False</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.has_seasonality">
|
||
<span class="sig-name descname"><span class="pre">has_seasonality</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><span class="pre">bool</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.has_seasonality" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A boolean value indicating if the model supports seasonal indexers, default: False</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.indexer">
|
||
<span class="sig-name descname"><span class="pre">indexer</span></span><a class="headerlink" href="#pyFTS.common.fts.FTS.indexer" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>An pyFTS.models.seasonal.Indexer object for indexing the time series data</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.is_clustered">
|
||
<span class="sig-name descname"><span class="pre">is_clustered</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><span class="pre">bool</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.is_clustered" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A boolean value indicating if the model support multivariate time series (Pandas DataFrame), but works like
|
||
a monovariate method, default: False</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.is_high_order">
|
||
<span class="sig-name descname"><span class="pre">is_high_order</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><span class="pre">bool</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.is_high_order" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A boolean value indicating if the model support orders greater than 1, default: False</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.is_multivariate">
|
||
<span class="sig-name descname"><span class="pre">is_multivariate</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><span class="pre">bool</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.is_multivariate" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A boolean value indicating if the model support multivariate time series (Pandas DataFrame), default: False</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.is_time_variant">
|
||
<span class="sig-name descname"><span class="pre">is_time_variant</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><span class="pre">bool</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.is_time_variant" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A boolean value indicating if this model is time variant</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.is_wrapper">
|
||
<span class="sig-name descname"><span class="pre">is_wrapper</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><span class="pre">bool</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.is_wrapper" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Indicates that this model is a wrapper for other(s) method(s)</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.lags">
|
||
<span class="sig-name descname"><span class="pre">lags</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><span class="pre">int</span></a><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#pyFTS.common.fts.FTS.lags" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>The list of lag indexes for high order models</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.len_total">
|
||
<span class="sig-name descname"><span class="pre">len_total</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.len_total"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.len_total" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Total length of the model, adding the number of terms in all rules</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.log">
|
||
<span class="sig-name descname"><span class="pre">log</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">pd.DataFrame</span></em><a class="headerlink" href="#pyFTS.common.fts.FTS.log" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.max_lag">
|
||
<span class="sig-name descname"><span class="pre">max_lag</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><span class="pre">int</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.max_lag" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>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</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.merge">
|
||
<span class="sig-name descname"><span class="pre">merge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">model</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.merge"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.merge" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Merge the FLRG rules from other model</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><p><strong>model</strong> – source model</p>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.min_order">
|
||
<span class="sig-name descname"><span class="pre">min_order</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><span class="pre">int</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.min_order" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>In high order models, this integer value indicates the minimal order supported for the model, default: 1</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.name">
|
||
<span class="sig-name descname"><span class="pre">name</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><span class="pre">str</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.name" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A string with the model name</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.offset">
|
||
<span class="sig-name descname"><span class="pre">offset</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">→</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><span class="pre">int</span></a></span></span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.offset"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.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>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p>An integer with the number of lags to skip</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.order">
|
||
<span class="sig-name descname"><span class="pre">order</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><span class="pre">int</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.order" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A integer with the model order (number of past lags are used on forecasting)</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.original_max">
|
||
<span class="sig-name descname"><span class="pre">original_max</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.10)"><span class="pre">float</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.original_max" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A float with the upper limit of the Universe of Discourse, the maximal value found on training data</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.original_min">
|
||
<span class="sig-name descname"><span class="pre">original_min</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.10)"><span class="pre">float</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.original_min" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A float with the lower limit of the Universe of Discourse, the minimal value found on training data</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.partitioner">
|
||
<span class="sig-name descname"><span class="pre">partitioner</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="pyFTS.partitioners.html#pyFTS.partitioners.partitioner.Partitioner" title="pyFTS.partitioners.partitioner.Partitioner"><span class="pre">partitioner.Partitioner</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.partitioner" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A pyFTS.partitioners.Partitioner object with the Universe of Discourse partitioner used on the model. This is a mandatory dependecy.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.predict">
|
||
<span class="sig-name descname"><span class="pre">predict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.predict"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.predict" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Forecast using trained model</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>data</strong> – time series with minimal length to the order of the model</p></li>
|
||
<li><p><strong>type</strong> – the forecasting type, one of these values: point(default), interval, distribution or multivariate.</p></li>
|
||
<li><p><strong>steps_ahead</strong> – The forecasting path H, i. e., tell the model to forecast from t+1 to t+H.</p></li>
|
||
<li><p><strong>step_to</strong> – The forecasting step H, i. e., tell the model to forecast to t+H for each input sample</p></li>
|
||
<li><p><strong>start_at</strong> – in the multi step forecasting, the index of the data where to start forecasting (default value: 0)</p></li>
|
||
<li><p><strong>distributed</strong> – boolean, indicate if the forecasting procedure will be distributed in a dispy cluster (default value: False)</p></li>
|
||
<li><p><strong>nodes</strong> – a list with the dispy cluster nodes addresses</p></li>
|
||
<li><p><strong>explain</strong> – try to explain, step by step, the one-step-ahead point forecasting result given the input data. (default value: False)</p></li>
|
||
<li><p><strong>generators</strong> – for multivariate methods on multi step ahead forecasting, generators is a dict where the keys
|
||
are the dataframe columun names (except the target_variable) and the values are lambda functions that
|
||
accept one value (the actual value of the variable) and return the next value or trained FTS
|
||
models that accept the actual values and forecast new ones.</p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns</dt>
|
||
<dd class="field-even"><p>a numpy array with the forecasted data</p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.reset_calculated_values">
|
||
<span class="sig-name descname"><span class="pre">reset_calculated_values</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.reset_calculated_values"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.reset_calculated_values" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Reset all pre-calculated values on the FLRG’s</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Returns</dt>
|
||
<dd class="field-odd"><p></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.shortname">
|
||
<span class="sig-name descname"><span class="pre">shortname</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.10)"><span class="pre">str</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.shortname" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A string with a short name or alias for the model</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.standard_horizon">
|
||
<span class="sig-name descname"><span class="pre">standard_horizon</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><span class="pre">int</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.standard_horizon" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Standard forecasting horizon (Default: 1)</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.train">
|
||
<span class="sig-name descname"><span class="pre">train</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/fts.html#FTS.train"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.fts.FTS.train" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Method specific parameter fitting</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters</dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>data</strong> – training time series data</p></li>
|
||
<li><p><strong>kwargs</strong> – Method specific parameters</p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.transformations">
|
||
<span class="sig-name descname"><span class="pre">transformations</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a><span class="p"><span class="pre">[</span></span><a class="reference internal" href="pyFTS.common.transformations.html#pyFTS.common.transformations.transformation.Transformation" title="pyFTS.common.transformations.transformation.Transformation"><span class="pre">transformation.Transformation</span></a><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#pyFTS.common.fts.FTS.transformations" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A list with the data transformations (common.Transformations) applied on model pre and post processing, default: []</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.transformations_param">
|
||
<span class="sig-name descname"><span class="pre">transformations_param</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><span class="pre">list</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.transformations_param" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>A list with the specific parameters for each data transformation</p>
|
||
</dd></dl>
|
||
|
||
<dl class="py attribute">
|
||
<dt class="sig sig-object py" id="pyFTS.common.fts.FTS.uod_clip">
|
||
<span class="sig-name descname"><span class="pre">uod_clip</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><span class="pre">bool</span></a></em><a class="headerlink" href="#pyFTS.common.fts.FTS.uod_clip" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Flag indicating if the test data will be clipped inside the training Universe of Discourse</p>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<div class="section" id="module-pyFTS.common.tree">
|
||
<span id="pyfts-common-tree-module"></span><h2>pyFTS.common.tree module<a class="headerlink" href="#module-pyFTS.common.tree" title="Permalink to this headline">¶</a></h2>
|
||
<p>Tree data structure</p>
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="pyFTS.common.tree.FLRGTree">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pyFTS.common.tree.</span></span><span class="sig-name descname"><span class="pre">FLRGTree</span></span><a class="reference internal" href="_modules/pyFTS/common/tree.html#FLRGTree"><span class="viewcode-link"><span class="pre">[source]</span></span></a><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.10)"><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>
|
||
</dd></dl>
|
||
|
||
<dl class="py class">
|
||
<dt class="sig sig-object py" id="pyFTS.common.tree.FLRGTreeNode">
|
||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pyFTS.common.tree.</span></span><span class="sig-name descname"><span class="pre">FLRGTreeNode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/tree.html#FLRGTreeNode"><span class="viewcode-link"><span class="pre">[source]</span></span></a><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.10)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
|
||
<p>Tree node for</p>
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.tree.FLRGTreeNode.appendChild">
|
||
<span class="sig-name descname"><span class="pre">appendChild</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">child</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/tree.html#FLRGTreeNode.appendChild"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.tree.FLRGTreeNode.appendChild" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.tree.FLRGTreeNode.getChildren">
|
||
<span class="sig-name descname"><span class="pre">getChildren</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/tree.html#FLRGTreeNode.getChildren"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.tree.FLRGTreeNode.getChildren" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.tree.FLRGTreeNode.getStr">
|
||
<span class="sig-name descname"><span class="pre">getStr</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">k</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/tree.html#FLRGTreeNode.getStr"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.tree.FLRGTreeNode.getStr" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py method">
|
||
<dt class="sig sig-object py" id="pyFTS.common.tree.FLRGTreeNode.paths">
|
||
<span class="sig-name descname"><span class="pre">paths</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">acc</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">[]</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/tree.html#FLRGTreeNode.paths"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.tree.FLRGTreeNode.paths" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.tree.build_tree_without_order">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.tree.</span></span><span class="sig-name descname"><span class="pre">build_tree_without_order</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">node</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lags</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">level</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/tree.html#build_tree_without_order"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.tree.build_tree_without_order" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
<dl class="py function">
|
||
<dt class="sig sig-object py" id="pyFTS.common.tree.flat">
|
||
<span class="sig-prename descclassname"><span class="pre">pyFTS.common.tree.</span></span><span class="sig-name descname"><span class="pre">flat</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dados</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/tree.html#flat"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#pyFTS.common.tree.flat" title="Permalink to this definition">¶</a></dt>
|
||
<dd></dd></dl>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="clearer"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper">
|
||
<div>
|
||
<h3><a href="index.html">Table of Contents</a></h3>
|
||
<ul>
|
||
<li><a class="reference internal" href="#">pyFTS.common package</a><ul>
|
||
<li><a class="reference internal" href="#module-pyFTS.common">Module contents</a></li>
|
||
<li><a class="reference internal" href="#submodules">Submodules</a></li>
|
||
<li><a class="reference internal" href="#module-pyFTS.common.Composite">pyFTS.common.Composite module</a></li>
|
||
<li><a class="reference internal" href="#module-pyFTS.common.FLR">pyFTS.common.FLR module</a></li>
|
||
<li><a class="reference internal" href="#module-pyFTS.common.FuzzySet">pyFTS.common.FuzzySet module</a></li>
|
||
<li><a class="reference internal" href="#module-pyFTS.common.Membership">pyFTS.common.Membership module</a></li>
|
||
<li><a class="reference internal" href="#module-pyFTS.common.SortedCollection">pyFTS.common.SortedCollection module</a></li>
|
||
<li><a class="reference internal" href="#module-pyFTS.common.Util">pyFTS.common.Util module</a></li>
|
||
<li><a class="reference internal" href="#module-pyFTS.common.flrg">pyFTS.common.flrg module</a></li>
|
||
<li><a class="reference internal" href="#module-pyFTS.common.fts">pyFTS.common.fts module</a></li>
|
||
<li><a class="reference internal" href="#module-pyFTS.common.tree">pyFTS.common.tree module</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
</div>
|
||
<div>
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="pyFTS.benchmarks.html"
|
||
title="previous chapter">pyFTS.benchmarks package</a></p>
|
||
</div>
|
||
<div>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="pyFTS.common.transformations.html"
|
||
title="next chapter">pyFTS.common.transformations package</a></p>
|
||
</div>
|
||
<div role="note" aria-label="source link">
|
||
<h3>This Page</h3>
|
||
<ul class="this-page-menu">
|
||
<li><a href="_sources/pyFTS.common.rst.txt"
|
||
rel="nofollow">Show Source</a></li>
|
||
</ul>
|
||
</div>
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3 id="searchlabel">Quick search</h3>
|
||
<div class="searchformwrapper">
|
||
<form class="search" action="search.html" method="get">
|
||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||
<input type="submit" value="Go" />
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<script>$('#searchbox').show(0);</script>
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="related" role="navigation" aria-label="related navigation">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="pyFTS.common.transformations.html" title="pyFTS.common.transformations package"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="pyFTS.benchmarks.html" title="pyFTS.benchmarks package"
|
||
>previous</a> |</li>
|
||
<li class="nav-item nav-item-0"><a href="index.html">pyFTS 1.7 documentation</a> »</li>
|
||
<li class="nav-item nav-item-1"><a href="modules.html" >pyFTS</a> »</li>
|
||
<li class="nav-item nav-item-2"><a href="pyFTS.html" >pyFTS package</a> »</li>
|
||
<li class="nav-item nav-item-this"><a href="">pyFTS.common package</a></li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer" role="contentinfo">
|
||
© Copyright 2022, Machine Intelligence and Data Science Laboratory - UFMG - Brazil.
|
||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.5.0.
|
||
</div>
|
||
</body>
|
||
</html> |