pyFTS/docs/build/html/quickstart.html
2020-08-18 17:06:41 -03:00

189 lines
11 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"><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 Quick Start &#8212; pyFTS 1.6 documentation</title>
<link rel="stylesheet" href="_static/bizstyle.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script src="_static/bizstyle.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="pyFTS" href="modules.html" />
<link rel="prev" title="pyFTS - Fuzzy Time Series for Python" href="index.html" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!--[if lt IE 9]>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="modules.html" title="pyFTS"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="pyFTS - Fuzzy Time Series for Python"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS Quick Start</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="pyfts-quick-start">
<h1>pyFTS Quick Start<a class="headerlink" href="#pyfts-quick-start" title="Permalink to this headline"></a></h1>
<div class="section" id="how-to-install-pyfts">
<h2>How to install pyFTS?<a class="headerlink" href="#how-to-install-pyfts" title="Permalink to this headline"></a></h2>
<img alt="https://img.shields.io/badge/Made%20with-Python-1f425f.svg" src="https://img.shields.io/badge/Made%20with-Python-1f425f.svg" /><p>Before of all, pyFTS was developed and tested with Python 3.6. To install pyFTS using pip tool</p>
<blockquote>
<div><p>pip install -U pyFTS</p>
</div></blockquote>
<p>Ou clone directly from the GitHub repo for the most recent review:</p>
<blockquote>
<div><p>pip install -U git+https://github.com/PYFTS/pyFTS</p>
</div></blockquote>
</div>
<div class="section" id="what-are-fuzzy-time-series-fts">
<h2>What are Fuzzy Time Series (FTS)?<a class="headerlink" href="#what-are-fuzzy-time-series-fts" title="Permalink to this headline"></a></h2>
<p>Fuzzy Time Series (FTS) are non parametric methods for time series forecasting based on Fuzzy Theory. The original method was proposed by [1] and improved later by many researchers. The general approach of the FTS methods, based on [2] is listed below:</p>
<ol class="arabic simple">
<li><p><strong>Data preprocessing</strong>: Data transformation functions contained at <a class="reference external" href="https://github.com/PYFTS/pyFTS/blob/master/pyFTS/common/Transformations.py">pyFTS.common.Transformations</a>, like differentiation, Box-Cox, scaling and normalization.</p></li>
<li><p><strong>Universe of Discourse Partitioning</strong>: This is the most important step. Here, the range of values of the numerical time series <em>Y(t)</em> will be splited in overlapped intervals and for each interval will be created a Fuzzy Set. This step is performed by pyFTS.partition module and its classes (for instance GridPartitioner, EntropyPartitioner, etc). The main parameters are:</p></li>
</ol>
<blockquote>
<div><ul class="simple">
<li><p>the number of intervals</p></li>
<li><p>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>)</p></li>
<li><p>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/Huarng.py">HuarngPartitioner</a>)</p></li>
</ul>
<p>Check out the jupyter notebook on <a class="reference external" href="https://github.com/PYFTS/notebooks/blob/master/Partitioners.ipynb">notebooks/Partitioners.ipynb</a> for sample codes.</p>
</div></blockquote>
<ol class="arabic simple" start="3">
<li><p><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.</p></li>
</ol>
<p>4. <strong>Generation of Fuzzy Rules</strong>: In this step the temporal transition rules are created. These rules depends on the method and their characteristics:
- <em>order</em>: the number of time lags used on forecasting
- <em>weights</em>: the weighted models introduce weights on fuzzy rules for smoothing
- <em>seasonality</em>: seasonality models
- <em>steps ahead</em>: the number of steps ahed to predict. Almost all standard methods are based on one-step-ahead forecasting
- <em>forecasting type</em>: Almost all standard methods are point-based, but pyFTS also provides intervalar and probabilistic forecasting methods.</p>
<ol class="arabic simple" start="5">
<li><p><strong>Forecasting</strong>: The forecasting step takes a sample (with minimum length equal to the models order) and generate a fuzzy outputs (fuzzy set(s)) for the next time ahead.</p></li>
<li><p><strong>Defuzzyfication</strong>: This step transform the fuzzy forecast into a real number.</p></li>
<li><p><strong>Data postprocessing</strong>: The inverse operations of step 1.</p></li>
</ol>
</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/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="a-short-tutorial-on-fuzzy-time-series">
<h2>A short tutorial on Fuzzy Time Series<a class="headerlink" href="#a-short-tutorial-on-fuzzy-time-series" title="Permalink to this headline"></a></h2>
<p>Part I: <a class="reference external" href="https://towardsdatascience.com/a-short-tutorial-on-fuzzy-time-series-dcc6d4eb1b15">Introduction to the Fuzzy Logic, Fuzzy Time Series and the pyFTS library</a>.</p>
<p>Part II: <a class="reference external" href="https://towardsdatascience.com/a-short-tutorial-on-fuzzy-time-series-part-ii-with-an-case-study-on-solar-energy-bda362ecca6d">High order, weighted and multivariate methods and a case study of solar energy forecasting.</a>.</p>
<p>Part III: <a class="reference external" href="https://towardsdatascience.com/a-short-tutorial-on-fuzzy-time-series-part-iii-69445dff83fb">Interval and probabilistic forecasting, non-stationary time series, concept drifts and time variant models.</a>.</p>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">pyFTS Quick Start</a><ul>
<li><a class="reference internal" href="#how-to-install-pyfts">How to install pyFTS?</a></li>
<li><a class="reference internal" href="#what-are-fuzzy-time-series-fts">What are Fuzzy Time Series (FTS)?</a></li>
<li><a class="reference internal" href="#usage-examples">Usage examples</a></li>
<li><a class="reference internal" href="#a-short-tutorial-on-fuzzy-time-series">A short tutorial on Fuzzy Time Series</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter">pyFTS - Fuzzy Time Series for Python</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="modules.html"
title="next chapter">pyFTS</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/quickstart.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="modules.html" title="pyFTS"
>next</a> |</li>
<li class="right" >
<a href="index.html" title="pyFTS - Fuzzy Time Series for Python"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS Quick Start</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2018, Machine Intelligence and Data Science Laboratory - UFMG - Brazil.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>