Updating the documentation
This commit is contained in:
parent
5d90cbea82
commit
4eaeb90e4a
BIN
docs/build/doctrees/environment.pickle
vendored
BIN
docs/build/doctrees/environment.pickle
vendored
Binary file not shown.
BIN
docs/build/doctrees/pyFTS.common.doctree
vendored
BIN
docs/build/doctrees/pyFTS.common.doctree
vendored
Binary file not shown.
BIN
docs/build/doctrees/pyFTS.data.doctree
vendored
BIN
docs/build/doctrees/pyFTS.data.doctree
vendored
Binary file not shown.
BIN
docs/build/doctrees/pyFTS.models.incremental.doctree
vendored
BIN
docs/build/doctrees/pyFTS.models.incremental.doctree
vendored
Binary file not shown.
BIN
docs/build/doctrees/pyFTS.models.seasonal.doctree
vendored
BIN
docs/build/doctrees/pyFTS.models.seasonal.doctree
vendored
Binary file not shown.
BIN
docs/build/doctrees/quickstart.doctree
vendored
BIN
docs/build/doctrees/quickstart.doctree
vendored
Binary file not shown.
1
docs/build/html/_modules/index.html
vendored
1
docs/build/html/_modules/index.html
vendored
@ -98,6 +98,7 @@
|
|||||||
<li><a href="pyFTS/data/Ethereum.html">pyFTS.data.Ethereum</a></li>
|
<li><a href="pyFTS/data/Ethereum.html">pyFTS.data.Ethereum</a></li>
|
||||||
<li><a href="pyFTS/data/GBPUSD.html">pyFTS.data.GBPUSD</a></li>
|
<li><a href="pyFTS/data/GBPUSD.html">pyFTS.data.GBPUSD</a></li>
|
||||||
<li><a href="pyFTS/data/INMET.html">pyFTS.data.INMET</a></li>
|
<li><a href="pyFTS/data/INMET.html">pyFTS.data.INMET</a></li>
|
||||||
|
<li><a href="pyFTS/data/Malaysia.html">pyFTS.data.Malaysia</a></li>
|
||||||
<li><a href="pyFTS/data/NASDAQ.html">pyFTS.data.NASDAQ</a></li>
|
<li><a href="pyFTS/data/NASDAQ.html">pyFTS.data.NASDAQ</a></li>
|
||||||
<li><a href="pyFTS/data/SONDA.html">pyFTS.data.SONDA</a></li>
|
<li><a href="pyFTS/data/SONDA.html">pyFTS.data.SONDA</a></li>
|
||||||
<li><a href="pyFTS/data/SP500.html">pyFTS.data.SP500</a></li>
|
<li><a href="pyFTS/data/SP500.html">pyFTS.data.SP500</a></li>
|
||||||
|
@ -109,7 +109,10 @@
|
|||||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">superset</span><span class="p">:</span>
|
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">superset</span><span class="p">:</span>
|
||||||
<span class="k">return</span> <span class="nb">max</span><span class="p">([</span><span class="n">s</span><span class="o">.</span><span class="n">membership</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">sets</span><span class="p">])</span>
|
<span class="k">return</span> <span class="nb">max</span><span class="p">([</span><span class="n">s</span><span class="o">.</span><span class="n">membership</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">for</span> <span class="n">s</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">sets</span><span class="p">])</span>
|
||||||
<span class="k">else</span><span class="p">:</span>
|
<span class="k">else</span><span class="p">:</span>
|
||||||
<span class="k">return</span> <span class="nb">min</span><span class="p">([</span><span class="bp">self</span><span class="o">.</span><span class="n">mf</span><span class="p">[</span><span class="n">ct</span><span class="p">](</span><span class="n">x</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="p">[</span><span class="n">ct</span><span class="p">])</span> <span class="k">for</span> <span class="n">ct</span> <span class="ow">in</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mf</span><span class="p">))])</span></div>
|
<span class="k">return</span> <span class="nb">min</span><span class="p">([</span><span class="bp">self</span><span class="o">.</span><span class="n">mf</span><span class="p">[</span><span class="n">ct</span><span class="p">](</span><span class="bp">self</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">x</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="p">[</span><span class="n">ct</span><span class="p">])</span> <span class="k">for</span> <span class="n">ct</span> <span class="ow">in</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mf</span><span class="p">))])</span></div>
|
||||||
|
|
||||||
|
<div class="viewcode-block" id="FuzzySet.transform"><a class="viewcode-back" href="../../../pyFTS.common.html#pyFTS.common.Composite.FuzzySet.transform">[docs]</a> <span class="k">def</span> <span class="nf">transform</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
|
||||||
|
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sets</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">x</span><span class="p">)</span></div>
|
||||||
|
|
||||||
<div class="viewcode-block" id="FuzzySet.append"><a class="viewcode-back" href="../../../pyFTS.common.html#pyFTS.common.Composite.FuzzySet.append">[docs]</a> <span class="k">def</span> <span class="nf">append</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">mf</span><span class="p">,</span> <span class="n">parameters</span><span class="p">):</span>
|
<div class="viewcode-block" id="FuzzySet.append"><a class="viewcode-back" href="../../../pyFTS.common.html#pyFTS.common.Composite.FuzzySet.append">[docs]</a> <span class="k">def</span> <span class="nf">append</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">mf</span><span class="p">,</span> <span class="n">parameters</span><span class="p">):</span>
|
||||||
<span class="sd">"""</span>
|
<span class="sd">"""</span>
|
||||||
|
@ -109,6 +109,16 @@
|
|||||||
<span class="bp">self</span><span class="o">.</span><span class="n">upper</span> <span class="o">=</span> <span class="n">parameters</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">+</span> <span class="n">parameters</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">*</span><span class="mi">3</span>
|
<span class="bp">self</span><span class="o">.</span><span class="n">upper</span> <span class="o">=</span> <span class="n">parameters</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">+</span> <span class="n">parameters</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">*</span><span class="mi">3</span>
|
||||||
<span class="bp">self</span><span class="o">.</span><span class="n">metadata</span> <span class="o">=</span> <span class="p">{}</span>
|
<span class="bp">self</span><span class="o">.</span><span class="n">metadata</span> <span class="o">=</span> <span class="p">{}</span>
|
||||||
|
|
||||||
|
<div class="viewcode-block" id="FuzzySet.transform"><a class="viewcode-back" href="../../../pyFTS.common.html#pyFTS.common.FuzzySet.FuzzySet.transform">[docs]</a> <span class="k">def</span> <span class="nf">transform</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
|
||||||
|
<span class="sd">"""</span>
|
||||||
|
<span class="sd"> Preprocess the data point for non native types</span>
|
||||||
|
|
||||||
|
<span class="sd"> :param x:</span>
|
||||||
|
<span class="sd"> :return: return a native type value for the structured type</span>
|
||||||
|
<span class="sd"> """</span>
|
||||||
|
|
||||||
|
<span class="k">return</span> <span class="n">x</span></div>
|
||||||
|
|
||||||
<div class="viewcode-block" id="FuzzySet.membership"><a class="viewcode-back" href="../../../pyFTS.common.html#pyFTS.common.FuzzySet.FuzzySet.membership">[docs]</a> <span class="k">def</span> <span class="nf">membership</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
|
<div class="viewcode-block" id="FuzzySet.membership"><a class="viewcode-back" href="../../../pyFTS.common.html#pyFTS.common.FuzzySet.FuzzySet.membership">[docs]</a> <span class="k">def</span> <span class="nf">membership</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
|
||||||
<span class="sd">"""</span>
|
<span class="sd">"""</span>
|
||||||
<span class="sd"> Calculate the membership value of a given input</span>
|
<span class="sd"> Calculate the membership value of a given input</span>
|
||||||
@ -116,7 +126,7 @@
|
|||||||
<span class="sd"> :param x: input value </span>
|
<span class="sd"> :param x: input value </span>
|
||||||
<span class="sd"> :return: membership value of x at this fuzzy set</span>
|
<span class="sd"> :return: membership value of x at this fuzzy set</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mf</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="p">)</span> <span class="o">*</span> <span class="bp">self</span><span class="o">.</span><span class="n">alpha</span></div>
|
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mf</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">x</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="p">)</span> <span class="o">*</span> <span class="bp">self</span><span class="o">.</span><span class="n">alpha</span></div>
|
||||||
|
|
||||||
<div class="viewcode-block" id="FuzzySet.partition_function"><a class="viewcode-back" href="../../../pyFTS.common.html#pyFTS.common.FuzzySet.FuzzySet.partition_function">[docs]</a> <span class="k">def</span> <span class="nf">partition_function</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">uod</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">nbins</span><span class="o">=</span><span class="mi">100</span><span class="p">):</span>
|
<div class="viewcode-block" id="FuzzySet.partition_function"><a class="viewcode-back" href="../../../pyFTS.common.html#pyFTS.common.FuzzySet.FuzzySet.partition_function">[docs]</a> <span class="k">def</span> <span class="nf">partition_function</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="n">uod</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">nbins</span><span class="o">=</span><span class="mi">100</span><span class="p">):</span>
|
||||||
<span class="sd">"""</span>
|
<span class="sd">"""</span>
|
||||||
@ -157,14 +167,14 @@
|
|||||||
<span class="n">fs1</span> <span class="o">=</span> <span class="n">ordered_sets</span><span class="p">[</span><span class="n">midpoint</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> <span class="k">if</span> <span class="n">midpoint</span> <span class="o">></span> <span class="mi">0</span> <span class="k">else</span> <span class="n">ordered_sets</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
<span class="n">fs1</span> <span class="o">=</span> <span class="n">ordered_sets</span><span class="p">[</span><span class="n">midpoint</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> <span class="k">if</span> <span class="n">midpoint</span> <span class="o">></span> <span class="mi">0</span> <span class="k">else</span> <span class="n">ordered_sets</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
||||||
<span class="n">fs2</span> <span class="o">=</span> <span class="n">ordered_sets</span><span class="p">[</span><span class="n">midpoint</span> <span class="o">+</span> <span class="mi">1</span><span class="p">]</span> <span class="k">if</span> <span class="n">midpoint</span> <span class="o"><</span> <span class="n">max_len</span> <span class="k">else</span> <span class="n">ordered_sets</span><span class="p">[</span><span class="n">max_len</span><span class="p">]</span>
|
<span class="n">fs2</span> <span class="o">=</span> <span class="n">ordered_sets</span><span class="p">[</span><span class="n">midpoint</span> <span class="o">+</span> <span class="mi">1</span><span class="p">]</span> <span class="k">if</span> <span class="n">midpoint</span> <span class="o"><</span> <span class="n">max_len</span> <span class="k">else</span> <span class="n">ordered_sets</span><span class="p">[</span><span class="n">max_len</span><span class="p">]</span>
|
||||||
|
|
||||||
<span class="k">if</span> <span class="n">fuzzy_sets</span><span class="p">[</span><span class="n">fs1</span><span class="p">]</span><span class="o">.</span><span class="n">centroid</span> <span class="o"><=</span> <span class="n">x</span> <span class="o"><=</span> <span class="n">fuzzy_sets</span><span class="p">[</span><span class="n">fs2</span><span class="p">]</span><span class="o">.</span><span class="n">centroid</span><span class="p">:</span>
|
<span class="k">if</span> <span class="n">fuzzy_sets</span><span class="p">[</span><span class="n">fs1</span><span class="p">]</span><span class="o">.</span><span class="n">centroid</span> <span class="o"><=</span> <span class="n">fuzzy_sets</span><span class="p">[</span><span class="n">fs</span><span class="p">]</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o"><=</span> <span class="n">fuzzy_sets</span><span class="p">[</span><span class="n">fs2</span><span class="p">]</span><span class="o">.</span><span class="n">centroid</span><span class="p">:</span>
|
||||||
<span class="k">return</span> <span class="p">(</span><span class="n">midpoint</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="n">midpoint</span><span class="p">,</span> <span class="n">midpoint</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
|
<span class="k">return</span> <span class="p">(</span><span class="n">midpoint</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="n">midpoint</span><span class="p">,</span> <span class="n">midpoint</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
|
||||||
<span class="k">elif</span> <span class="n">midpoint</span> <span class="o"><=</span> <span class="mi">1</span><span class="p">:</span>
|
<span class="k">elif</span> <span class="n">midpoint</span> <span class="o"><=</span> <span class="mi">1</span><span class="p">:</span>
|
||||||
<span class="k">return</span> <span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
<span class="k">return</span> <span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
||||||
<span class="k">elif</span> <span class="n">midpoint</span> <span class="o">>=</span> <span class="n">max_len</span><span class="p">:</span>
|
<span class="k">elif</span> <span class="n">midpoint</span> <span class="o">>=</span> <span class="n">max_len</span><span class="p">:</span>
|
||||||
<span class="k">return</span> <span class="p">[</span><span class="n">max_len</span><span class="p">]</span>
|
<span class="k">return</span> <span class="p">[</span><span class="n">max_len</span><span class="p">]</span>
|
||||||
<span class="k">else</span><span class="p">:</span>
|
<span class="k">else</span><span class="p">:</span>
|
||||||
<span class="k">if</span> <span class="n">x</span> <span class="o"><</span> <span class="n">fuzzy_sets</span><span class="p">[</span><span class="n">fs</span><span class="p">]</span><span class="o">.</span><span class="n">centroid</span><span class="p">:</span>
|
<span class="k">if</span> <span class="n">fuzzy_sets</span><span class="p">[</span><span class="n">fs</span><span class="p">]</span><span class="o">.</span><span class="n">transform</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="o"><</span> <span class="n">fuzzy_sets</span><span class="p">[</span><span class="n">fs</span><span class="p">]</span><span class="o">.</span><span class="n">centroid</span><span class="p">:</span>
|
||||||
<span class="n">last</span> <span class="o">=</span> <span class="n">midpoint</span> <span class="o">-</span> <span class="mi">1</span>
|
<span class="n">last</span> <span class="o">=</span> <span class="n">midpoint</span> <span class="o">-</span> <span class="mi">1</span>
|
||||||
<span class="k">else</span><span class="p">:</span>
|
<span class="k">else</span><span class="p">:</span>
|
||||||
<span class="n">first</span> <span class="o">=</span> <span class="n">midpoint</span> <span class="o">+</span> <span class="mi">1</span>
|
<span class="n">first</span> <span class="o">=</span> <span class="n">midpoint</span> <span class="o">+</span> <span class="mi">1</span>
|
||||||
|
@ -102,7 +102,8 @@
|
|||||||
|
|
||||||
<span class="sd"> :return: Pandas DataFrame</span>
|
<span class="sd"> :return: Pandas DataFrame</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
<span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s1">'https://query.data.world/s/72gews5w3c7oaf7by5vp7evsasluia'</span><span class="p">)</span>
|
<span class="n">df</span> <span class="o">=</span> <span class="n">common</span><span class="o">.</span><span class="n">get_dataframe</span><span class="p">(</span><span class="s2">"BTCUSD.csv"</span><span class="p">,</span> <span class="s2">"https://query.data.world/s/72gews5w3c7oaf7by5vp7evsasluia"</span><span class="p">,</span>
|
||||||
|
<span class="n">sep</span><span class="o">=</span><span class="s2">","</span><span class="p">)</span>
|
||||||
|
|
||||||
<span class="k">return</span> <span class="n">df</span></div>
|
<span class="k">return</span> <span class="n">df</span></div>
|
||||||
|
|
||||||
|
@ -103,7 +103,8 @@
|
|||||||
|
|
||||||
<span class="sd"> :return: Pandas DataFrame</span>
|
<span class="sd"> :return: Pandas DataFrame</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
<span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s1">'https://query.data.world/s/d4hfir3xrelkx33o3bfs5dbhyiztml'</span><span class="p">)</span>
|
<span class="n">df</span> <span class="o">=</span> <span class="n">common</span><span class="o">.</span><span class="n">get_dataframe</span><span class="p">(</span><span class="s2">"DowJones.csv"</span><span class="p">,</span> <span class="s2">"https://query.data.world/s/d4hfir3xrelkx33o3bfs5dbhyiztml"</span><span class="p">,</span>
|
||||||
|
<span class="n">sep</span><span class="o">=</span><span class="s2">","</span><span class="p">)</span>
|
||||||
|
|
||||||
<span class="k">return</span> <span class="n">df</span></div>
|
<span class="k">return</span> <span class="n">df</span></div>
|
||||||
|
|
||||||
|
@ -101,7 +101,8 @@
|
|||||||
|
|
||||||
<span class="sd"> :return: Pandas DataFrame</span>
|
<span class="sd"> :return: Pandas DataFrame</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
<span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s1">'https://query.data.world/s/gvsaeruthnxjkwzl7z4ki7u5rduah3'</span><span class="p">)</span>
|
<span class="n">df</span> <span class="o">=</span> <span class="n">common</span><span class="o">.</span><span class="n">get_dataframe</span><span class="p">(</span><span class="s2">"EURGBP.csv"</span><span class="p">,</span> <span class="s2">"https://query.data.world/s/gvsaeruthnxjkwzl7z4ki7u5rduah3"</span><span class="p">,</span>
|
||||||
|
<span class="n">sep</span><span class="o">=</span><span class="s2">","</span><span class="p">)</span>
|
||||||
|
|
||||||
<span class="k">return</span> <span class="n">df</span></div>
|
<span class="k">return</span> <span class="n">df</span></div>
|
||||||
|
|
||||||
|
@ -101,7 +101,8 @@
|
|||||||
|
|
||||||
<span class="sd"> :return: Pandas DataFrame</span>
|
<span class="sd"> :return: Pandas DataFrame</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
<span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s1">'https://query.data.world/s/od4eojioz4w6o5bbwxjfn6j5zoqtos'</span><span class="p">)</span>
|
<span class="n">df</span> <span class="o">=</span> <span class="n">common</span><span class="o">.</span><span class="n">get_dataframe</span><span class="p">(</span><span class="s2">"EURUSD.csv"</span><span class="p">,</span> <span class="s2">"https://query.data.world/s/od4eojioz4w6o5bbwxjfn6j5zoqtos"</span><span class="p">,</span>
|
||||||
|
<span class="n">sep</span><span class="o">=</span><span class="s2">","</span><span class="p">)</span>
|
||||||
|
|
||||||
<span class="k">return</span> <span class="n">df</span></div>
|
<span class="k">return</span> <span class="n">df</span></div>
|
||||||
|
|
||||||
|
@ -103,7 +103,8 @@
|
|||||||
|
|
||||||
<span class="sd"> :return: Pandas DataFrame</span>
|
<span class="sd"> :return: Pandas DataFrame</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
<span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s1">'https://query.data.world/s/qj4ly7o4rl7oq527xzy4v76wkr3hws'</span><span class="p">)</span>
|
<span class="n">df</span> <span class="o">=</span> <span class="n">common</span><span class="o">.</span><span class="n">get_dataframe</span><span class="p">(</span><span class="s2">"ETHUSD.csv"</span><span class="p">,</span> <span class="s2">"https://query.data.world/s/qj4ly7o4rl7oq527xzy4v76wkr3hws"</span><span class="p">,</span>
|
||||||
|
<span class="n">sep</span><span class="o">=</span><span class="s2">","</span><span class="p">)</span>
|
||||||
|
|
||||||
<span class="k">return</span> <span class="n">df</span></div>
|
<span class="k">return</span> <span class="n">df</span></div>
|
||||||
|
|
||||||
|
@ -101,7 +101,8 @@
|
|||||||
|
|
||||||
<span class="sd"> :return: Pandas DataFrame</span>
|
<span class="sd"> :return: Pandas DataFrame</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
<span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s1">'https://query.data.world/s/sw4mijpowb3mqv6bsat7cdj54hyxix'</span><span class="p">)</span>
|
<span class="n">df</span> <span class="o">=</span> <span class="n">common</span><span class="o">.</span><span class="n">get_dataframe</span><span class="p">(</span><span class="s2">"GBPUSD.csv"</span><span class="p">,</span> <span class="s2">"https://query.data.world/s/sw4mijpowb3mqv6bsat7cdj54hyxix"</span><span class="p">,</span>
|
||||||
|
<span class="n">sep</span><span class="o">=</span><span class="s2">","</span><span class="p">)</span>
|
||||||
|
|
||||||
<span class="k">return</span> <span class="n">df</span></div>
|
<span class="k">return</span> <span class="n">df</span></div>
|
||||||
|
|
||||||
|
134
docs/build/html/_modules/pyFTS/data/Malaysia.html
vendored
Normal file
134
docs/build/html/_modules/pyFTS/data/Malaysia.html
vendored
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script type="text/javascript">
|
||||||
|
|
||||||
|
var _gaq = _gaq || [];
|
||||||
|
_gaq.push(['_setAccount', 'UA-55120145-3']);
|
||||||
|
_gaq.push(['_trackPageview']);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||||
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||||
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<title>pyFTS.data.Malaysia — pyFTS 1.2.3 documentation</title>
|
||||||
|
<link rel="stylesheet" href="../../../_static/bizstyle.css" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
|
||||||
|
<script type="text/javascript" src="../../../_static/documentation_options.js"></script>
|
||||||
|
<script type="text/javascript" src="../../../_static/jquery.js"></script>
|
||||||
|
<script type="text/javascript" src="../../../_static/underscore.js"></script>
|
||||||
|
<script type="text/javascript" src="../../../_static/doctools.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||||
|
<script type="text/javascript" src="../../../_static/bizstyle.js"></script>
|
||||||
|
<link rel="index" title="Index" href="../../../genindex.html" />
|
||||||
|
<link rel="search" title="Search" href="../../../search.html" />
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script type="text/javascript" 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="nav-item nav-item-0"><a href="../../../index.html">pyFTS 1.2.3 documentation</a> »</li>
|
||||||
|
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> »</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||||||
|
<div class="sphinxsidebarwrapper">
|
||||||
|
<p class="logo"><a href="../../../index.html">
|
||||||
|
<img class="logo" src="../../../_static/logo_heading2.png" alt="Logo"/>
|
||||||
|
</a></p>
|
||||||
|
<div id="searchbox" style="display: none" role="search">
|
||||||
|
<h3>Quick search</h3>
|
||||||
|
<div class="searchformwrapper">
|
||||||
|
<form class="search" action="../../../search.html" method="get">
|
||||||
|
<input type="text" name="q" />
|
||||||
|
<input type="submit" value="Go" />
|
||||||
|
<input type="hidden" name="check_keywords" value="yes" />
|
||||||
|
<input type="hidden" name="area" value="default" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="document">
|
||||||
|
<div class="documentwrapper">
|
||||||
|
<div class="bodywrapper">
|
||||||
|
<div class="body" role="main">
|
||||||
|
|
||||||
|
<h1>Source code for pyFTS.data.Malaysia</h1><div class="highlight"><pre>
|
||||||
|
<span></span><span class="sd">"""</span>
|
||||||
|
<span class="sd">Hourly Malaysia eletric load and tempeature</span>
|
||||||
|
<span class="sd">"""</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class="kn">from</span> <span class="nn">pyFTS.data</span> <span class="k">import</span> <span class="n">common</span>
|
||||||
|
<span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
|
||||||
|
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="viewcode-block" id="get_data"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.Malaysia.get_data">[docs]</a><span class="k">def</span> <span class="nf">get_data</span><span class="p">(</span><span class="n">field</span><span class="o">=</span><span class="s1">'load'</span><span class="p">):</span>
|
||||||
|
<span class="sd">"""</span>
|
||||||
|
<span class="sd"> Get the univariate time series data.</span>
|
||||||
|
|
||||||
|
<span class="sd"> :param field: dataset field to load</span>
|
||||||
|
<span class="sd"> :return: numpy array</span>
|
||||||
|
<span class="sd"> """</span>
|
||||||
|
<span class="n">dat</span> <span class="o">=</span> <span class="n">get_dataframe</span><span class="p">()</span>
|
||||||
|
<span class="k">return</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="n">field</span><span class="p">])</span></div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="viewcode-block" id="get_dataframe"><a class="viewcode-back" href="../../../pyFTS.data.html#pyFTS.data.Malaysia.get_dataframe">[docs]</a><span class="k">def</span> <span class="nf">get_dataframe</span><span class="p">():</span>
|
||||||
|
<span class="sd">"""</span>
|
||||||
|
<span class="sd"> Get the complete multivariate time series data.</span>
|
||||||
|
|
||||||
|
<span class="sd"> :return: Pandas DataFrame</span>
|
||||||
|
<span class="sd"> """</span>
|
||||||
|
<span class="n">df</span> <span class="o">=</span> <span class="n">common</span><span class="o">.</span><span class="n">get_dataframe</span><span class="p">(</span><span class="s2">"malaysia.csv"</span><span class="p">,</span><span class="s2">"https://query.data.world/s/e5arbthdytod3m7wfcg7gmtluh3wa5"</span><span class="p">,</span>
|
||||||
|
<span class="n">sep</span><span class="o">=</span><span class="s2">";"</span><span class="p">)</span>
|
||||||
|
|
||||||
|
<span class="k">return</span> <span class="n">df</span>
|
||||||
|
|
||||||
|
<span class="k">return</span> <span class="n">df</span></div>
|
||||||
|
|
||||||
|
</pre></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</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="nav-item nav-item-0"><a href="../../../index.html">pyFTS 1.2.3 documentation</a> »</li>
|
||||||
|
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> »</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="footer" role="contentinfo">
|
||||||
|
© Copyright 2018, Machine Intelligence and Data Science Laboratory - UFMG - Brazil.
|
||||||
|
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -106,12 +106,20 @@
|
|||||||
<span class="sd">"""The memory window length"""</span>
|
<span class="sd">"""The memory window length"""</span>
|
||||||
<span class="bp">self</span><span class="o">.</span><span class="n">auto_update</span> <span class="o">=</span> <span class="kc">False</span>
|
<span class="bp">self</span><span class="o">.</span><span class="n">auto_update</span> <span class="o">=</span> <span class="kc">False</span>
|
||||||
<span class="sd">"""If true the model is updated at each time and not recreated"""</span>
|
<span class="sd">"""If true the model is updated at each time and not recreated"""</span>
|
||||||
|
<span class="bp">self</span><span class="o">.</span><span class="n">batch_size</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'batch_size'</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span>
|
||||||
|
<span class="sd">"""The batch interval between each retraining"""</span>
|
||||||
<span class="bp">self</span><span class="o">.</span><span class="n">is_high_order</span> <span class="o">=</span> <span class="kc">True</span>
|
<span class="bp">self</span><span class="o">.</span><span class="n">is_high_order</span> <span class="o">=</span> <span class="kc">True</span>
|
||||||
|
<span class="bp">self</span><span class="o">.</span><span class="n">uod_clip</span> <span class="o">=</span> <span class="kc">False</span>
|
||||||
|
<span class="bp">self</span><span class="o">.</span><span class="n">max_lag</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">window_length</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">order</span>
|
||||||
|
|
||||||
<div class="viewcode-block" id="Retrainer.train"><a class="viewcode-back" href="../../../../pyFTS.models.incremental.html#pyFTS.models.incremental.Retrainer.Retrainer.train">[docs]</a> <span class="k">def</span> <span class="nf">train</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
<div class="viewcode-block" id="Retrainer.train"><a class="viewcode-back" href="../../../../pyFTS.models.incremental.html#pyFTS.models.incremental.Retrainer.Retrainer.train">[docs]</a> <span class="k">def</span> <span class="nf">train</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
||||||
<span class="bp">self</span><span class="o">.</span><span class="n">partitioner</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">partitioner_method</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">data</span><span class="p">,</span> <span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">partitioner_params</span><span class="p">)</span>
|
<span class="bp">self</span><span class="o">.</span><span class="n">partitioner</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">partitioner_method</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="n">data</span><span class="p">,</span> <span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">partitioner_params</span><span class="p">)</span>
|
||||||
<span class="bp">self</span><span class="o">.</span><span class="n">model</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">fts_method</span><span class="p">(</span><span class="n">partitioner</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">partitioner</span><span class="p">,</span> <span class="n">order</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">order</span><span class="p">,</span> <span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">fts_params</span><span class="p">)</span>
|
<span class="bp">self</span><span class="o">.</span><span class="n">model</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">fts_method</span><span class="p">(</span><span class="n">partitioner</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">partitioner</span><span class="p">,</span> <span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">fts_params</span><span class="p">)</span>
|
||||||
<span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>
|
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">is_high_order</span><span class="p">:</span>
|
||||||
|
<span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">order</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">model</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">fts_method</span><span class="p">(</span><span class="n">partitioner</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">partitioner</span><span class="p">,</span>
|
||||||
|
<span class="n">order</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">order</span><span class="p">,</span> <span class="o">**</span><span class="bp">self</span><span class="o">.</span><span class="n">fts_params</span><span class="p">)</span>
|
||||||
|
<span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
|
||||||
|
<span class="bp">self</span><span class="o">.</span><span class="n">shortname</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">shortname</span></div>
|
||||||
|
|
||||||
<div class="viewcode-block" id="Retrainer.forecast"><a class="viewcode-back" href="../../../../pyFTS.models.incremental.html#pyFTS.models.incremental.Retrainer.Retrainer.forecast">[docs]</a> <span class="k">def</span> <span class="nf">forecast</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
<div class="viewcode-block" id="Retrainer.forecast"><a class="viewcode-back" href="../../../../pyFTS.models.incremental.html#pyFTS.models.incremental.Retrainer.Retrainer.forecast">[docs]</a> <span class="k">def</span> <span class="nf">forecast</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
||||||
<span class="n">l</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
|
<span class="n">l</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
|
||||||
@ -120,14 +128,15 @@
|
|||||||
|
|
||||||
<span class="n">ret</span> <span class="o">=</span> <span class="p">[]</span>
|
<span class="n">ret</span> <span class="o">=</span> <span class="p">[]</span>
|
||||||
|
|
||||||
<span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="n">horizon</span><span class="p">,</span> <span class="n">l</span><span class="p">):</span>
|
<span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="n">horizon</span><span class="p">,</span> <span class="n">l</span><span class="o">+</span><span class="mi">1</span><span class="p">):</span>
|
||||||
<span class="n">_train</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="n">k</span> <span class="o">-</span> <span class="n">horizon</span><span class="p">:</span> <span class="n">k</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">order</span><span class="p">]</span>
|
<span class="n">_train</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="n">k</span> <span class="o">-</span> <span class="n">horizon</span><span class="p">:</span> <span class="n">k</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">order</span><span class="p">]</span>
|
||||||
<span class="n">_test</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="n">k</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">order</span><span class="p">:</span> <span class="n">k</span><span class="p">]</span>
|
<span class="n">_test</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="n">k</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">order</span><span class="p">:</span> <span class="n">k</span><span class="p">]</span>
|
||||||
|
|
||||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">auto_update</span><span class="p">:</span>
|
<span class="k">if</span> <span class="n">k</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">batch_size</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">model</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
|
||||||
<span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">train</span><span class="p">(</span><span class="n">_train</span><span class="p">)</span>
|
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">auto_update</span><span class="p">:</span>
|
||||||
<span class="k">else</span><span class="p">:</span>
|
<span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">train</span><span class="p">(</span><span class="n">_train</span><span class="p">)</span>
|
||||||
<span class="bp">self</span><span class="o">.</span><span class="n">train</span><span class="p">(</span><span class="n">_train</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
|
<span class="k">else</span><span class="p">:</span>
|
||||||
|
<span class="bp">self</span><span class="o">.</span><span class="n">train</span><span class="p">(</span><span class="n">_train</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
|
||||||
|
|
||||||
<span class="n">ret</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span><span class="n">_test</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">))</span>
|
<span class="n">ret</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span><span class="n">_test</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">))</span>
|
||||||
|
|
||||||
|
@ -163,17 +163,18 @@
|
|||||||
|
|
||||||
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">datepart</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">mf</span><span class="p">,</span> <span class="n">parameters</span><span class="p">,</span> <span class="n">centroid</span><span class="p">,</span> <span class="n">alpha</span><span class="o">=</span><span class="mf">1.0</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">datepart</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">mf</span><span class="p">,</span> <span class="n">parameters</span><span class="p">,</span> <span class="n">centroid</span><span class="p">,</span> <span class="n">alpha</span><span class="o">=</span><span class="mf">1.0</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
||||||
<span class="nb">super</span><span class="p">(</span><span class="n">FuzzySet</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">mf</span><span class="p">,</span> <span class="n">parameters</span><span class="p">,</span> <span class="n">centroid</span><span class="p">,</span> <span class="n">alpha</span><span class="p">,</span>
|
<span class="nb">super</span><span class="p">(</span><span class="n">FuzzySet</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">mf</span><span class="p">,</span> <span class="n">parameters</span><span class="p">,</span> <span class="n">centroid</span><span class="p">,</span> <span class="n">alpha</span><span class="p">,</span>
|
||||||
<span class="nb">type</span><span class="o">=</span><span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'type'</span><span class="p">,</span> <span class="s1">'datetime'</span><span class="p">),</span>
|
<span class="nb">type</span><span class="o">=</span><span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'type'</span><span class="p">,</span> <span class="s1">'seasonal'</span><span class="p">),</span>
|
||||||
<span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
|
<span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
|
||||||
<span class="bp">self</span><span class="o">.</span><span class="n">datepart</span> <span class="o">=</span> <span class="n">datepart</span>
|
<span class="bp">self</span><span class="o">.</span><span class="n">datepart</span> <span class="o">=</span> <span class="n">datepart</span>
|
||||||
<span class="bp">self</span><span class="o">.</span><span class="n">type</span> <span class="o">=</span> <span class="s1">'seasonal'</span>
|
<span class="bp">self</span><span class="o">.</span><span class="n">type</span> <span class="o">=</span> <span class="s1">'seasonal'</span>
|
||||||
|
|
||||||
<div class="viewcode-block" id="FuzzySet.membership"><a class="viewcode-back" href="../../../../pyFTS.models.seasonal.html#pyFTS.models.seasonal.common.FuzzySet.membership">[docs]</a> <span class="k">def</span> <span class="nf">membership</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
|
<div class="viewcode-block" id="FuzzySet.transform"><a class="viewcode-back" href="../../../../pyFTS.models.seasonal.html#pyFTS.models.seasonal.common.FuzzySet.transform">[docs]</a> <span class="k">def</span> <span class="nf">transform</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
|
||||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s1">'datetime'</span><span class="p">:</span>
|
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s1">'seasonal'</span><span class="p">:</span>
|
||||||
<span class="n">dp</span> <span class="o">=</span> <span class="n">strip_datepart</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">datepart</span><span class="p">)</span>
|
<span class="n">dp</span> <span class="o">=</span> <span class="n">strip_datepart</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">datepart</span><span class="p">)</span>
|
||||||
<span class="k">else</span><span class="p">:</span>
|
<span class="k">else</span><span class="p">:</span>
|
||||||
<span class="n">dp</span> <span class="o">=</span> <span class="n">x</span>
|
<span class="n">dp</span> <span class="o">=</span> <span class="n">x</span>
|
||||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mf</span><span class="p">(</span><span class="n">dp</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">parameters</span><span class="p">)</span> <span class="o">*</span> <span class="bp">self</span><span class="o">.</span><span class="n">alpha</span></div></div>
|
|
||||||
|
<span class="k">return</span> <span class="n">dp</span></div></div>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
8
docs/build/html/_sources/pyFTS.data.rst.txt
vendored
8
docs/build/html/_sources/pyFTS.data.rst.txt
vendored
@ -103,6 +103,14 @@ INMET dataset
|
|||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
|
||||||
|
Malaysia dataset
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
.. automodule:: pyFTS.data.Malaysia
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
||||||
|
|
||||||
NASDAQ module
|
NASDAQ module
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
|
4
docs/build/html/_sources/quickstart.rst.txt
vendored
4
docs/build/html/_sources/quickstart.rst.txt
vendored
@ -27,7 +27,7 @@ Fuzzy Time Series (FTS) are non parametric methods for time series forecasting b
|
|||||||
- which fuzzy membership function (on `pyFTS.common.Membership <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/common/Membership.py>`_)
|
- which fuzzy membership function (on `pyFTS.common.Membership <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/common/Membership.py>`_)
|
||||||
- partition scheme (`GridPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Grid.py>`_, `EntropyPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Entropy.py>`_, `FCMPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/FCM.py>`_, `CMeansPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/CMeans.py>`_, `HuarngPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Huarng.py>`_)
|
- partition scheme (`GridPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Grid.py>`_, `EntropyPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Entropy.py>`_, `FCMPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/FCM.py>`_, `CMeansPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/CMeans.py>`_, `HuarngPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Huarng.py>`_)
|
||||||
|
|
||||||
Check out the jupyter notebook on `pyFTS/notebooks/Partitioners.ipynb <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/notebooks/Partitioners.ipynb>`_ for sample codes.
|
Check out the jupyter notebook on `notebooks/Partitioners.ipynb <https://github.com/PYFTS/notebooks/Partitioners.ipynb>`_ for sample codes.
|
||||||
|
|
||||||
3. **Data Fuzzyfication**: Each data point of the numerical time series *Y(t)* will be translated to a fuzzy representation (usually one or more fuzzy sets), and then a fuzzy time series *F(t)* is created.
|
3. **Data Fuzzyfication**: Each data point of the numerical time series *Y(t)* will be translated to a fuzzy representation (usually one or more fuzzy sets), and then a fuzzy time series *F(t)* is created.
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ Fuzzy Time Series (FTS) are non parametric methods for time series forecasting b
|
|||||||
Usage examples
|
Usage examples
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
There is nothing better than good code examples to start. `Then check out the demo Jupyter Notebooks of the implemented method os pyFTS! <https://github.com/PYFTS/pyFTS/tree/master/pyFTS/notebooks>`_.
|
There is nothing better than good code examples to start. `Then check out the demo Jupyter Notebooks of the implemented method os pyFTS! <https://github.com/PYFTS/notebooks>`_.
|
||||||
|
|
||||||
A Google Colab example can also be found `here <https://drive.google.com/file/d/1zRBCHXOawwgmzjEoKBgmvBqkIrKxuaz9/view?usp=sharing>`_.
|
A Google Colab example can also be found `here <https://drive.google.com/file/d/1zRBCHXOawwgmzjEoKBgmvBqkIrKxuaz9/view?usp=sharing>`_.
|
||||||
|
|
||||||
|
26
docs/build/html/genindex.html
vendored
26
docs/build/html/genindex.html
vendored
@ -231,6 +231,8 @@
|
|||||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
<li><a href="pyFTS.benchmarks.html#pyFTS.benchmarks.Util.base_dataframe_columns">base_dataframe_columns() (in module pyFTS.benchmarks.Util)</a>
|
<li><a href="pyFTS.benchmarks.html#pyFTS.benchmarks.Util.base_dataframe_columns">base_dataframe_columns() (in module pyFTS.benchmarks.Util)</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="pyFTS.models.incremental.html#pyFTS.models.incremental.Retrainer.Retrainer.batch_size">batch_size (pyFTS.models.incremental.Retrainer.Retrainer attribute)</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.common.html#pyFTS.common.Membership.bellmf">bellmf() (in module pyFTS.common.Membership)</a>
|
<li><a href="pyFTS.common.html#pyFTS.common.Membership.bellmf">bellmf() (in module pyFTS.common.Membership)</a>
|
||||||
</li>
|
</li>
|
||||||
@ -740,6 +742,8 @@
|
|||||||
<li><a href="pyFTS.data.html#pyFTS.data.Ethereum.get_data">(in module pyFTS.data.Ethereum)</a>
|
<li><a href="pyFTS.data.html#pyFTS.data.Ethereum.get_data">(in module pyFTS.data.Ethereum)</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.data.html#pyFTS.data.GBPUSD.get_data">(in module pyFTS.data.GBPUSD)</a>
|
<li><a href="pyFTS.data.html#pyFTS.data.GBPUSD.get_data">(in module pyFTS.data.GBPUSD)</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="pyFTS.data.html#pyFTS.data.Malaysia.get_data">(in module pyFTS.data.Malaysia)</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.data.html#pyFTS.data.NASDAQ.get_data">(in module pyFTS.data.NASDAQ)</a>
|
<li><a href="pyFTS.data.html#pyFTS.data.NASDAQ.get_data">(in module pyFTS.data.NASDAQ)</a>
|
||||||
</li>
|
</li>
|
||||||
@ -796,6 +800,8 @@
|
|||||||
<li><a href="pyFTS.data.html#pyFTS.data.GBPUSD.get_dataframe">(in module pyFTS.data.GBPUSD)</a>
|
<li><a href="pyFTS.data.html#pyFTS.data.GBPUSD.get_dataframe">(in module pyFTS.data.GBPUSD)</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.data.html#pyFTS.data.INMET.get_dataframe">(in module pyFTS.data.INMET)</a>
|
<li><a href="pyFTS.data.html#pyFTS.data.INMET.get_dataframe">(in module pyFTS.data.INMET)</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="pyFTS.data.html#pyFTS.data.Malaysia.get_dataframe">(in module pyFTS.data.Malaysia)</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.data.html#pyFTS.data.NASDAQ.get_dataframe">(in module pyFTS.data.NASDAQ)</a>
|
<li><a href="pyFTS.data.html#pyFTS.data.NASDAQ.get_dataframe">(in module pyFTS.data.NASDAQ)</a>
|
||||||
</li>
|
</li>
|
||||||
@ -1156,18 +1162,16 @@
|
|||||||
<li><a href="pyFTS.common.html#pyFTS.common.FuzzySet.FuzzySet.membership">(pyFTS.common.FuzzySet.FuzzySet method)</a>
|
<li><a href="pyFTS.common.html#pyFTS.common.FuzzySet.FuzzySet.membership">(pyFTS.common.FuzzySet.FuzzySet method)</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.models.nonstationary.html#pyFTS.models.nonstationary.common.FuzzySet.membership">(pyFTS.models.nonstationary.common.FuzzySet method)</a>
|
<li><a href="pyFTS.models.nonstationary.html#pyFTS.models.nonstationary.common.FuzzySet.membership">(pyFTS.models.nonstationary.common.FuzzySet method)</a>
|
||||||
</li>
|
|
||||||
<li><a href="pyFTS.models.seasonal.html#pyFTS.models.seasonal.common.FuzzySet.membership">(pyFTS.models.seasonal.common.FuzzySet method)</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li><a href="pyFTS.partitioners.html#pyFTS.partitioners.partitioner.Partitioner.membership_function">membership_function (pyFTS.partitioners.partitioner.Partitioner attribute)</a>
|
<li><a href="pyFTS.partitioners.html#pyFTS.partitioners.partitioner.Partitioner.membership_function">membership_function (pyFTS.partitioners.partitioner.Partitioner attribute)</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.common.html#pyFTS.common.fts.FTS.merge">merge() (pyFTS.common.fts.FTS method)</a>
|
<li><a href="pyFTS.common.html#pyFTS.common.fts.FTS.merge">merge() (pyFTS.common.fts.FTS method)</a>
|
||||||
</li>
|
</li>
|
||||||
</ul></td>
|
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
|
||||||
<li><a href="pyFTS.common.html#pyFTS.common.FuzzySet.FuzzySet.mf">mf (pyFTS.common.FuzzySet.FuzzySet attribute)</a>
|
<li><a href="pyFTS.common.html#pyFTS.common.FuzzySet.FuzzySet.mf">mf (pyFTS.common.FuzzySet.FuzzySet attribute)</a>
|
||||||
</li>
|
</li>
|
||||||
|
</ul></td>
|
||||||
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
<li><a href="pyFTS.common.html#pyFTS.common.fts.FTS.min_order">min_order (pyFTS.common.fts.FTS attribute)</a>
|
<li><a href="pyFTS.common.html#pyFTS.common.fts.FTS.min_order">min_order (pyFTS.common.fts.FTS attribute)</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.models.seasonal.html#pyFTS.models.seasonal.common.DateTime.minute_of_day">minute_of_day (pyFTS.models.seasonal.common.DateTime attribute)</a>
|
<li><a href="pyFTS.models.seasonal.html#pyFTS.models.seasonal.common.DateTime.minute_of_day">minute_of_day (pyFTS.models.seasonal.common.DateTime attribute)</a>
|
||||||
@ -1426,10 +1430,10 @@
|
|||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.ResidualAnalysis">pyFTS.benchmarks.ResidualAnalysis (module)</a>
|
<li><a href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.ResidualAnalysis">pyFTS.benchmarks.ResidualAnalysis (module)</a>
|
||||||
</li>
|
</li>
|
||||||
</ul></td>
|
|
||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
|
||||||
<li><a href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.Util">pyFTS.benchmarks.Util (module)</a>
|
<li><a href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.Util">pyFTS.benchmarks.Util (module)</a>
|
||||||
</li>
|
</li>
|
||||||
|
</ul></td>
|
||||||
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
<li><a href="pyFTS.common.html#module-pyFTS.common">pyFTS.common (module)</a>
|
<li><a href="pyFTS.common.html#module-pyFTS.common">pyFTS.common (module)</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.common.html#module-pyFTS.common.Composite">pyFTS.common.Composite (module)</a>
|
<li><a href="pyFTS.common.html#module-pyFTS.common.Composite">pyFTS.common.Composite (module)</a>
|
||||||
@ -1485,6 +1489,8 @@
|
|||||||
<li><a href="pyFTS.data.html#module-pyFTS.data.lorentz">pyFTS.data.lorentz (module)</a>
|
<li><a href="pyFTS.data.html#module-pyFTS.data.lorentz">pyFTS.data.lorentz (module)</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.data.html#module-pyFTS.data.mackey_glass">pyFTS.data.mackey_glass (module)</a>
|
<li><a href="pyFTS.data.html#module-pyFTS.data.mackey_glass">pyFTS.data.mackey_glass (module)</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="pyFTS.data.html#module-pyFTS.data.Malaysia">pyFTS.data.Malaysia (module)</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.data.html#module-pyFTS.data.NASDAQ">pyFTS.data.NASDAQ (module)</a>
|
<li><a href="pyFTS.data.html#module-pyFTS.data.NASDAQ">pyFTS.data.NASDAQ (module)</a>
|
||||||
</li>
|
</li>
|
||||||
@ -1830,6 +1836,14 @@
|
|||||||
<td style="width: 33%; vertical-align: top;"><ul>
|
<td style="width: 33%; vertical-align: top;"><ul>
|
||||||
<li><a href="pyFTS.models.ensemble.html#pyFTS.models.ensemble.multiseasonal.train_individual_model">train_individual_model() (in module pyFTS.models.ensemble.multiseasonal)</a>
|
<li><a href="pyFTS.models.ensemble.html#pyFTS.models.ensemble.multiseasonal.train_individual_model">train_individual_model() (in module pyFTS.models.ensemble.multiseasonal)</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li><a href="pyFTS.common.html#pyFTS.common.Composite.FuzzySet.transform">transform() (pyFTS.common.Composite.FuzzySet method)</a>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li><a href="pyFTS.common.html#pyFTS.common.FuzzySet.FuzzySet.transform">(pyFTS.common.FuzzySet.FuzzySet method)</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="pyFTS.models.seasonal.html#pyFTS.models.seasonal.common.FuzzySet.transform">(pyFTS.models.seasonal.common.FuzzySet method)</a>
|
||||||
|
</li>
|
||||||
|
</ul></li>
|
||||||
<li><a href="pyFTS.common.html#pyFTS.common.Transformations.Transformation">Transformation (class in pyFTS.common.Transformations)</a>
|
<li><a href="pyFTS.common.html#pyFTS.common.Transformations.Transformation">Transformation (class in pyFTS.common.Transformations)</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="pyFTS.partitioners.html#pyFTS.partitioners.partitioner.Partitioner.transformation">transformation (pyFTS.partitioners.partitioner.Partitioner attribute)</a>
|
<li><a href="pyFTS.partitioners.html#pyFTS.partitioners.partitioner.Partitioner.transformation">transformation (pyFTS.partitioners.partitioner.Partitioner attribute)</a>
|
||||||
|
1
docs/build/html/modules.html
vendored
1
docs/build/html/modules.html
vendored
@ -139,6 +139,7 @@
|
|||||||
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.EURUSD">EUR-USD dataset</a></li>
|
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.EURUSD">EUR-USD dataset</a></li>
|
||||||
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.GBPUSD">GBP-USD dataset</a></li>
|
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.GBPUSD">GBP-USD dataset</a></li>
|
||||||
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.INMET">INMET dataset</a></li>
|
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.INMET">INMET dataset</a></li>
|
||||||
|
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.Malaysia">Malaysia dataset</a></li>
|
||||||
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.NASDAQ">NASDAQ module</a></li>
|
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.NASDAQ">NASDAQ module</a></li>
|
||||||
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.SONDA">SONDA dataset</a></li>
|
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.SONDA">SONDA dataset</a></li>
|
||||||
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.SP500">S&P 500 dataset</a></li>
|
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.SP500">S&P 500 dataset</a></li>
|
||||||
|
BIN
docs/build/html/objects.inv
vendored
BIN
docs/build/html/objects.inv
vendored
Binary file not shown.
5
docs/build/html/py-modindex.html
vendored
5
docs/build/html/py-modindex.html
vendored
@ -275,6 +275,11 @@
|
|||||||
<td>   
|
<td>   
|
||||||
<a href="pyFTS.data.html#module-pyFTS.data.mackey_glass"><code class="xref">pyFTS.data.mackey_glass</code></a></td><td>
|
<a href="pyFTS.data.html#module-pyFTS.data.mackey_glass"><code class="xref">pyFTS.data.mackey_glass</code></a></td><td>
|
||||||
<em></em></td></tr>
|
<em></em></td></tr>
|
||||||
|
<tr class="cg-1">
|
||||||
|
<td></td>
|
||||||
|
<td>   
|
||||||
|
<a href="pyFTS.data.html#module-pyFTS.data.Malaysia"><code class="xref">pyFTS.data.Malaysia</code></a></td><td>
|
||||||
|
<em></em></td></tr>
|
||||||
<tr class="cg-1">
|
<tr class="cg-1">
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>   
|
<td>   
|
||||||
|
32
docs/build/html/pyFTS.common.html
vendored
32
docs/build/html/pyFTS.common.html
vendored
@ -186,6 +186,22 @@
|
|||||||
</table>
|
</table>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
<dl class="method">
|
||||||
|
<dt id="pyFTS.common.Composite.FuzzySet.transform">
|
||||||
|
<code class="descname">transform</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/Composite.html#FuzzySet.transform"><span class="viewcode-link">[source]</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>
|
||||||
|
<table class="docutils field-list" frame="void" rules="none">
|
||||||
|
<col class="field-name" />
|
||||||
|
<col class="field-body" />
|
||||||
|
<tbody valign="top">
|
||||||
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> – </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">return a native type value for the structured type</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</dd></dl>
|
||||||
|
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -376,6 +392,22 @@
|
|||||||
</table>
|
</table>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
<dl class="method">
|
||||||
|
<dt id="pyFTS.common.FuzzySet.FuzzySet.transform">
|
||||||
|
<code class="descname">transform</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/common/FuzzySet.html#FuzzySet.transform"><span class="viewcode-link">[source]</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>
|
||||||
|
<table class="docutils field-list" frame="void" rules="none">
|
||||||
|
<col class="field-name" />
|
||||||
|
<col class="field-body" />
|
||||||
|
<tbody valign="top">
|
||||||
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> – </td>
|
||||||
|
</tr>
|
||||||
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">return a native type value for the structured type</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="attribute">
|
<dl class="attribute">
|
||||||
<dt id="pyFTS.common.FuzzySet.FuzzySet.type">
|
<dt id="pyFTS.common.FuzzySet.FuzzySet.type">
|
||||||
<code class="descname">type</code><em class="property"> = None</em><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.type" title="Permalink to this definition">¶</a></dt>
|
<code class="descname">type</code><em class="property"> = None</em><a class="headerlink" href="#pyFTS.common.FuzzySet.FuzzySet.type" title="Permalink to this definition">¶</a></dt>
|
||||||
|
35
docs/build/html/pyFTS.data.html
vendored
35
docs/build/html/pyFTS.data.html
vendored
@ -76,6 +76,7 @@
|
|||||||
<li><a class="reference internal" href="#module-pyFTS.data.EURUSD">EUR-USD dataset</a></li>
|
<li><a class="reference internal" href="#module-pyFTS.data.EURUSD">EUR-USD dataset</a></li>
|
||||||
<li><a class="reference internal" href="#module-pyFTS.data.GBPUSD">GBP-USD dataset</a></li>
|
<li><a class="reference internal" href="#module-pyFTS.data.GBPUSD">GBP-USD dataset</a></li>
|
||||||
<li><a class="reference internal" href="#module-pyFTS.data.INMET">INMET dataset</a></li>
|
<li><a class="reference internal" href="#module-pyFTS.data.INMET">INMET dataset</a></li>
|
||||||
|
<li><a class="reference internal" href="#module-pyFTS.data.Malaysia">Malaysia dataset</a></li>
|
||||||
<li><a class="reference internal" href="#module-pyFTS.data.NASDAQ">NASDAQ module</a></li>
|
<li><a class="reference internal" href="#module-pyFTS.data.NASDAQ">NASDAQ module</a></li>
|
||||||
<li><a class="reference internal" href="#module-pyFTS.data.SONDA">SONDA dataset</a></li>
|
<li><a class="reference internal" href="#module-pyFTS.data.SONDA">SONDA dataset</a></li>
|
||||||
<li><a class="reference internal" href="#module-pyFTS.data.SP500">S&P 500 dataset</a></li>
|
<li><a class="reference internal" href="#module-pyFTS.data.SP500">S&P 500 dataset</a></li>
|
||||||
@ -453,6 +454,40 @@ If the file don’t already exists, it will be downloaded and decompressed.</p>
|
|||||||
</table>
|
</table>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="section" id="module-pyFTS.data.Malaysia">
|
||||||
|
<span id="malaysia-dataset"></span><h2>Malaysia dataset<a class="headerlink" href="#module-pyFTS.data.Malaysia" title="Permalink to this headline">¶</a></h2>
|
||||||
|
<p>Hourly Malaysia eletric load and tempeature</p>
|
||||||
|
<dl class="function">
|
||||||
|
<dt id="pyFTS.data.Malaysia.get_data">
|
||||||
|
<code class="descclassname">pyFTS.data.Malaysia.</code><code class="descname">get_data</code><span class="sig-paren">(</span><em>field='load'</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/Malaysia.html#get_data"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.Malaysia.get_data" title="Permalink to this definition">¶</a></dt>
|
||||||
|
<dd><p>Get the univariate time series data.</p>
|
||||||
|
<table class="docutils field-list" frame="void" rules="none">
|
||||||
|
<col class="field-name" />
|
||||||
|
<col class="field-body" />
|
||||||
|
<tbody valign="top">
|
||||||
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>field</strong> – dataset field to load</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">numpy array</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</dd></dl>
|
||||||
|
|
||||||
|
<dl class="function">
|
||||||
|
<dt id="pyFTS.data.Malaysia.get_dataframe">
|
||||||
|
<code class="descclassname">pyFTS.data.Malaysia.</code><code class="descname">get_dataframe</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/data/Malaysia.html#get_dataframe"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.data.Malaysia.get_dataframe" title="Permalink to this definition">¶</a></dt>
|
||||||
|
<dd><p>Get the complete multivariate time series data.</p>
|
||||||
|
<table class="docutils field-list" frame="void" rules="none">
|
||||||
|
<col class="field-name" />
|
||||||
|
<col class="field-body" />
|
||||||
|
<tbody valign="top">
|
||||||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Pandas DataFrame</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</dd></dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="module-pyFTS.data.NASDAQ">
|
<div class="section" id="module-pyFTS.data.NASDAQ">
|
||||||
<span id="nasdaq-module"></span><h2>NASDAQ module<a class="headerlink" href="#module-pyFTS.data.NASDAQ" title="Permalink to this headline">¶</a></h2>
|
<span id="nasdaq-module"></span><h2>NASDAQ module<a class="headerlink" href="#module-pyFTS.data.NASDAQ" title="Permalink to this headline">¶</a></h2>
|
||||||
|
1
docs/build/html/pyFTS.html
vendored
1
docs/build/html/pyFTS.html
vendored
@ -151,6 +151,7 @@
|
|||||||
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.EURUSD">EUR-USD dataset</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.EURUSD">EUR-USD dataset</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.GBPUSD">GBP-USD dataset</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.GBPUSD">GBP-USD dataset</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.INMET">INMET dataset</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.INMET">INMET dataset</a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.Malaysia">Malaysia dataset</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.NASDAQ">NASDAQ module</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.NASDAQ">NASDAQ module</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.SONDA">SONDA dataset</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.SONDA">SONDA dataset</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.SP500">S&P 500 dataset</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.SP500">S&P 500 dataset</a></li>
|
||||||
|
@ -127,6 +127,12 @@
|
|||||||
<dd><p>If true the model is updated at each time and not recreated</p>
|
<dd><p>If true the model is updated at each time and not recreated</p>
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
|
<dl class="attribute">
|
||||||
|
<dt id="pyFTS.models.incremental.Retrainer.Retrainer.batch_size">
|
||||||
|
<code class="descname">batch_size</code><em class="property"> = None</em><a class="headerlink" href="#pyFTS.models.incremental.Retrainer.Retrainer.batch_size" title="Permalink to this definition">¶</a></dt>
|
||||||
|
<dd><p>The batch interval between each retraining</p>
|
||||||
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="method">
|
<dl class="method">
|
||||||
<dt id="pyFTS.models.incremental.Retrainer.Retrainer.forecast">
|
<dt id="pyFTS.models.incremental.Retrainer.Retrainer.forecast">
|
||||||
<code class="descname">forecast</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/incremental/Retrainer.html#Retrainer.forecast"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.incremental.Retrainer.Retrainer.forecast" title="Permalink to this definition">¶</a></dt>
|
<code class="descname">forecast</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/incremental/Retrainer.html#Retrainer.forecast"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.incremental.Retrainer.Retrainer.forecast" title="Permalink to this definition">¶</a></dt>
|
||||||
|
10
docs/build/html/pyFTS.models.seasonal.html
vendored
10
docs/build/html/pyFTS.models.seasonal.html
vendored
@ -463,16 +463,16 @@
|
|||||||
<dd><p>Bases: <a class="reference internal" href="pyFTS.common.html#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>
|
<dd><p>Bases: <a class="reference internal" href="pyFTS.common.html#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>Temporal/Seasonal Fuzzy Set</p>
|
<p>Temporal/Seasonal Fuzzy Set</p>
|
||||||
<dl class="method">
|
<dl class="method">
|
||||||
<dt id="pyFTS.models.seasonal.common.FuzzySet.membership">
|
<dt id="pyFTS.models.seasonal.common.FuzzySet.transform">
|
||||||
<code class="descname">membership</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/seasonal/common.html#FuzzySet.membership"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.seasonal.common.FuzzySet.membership" title="Permalink to this definition">¶</a></dt>
|
<code class="descname">transform</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/seasonal/common.html#FuzzySet.transform"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.seasonal.common.FuzzySet.transform" title="Permalink to this definition">¶</a></dt>
|
||||||
<dd><p>Calculate the membership value of a given input</p>
|
<dd><p>Preprocess the data point for non native types</p>
|
||||||
<table class="docutils field-list" frame="void" rules="none">
|
<table class="docutils field-list" frame="void" rules="none">
|
||||||
<col class="field-name" />
|
<col class="field-name" />
|
||||||
<col class="field-body" />
|
<col class="field-body" />
|
||||||
<tbody valign="top">
|
<tbody valign="top">
|
||||||
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> – input value</td>
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>x</strong> – </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">membership value of x at this fuzzy set</td>
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">return a native type value for the structured type</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
4
docs/build/html/quickstart.html
vendored
4
docs/build/html/quickstart.html
vendored
@ -126,7 +126,7 @@
|
|||||||
<li>which fuzzy membership function (on <a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/common/Membership.py">pyFTS.common.Membership</a>)</li>
|
<li>which fuzzy membership function (on <a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/common/Membership.py">pyFTS.common.Membership</a>)</li>
|
||||||
<li>partition scheme (<a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Grid.py">GridPartitioner</a>, <a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Entropy.py">EntropyPartitioner</a>, <a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/FCM.py">FCMPartitioner</a>, <a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/CMeans.py">CMeansPartitioner</a>, <a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Huarng.py">HuarngPartitioner</a>)</li>
|
<li>partition scheme (<a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Grid.py">GridPartitioner</a>, <a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Entropy.py">EntropyPartitioner</a>, <a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/FCM.py">FCMPartitioner</a>, <a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/CMeans.py">CMeansPartitioner</a>, <a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Huarng.py">HuarngPartitioner</a>)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Check out the jupyter notebook on <a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/notebooks/Partitioners.ipynb">pyFTS/notebooks/Partitioners.ipynb</a> for sample codes.</p>
|
<p>Check out the jupyter notebook on <a class="reference external" href="https://github.com/PYFTS/notebooks/Partitioners.ipynb">notebooks/Partitioners.ipynb</a> for sample codes.</p>
|
||||||
</div></blockquote>
|
</div></blockquote>
|
||||||
<ol class="arabic simple" start="3">
|
<ol class="arabic simple" start="3">
|
||||||
<li><strong>Data Fuzzyfication</strong>: Each data point of the numerical time series <em>Y(t)</em> will be translated to a fuzzy representation (usually one or more fuzzy sets), and then a fuzzy time series <em>F(t)</em> is created.</li>
|
<li><strong>Data Fuzzyfication</strong>: Each data point of the numerical time series <em>Y(t)</em> will be translated to a fuzzy representation (usually one or more fuzzy sets), and then a fuzzy time series <em>F(t)</em> is created.</li>
|
||||||
@ -145,7 +145,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="section" id="usage-examples">
|
<div class="section" id="usage-examples">
|
||||||
<h2>Usage examples<a class="headerlink" href="#usage-examples" title="Permalink to this headline">¶</a></h2>
|
<h2>Usage examples<a class="headerlink" href="#usage-examples" title="Permalink to this headline">¶</a></h2>
|
||||||
<p>There is nothing better than good code examples to start. <a class="reference external" href="https://github.com/PYFTS/pyFTS/tree/master/pyFTS/notebooks">Then check out the demo Jupyter Notebooks of the implemented method os pyFTS!</a>.</p>
|
<p>There is nothing better than good code examples to start. <a class="reference external" href="https://github.com/PYFTS/notebooks">Then check out the demo Jupyter Notebooks of the implemented method os pyFTS!</a>.</p>
|
||||||
<p>A Google Colab example can also be found <a class="reference external" href="https://drive.google.com/file/d/1zRBCHXOawwgmzjEoKBgmvBqkIrKxuaz9/view?usp=sharing">here</a>.</p>
|
<p>A Google Colab example can also be found <a class="reference external" href="https://drive.google.com/file/d/1zRBCHXOawwgmzjEoKBgmvBqkIrKxuaz9/view?usp=sharing">here</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="references">
|
<div class="section" id="references">
|
||||||
|
2
docs/build/html/searchindex.js
vendored
2
docs/build/html/searchindex.js
vendored
File diff suppressed because one or more lines are too long
@ -103,6 +103,14 @@ INMET dataset
|
|||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
|
||||||
|
Malaysia dataset
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
.. automodule:: pyFTS.data.Malaysia
|
||||||
|
:members:
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
||||||
|
|
||||||
NASDAQ module
|
NASDAQ module
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ Fuzzy Time Series (FTS) are non parametric methods for time series forecasting b
|
|||||||
- which fuzzy membership function (on `pyFTS.common.Membership <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/common/Membership.py>`_)
|
- which fuzzy membership function (on `pyFTS.common.Membership <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/common/Membership.py>`_)
|
||||||
- partition scheme (`GridPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Grid.py>`_, `EntropyPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Entropy.py>`_, `FCMPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/FCM.py>`_, `CMeansPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/CMeans.py>`_, `HuarngPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Huarng.py>`_)
|
- partition scheme (`GridPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Grid.py>`_, `EntropyPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Entropy.py>`_, `FCMPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/FCM.py>`_, `CMeansPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/CMeans.py>`_, `HuarngPartitioner <https://github.com/PYFTS/pyFTS/blob/master/pyFTS/partitioners/Huarng.py>`_)
|
||||||
|
|
||||||
Check out the jupyter notebook on `pyFTS/notebooks/Partitioners.ipynb <https://github.com/PYFTS/notebooks/Partitioners.ipynb>`_ for sample codes.
|
Check out the jupyter notebook on `notebooks/Partitioners.ipynb <https://github.com/PYFTS/notebooks/Partitioners.ipynb>`_ for sample codes.
|
||||||
|
|
||||||
3. **Data Fuzzyfication**: Each data point of the numerical time series *Y(t)* will be translated to a fuzzy representation (usually one or more fuzzy sets), and then a fuzzy time series *F(t)* is created.
|
3. **Data Fuzzyfication**: Each data point of the numerical time series *Y(t)* will be translated to a fuzzy representation (usually one or more fuzzy sets), and then a fuzzy time series *F(t)* is created.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user