Updating the documentation

This commit is contained in:
Petrônio Cândido 2018-11-07 11:31:46 -02:00
parent 5d90cbea82
commit 4eaeb90e4a
33 changed files with 312 additions and 38 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -98,6 +98,7 @@
<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/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/SONDA.html">pyFTS.data.SONDA</a></li>
<li><a href="pyFTS/data/SP500.html">pyFTS.data.SP500</a></li>

View File

@ -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">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">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>
<span class="sd">&quot;&quot;&quot;</span>

View File

@ -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">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">&quot;&quot;&quot;</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"> &quot;&quot;&quot;</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>
<span class="sd">&quot;&quot;&quot;</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"> :return: membership value of x at this fuzzy set</span>
<span class="sd"> &quot;&quot;&quot;</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>
<span class="sd">&quot;&quot;&quot;</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">&gt;</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">&lt;</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">&lt;=</span> <span class="n">x</span> <span class="o">&lt;=</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">&lt;=</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">&lt;=</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">elif</span> <span class="n">midpoint</span> <span class="o">&lt;=</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">elif</span> <span class="n">midpoint</span> <span class="o">&gt;=</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">if</span> <span class="n">x</span> <span class="o">&lt;</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">&lt;</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="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>

View File

@ -102,7 +102,8 @@
<span class="sd"> :return: Pandas DataFrame</span>
<span class="sd"> &quot;&quot;&quot;</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">&#39;https://query.data.world/s/72gews5w3c7oaf7by5vp7evsasluia&#39;</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">&quot;BTCUSD.csv&quot;</span><span class="p">,</span> <span class="s2">&quot;https://query.data.world/s/72gews5w3c7oaf7by5vp7evsasluia&quot;</span><span class="p">,</span>
<span class="n">sep</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">df</span></div>

View File

@ -103,7 +103,8 @@
<span class="sd"> :return: Pandas DataFrame</span>
<span class="sd"> &quot;&quot;&quot;</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">&#39;https://query.data.world/s/d4hfir3xrelkx33o3bfs5dbhyiztml&#39;</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">&quot;DowJones.csv&quot;</span><span class="p">,</span> <span class="s2">&quot;https://query.data.world/s/d4hfir3xrelkx33o3bfs5dbhyiztml&quot;</span><span class="p">,</span>
<span class="n">sep</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">df</span></div>

View File

@ -101,7 +101,8 @@
<span class="sd"> :return: Pandas DataFrame</span>
<span class="sd"> &quot;&quot;&quot;</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">&#39;https://query.data.world/s/gvsaeruthnxjkwzl7z4ki7u5rduah3&#39;</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">&quot;EURGBP.csv&quot;</span><span class="p">,</span> <span class="s2">&quot;https://query.data.world/s/gvsaeruthnxjkwzl7z4ki7u5rduah3&quot;</span><span class="p">,</span>
<span class="n">sep</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">df</span></div>

View File

@ -101,7 +101,8 @@
<span class="sd"> :return: Pandas DataFrame</span>
<span class="sd"> &quot;&quot;&quot;</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">&#39;https://query.data.world/s/od4eojioz4w6o5bbwxjfn6j5zoqtos&#39;</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">&quot;EURUSD.csv&quot;</span><span class="p">,</span> <span class="s2">&quot;https://query.data.world/s/od4eojioz4w6o5bbwxjfn6j5zoqtos&quot;</span><span class="p">,</span>
<span class="n">sep</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">df</span></div>

View File

@ -103,7 +103,8 @@
<span class="sd"> :return: Pandas DataFrame</span>
<span class="sd"> &quot;&quot;&quot;</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">&#39;https://query.data.world/s/qj4ly7o4rl7oq527xzy4v76wkr3hws&#39;</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">&quot;ETHUSD.csv&quot;</span><span class="p">,</span> <span class="s2">&quot;https://query.data.world/s/qj4ly7o4rl7oq527xzy4v76wkr3hws&quot;</span><span class="p">,</span>
<span class="n">sep</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">df</span></div>

View File

@ -101,7 +101,8 @@
<span class="sd"> :return: Pandas DataFrame</span>
<span class="sd"> &quot;&quot;&quot;</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">&#39;https://query.data.world/s/sw4mijpowb3mqv6bsat7cdj54hyxix&#39;</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">&quot;GBPUSD.csv&quot;</span><span class="p">,</span> <span class="s2">&quot;https://query.data.world/s/sw4mijpowb3mqv6bsat7cdj54hyxix&quot;</span><span class="p">,</span>
<span class="n">sep</span><span class="o">=</span><span class="s2">&quot;,&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">df</span></div>

View 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 &#8212; 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> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" accesskey="U">Module code</a> &#187;</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">&quot;&quot;&quot;</span>
<span class="sd">Hourly Malaysia eletric load and tempeature</span>
<span class="sd">&quot;&quot;&quot;</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">&#39;load&#39;</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</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"> &quot;&quot;&quot;</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">&quot;&quot;&quot;</span>
<span class="sd"> Get the complete multivariate time series data.</span>
<span class="sd"> :return: Pandas DataFrame</span>
<span class="sd"> &quot;&quot;&quot;</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">&quot;malaysia.csv&quot;</span><span class="p">,</span><span class="s2">&quot;https://query.data.world/s/e5arbthdytod3m7wfcg7gmtluh3wa5&quot;</span><span class="p">,</span>
<span class="n">sep</span><span class="o">=</span><span class="s2">&quot;;&quot;</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> &#187;</li>
<li class="nav-item nav-item-1"><a href="../../index.html" >Module code</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; 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>

View File

@ -106,12 +106,20 @@
<span class="sd">&quot;&quot;&quot;The memory window length&quot;&quot;&quot;</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">&quot;&quot;&quot;If true the model is updated at each time and not recreated&quot;&quot;&quot;</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">&#39;batch_size&#39;</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span>
<span class="sd">&quot;&quot;&quot;The batch interval between each retraining&quot;&quot;&quot;</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>
<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="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="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="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>
<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,10 +128,11 @@
<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">_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="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="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">auto_update</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">else</span><span class="p">:</span>

View File

@ -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="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">&#39;type&#39;</span><span class="p">,</span> <span class="s1">&#39;datetime&#39;</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">&#39;type&#39;</span><span class="p">,</span> <span class="s1">&#39;seasonal&#39;</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">type</span> <span class="o">=</span> <span class="s1">&#39;seasonal&#39;</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>
<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">&#39;datetime&#39;</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">&#39;seasonal&#39;</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="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>
</div>

View File

@ -103,6 +103,14 @@ INMET dataset
:undoc-members:
:show-inheritance:
Malaysia dataset
-----------------------
.. automodule:: pyFTS.data.Malaysia
:members:
:undoc-members:
:show-inheritance:
NASDAQ module
------------------------

View File

@ -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>`_)
- 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.
@ -47,7 +47,7 @@ Fuzzy Time Series (FTS) are non parametric methods for time series forecasting b
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>`_.

View File

@ -231,6 +231,8 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<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>
<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><a href="pyFTS.common.html#pyFTS.common.Membership.bellmf">bellmf() (in module pyFTS.common.Membership)</a>
</li>
@ -740,6 +742,8 @@
<li><a href="pyFTS.data.html#pyFTS.data.Ethereum.get_data">(in module pyFTS.data.Ethereum)</a>
</li>
<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><a href="pyFTS.data.html#pyFTS.data.NASDAQ.get_data">(in module pyFTS.data.NASDAQ)</a>
</li>
@ -796,6 +800,8 @@
<li><a href="pyFTS.data.html#pyFTS.data.GBPUSD.get_dataframe">(in module pyFTS.data.GBPUSD)</a>
</li>
<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><a href="pyFTS.data.html#pyFTS.data.NASDAQ.get_dataframe">(in module pyFTS.data.NASDAQ)</a>
</li>
@ -1156,18 +1162,16 @@
<li><a href="pyFTS.common.html#pyFTS.common.FuzzySet.FuzzySet.membership">(pyFTS.common.FuzzySet.FuzzySet method)</a>
</li>
<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>
</ul></li>
<li><a href="pyFTS.partitioners.html#pyFTS.partitioners.partitioner.Partitioner.membership_function">membership_function (pyFTS.partitioners.partitioner.Partitioner attribute)</a>
</li>
<li><a href="pyFTS.common.html#pyFTS.common.fts.FTS.merge">merge() (pyFTS.common.fts.FTS method)</a>
</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>
</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>
<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><a href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.ResidualAnalysis">pyFTS.benchmarks.ResidualAnalysis (module)</a>
</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>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="pyFTS.common.html#module-pyFTS.common">pyFTS.common (module)</a>
</li>
<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>
<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><a href="pyFTS.data.html#module-pyFTS.data.NASDAQ">pyFTS.data.NASDAQ (module)</a>
</li>
@ -1830,6 +1836,14 @@
<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>
<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>
<li><a href="pyFTS.partitioners.html#pyFTS.partitioners.partitioner.Partitioner.transformation">transformation (pyFTS.partitioners.partitioner.Partitioner attribute)</a>

View File

@ -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.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.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.SONDA">SONDA dataset</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.SP500">S&amp;P 500 dataset</a></li>

Binary file not shown.

View File

@ -275,6 +275,11 @@
<td>&#160;&#160;&#160;
<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>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<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">
<td></td>
<td>&#160;&#160;&#160;

View File

@ -186,6 +186,22 @@
</table>
</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>
</div>
@ -376,6 +392,22 @@
</table>
</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">
<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>

View File

@ -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.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.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.SONDA">SONDA dataset</a></li>
<li><a class="reference internal" href="#module-pyFTS.data.SP500">S&amp;P 500 dataset</a></li>
@ -453,6 +454,40 @@ If the file dont already exists, it will be downloaded and decompressed.</p>
</table>
</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 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>

View File

@ -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.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.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.SONDA">SONDA dataset</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.data.html#module-pyFTS.data.SP500">S&amp;P 500 dataset</a></li>

View File

@ -127,6 +127,12 @@
<dd><p>If true the model is updated at each time and not recreated</p>
</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">
<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>

View File

@ -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>
<p>Temporal/Seasonal Fuzzy Set</p>
<dl class="method">
<dt id="pyFTS.models.seasonal.common.FuzzySet.membership">
<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>
<dd><p>Calculate the membership value of a given input</p>
<dt id="pyFTS.models.seasonal.common.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/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>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> input value</td>
<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">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>
</tbody>
</table>

View File

@ -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>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>
<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>
<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>
@ -145,7 +145,7 @@
</div>
<div class="section" id="usage-examples">
<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>
</div>
<div class="section" id="references">

File diff suppressed because one or more lines are too long

View File

@ -103,6 +103,14 @@ INMET dataset
:undoc-members:
:show-inheritance:
Malaysia dataset
-----------------------
.. automodule:: pyFTS.data.Malaysia
:members:
:undoc-members:
:show-inheritance:
NASDAQ module
------------------------

View File

@ -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>`_)
- 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.