Documentation update

This commit is contained in:
Petrônio Cândido 2020-08-18 17:06:41 -03:00
parent ce0c05670b
commit 8bef7b728d
57 changed files with 11953 additions and 11446 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 41ff467374509b0e2dd07723961f02a2
config: b63d11eac6819505a39e742f563e774b
tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@ -2,10 +2,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<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">
<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']);
@ -20,17 +20,18 @@
<title>Overview: module code &#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 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>
<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" />
<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>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -42,28 +43,10 @@
<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.6 documentation</a> &#187;</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="">Overview: 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>
<div class="document">
<div class="documentwrapper">
@ -78,7 +61,6 @@
<li><a href="pyFTS/benchmarks/Util.html">pyFTS.benchmarks.Util</a></li>
<li><a href="pyFTS/benchmarks/arima.html">pyFTS.benchmarks.arima</a></li>
<li><a href="pyFTS/benchmarks/benchmarks.html">pyFTS.benchmarks.benchmarks</a></li>
<li><a href="pyFTS/benchmarks/gaussianproc.html">pyFTS.benchmarks.gaussianproc</a></li>
<li><a href="pyFTS/benchmarks/knn.html">pyFTS.benchmarks.knn</a></li>
<li><a href="pyFTS/benchmarks/naive.html">pyFTS.benchmarks.naive</a></li>
<li><a href="pyFTS/benchmarks/quantreg.html">pyFTS.benchmarks.quantreg</a></li>
@ -114,7 +96,9 @@
<li><a href="pyFTS/data/mackey_glass.html">pyFTS.data.mackey_glass</a></li>
<li><a href="pyFTS/data/rossler.html">pyFTS.data.rossler</a></li>
<li><a href="pyFTS/data/sunspots.html">pyFTS.data.sunspots</a></li>
<li><a href="pyFTS/distributed/spark.html">pyFTS.distributed.spark</a></li>
<li><a href="pyFTS/distributed/dispy.html">pyFTS.distributed.dispy</a></li>
<li><a href="pyFTS/hyperparam/Evolutionary.html">pyFTS.hyperparam.Evolutionary</a></li>
<li><a href="pyFTS/hyperparam/GridSearch.html">pyFTS.hyperparam.GridSearch</a></li>
<li><a href="pyFTS/hyperparam/Util.html">pyFTS.hyperparam.Util</a></li>
<li><a href="pyFTS/models/chen.html">pyFTS.models.chen</a></li>
<li><a href="pyFTS/models/cheng.html">pyFTS.models.cheng</a></li>
@ -169,9 +153,24 @@
<li><a href="pyFTS/probabilistic/kde.html">pyFTS.probabilistic.kde</a></li>
</ul>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<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">
@ -183,12 +182,13 @@
<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.6 documentation</a> &#187;</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="">Overview: module code</a></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.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>

View File

@ -10,7 +10,6 @@ pyFTS - Fuzzy Time Series for Python
What is pyFTS Library?
----------------------
.. image:: https://badges.frapsoft.com/os/v2/open-source.png?v=103
.. image:: https://img.shields.io/badge/License-GPLv3-blue.svg
.. image:: https://img.shields.io/badge/Made%20with-Python-1f425f.svg

View File

@ -51,14 +51,12 @@ There is nothing better than good code examples to start. `Then check out the de
A Google Colab example can also be found `here <https://drive.google.com/file/d/1zRBCHXOawwgmzjEoKBgmvBqkIrKxuaz9/view?usp=sharing>`_.
References
----------
A short tutorial on Fuzzy Time Series
-------------------------------------
Part I: `Introduction to the Fuzzy Logic, Fuzzy Time Series and the pyFTS library <https://towardsdatascience.com/a-short-tutorial-on-fuzzy-time-series-dcc6d4eb1b15>`_.
Part II: `High order, weighted and multivariate methods and a case study of solar energy forecasting. <https://towardsdatascience.com/a-short-tutorial-on-fuzzy-time-series-part-ii-with-an-case-study-on-solar-energy-bda362ecca6d>`_.
Part III: `Interval and probabilistic forecasting, non-stationary time series, concept drifts and time variant models. <https://towardsdatascience.com/a-short-tutorial-on-fuzzy-time-series-part-iii-69445dff83fb>`_.
1. Q. Song and B. S. Chissom, “Fuzzy time series and its models,” Fuzzy Sets Syst., vol. 54, no. 3, pp. 269277, 1993.
2. S.-M. Chen, “Forecasting enrollments based on fuzzy time series,” Fuzzy Sets Syst., vol. 81, no. 3, pp. 311319, 1996.
3. C. H. Cheng, R. J. Chang, and C. A. Yeh, “Entropy-based and trapezoidal fuzzification-based fuzzy time series approach for forecasting IT project cost”. Technol. Forecast. Social Change, vol. 73, no. 5, pp. 524542, Jun. 2006.
4. K. H. Huarng, “Effective lengths of intervals to improve forecasting in fuzzy time series”. Fuzzy Sets Syst., vol. 123, no. 3, pp. 387394, Nov. 2001.
5. H.-K. Yu, “Weighted fuzzy time series models for TAIEX forecasting”. Phys. A Stat. Mech. its Appl., vol. 349, no. 3, pp. 609624, 2005.
6. R. Efendi, Z. Ismail, and M. M. Deris, “Improved weight Fuzzy Time Series as used in the exchange rates forecasting of US Dollar to Ringgit Malaysia,” Int. J. Comput. Intell. Appl., vol. 12, no. 1, p. 1350005, 2013.
7. H. J. Sadaei, R. Enayatifar, A. H. Abdullah, and A. Gani, “Short-term load forecasting using a hybrid model with a refined exponentially weighted fuzzy time series and an improved harmony search,” Int. J. Electr. Power Energy Syst., vol. 62, no. from 2005, pp. 118129, 2014.
8. C.-H. Cheng, Y.-S. Chen, and Y.-L. Wu, “Forecasting innovation diffusion of products using trend-weighted fuzzy time-series model,” Expert Syst. Appl., vol. 36, no. 2, pp. 18261832, 2009.

View File

@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -15,6 +15,12 @@ div.clearer {
clear: both;
}
div.section::after {
display: block;
content: '';
clear: left;
}
/* -- relbar ---------------------------------------------------------------- */
div.related {
@ -49,7 +55,7 @@ div.sphinxsidebarwrapper {
div.sphinxsidebar {
float: left;
width: 230px;
width: 210px;
margin-left: -100%;
font-size: 90%;
word-wrap: break-word;
@ -81,6 +87,10 @@ div.sphinxsidebar input {
font-size: 1em;
}
div.sphinxsidebar #searchbox form.search {
overflow: hidden;
}
div.sphinxsidebar #searchbox input[type="text"] {
float: left;
width: 80%;
@ -227,6 +237,16 @@ a.headerlink {
visibility: hidden;
}
a.brackets:before,
span.brackets > a:before{
content: "[";
}
a.brackets:after,
span.brackets > a:after {
content: "]";
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
@ -275,6 +295,12 @@ img.align-center, .figure.align-center, object.align-center {
margin-right: auto;
}
img.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left;
}
@ -283,6 +309,10 @@ img.align-center, .figure.align-center, object.align-center {
text-align: center;
}
.align-default {
text-align: center;
}
.align-right {
text-align: right;
}
@ -292,21 +322,27 @@ img.align-center, .figure.align-center, object.align-center {
div.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px 7px 0 7px;
padding: 7px;
background-color: #ffe;
width: 40%;
float: right;
clear: right;
overflow-x: auto;
}
p.sidebar-title {
font-weight: bold;
}
div.admonition, div.topic, blockquote {
clear: left;
}
/* -- topics ---------------------------------------------------------------- */
div.topic {
border: 1px solid #ccc;
padding: 7px 7px 0 7px;
padding: 7px;
margin: 10px 0 10px 0;
}
@ -328,10 +364,6 @@ div.admonition dt {
font-weight: bold;
}
div.admonition dl {
margin-bottom: 0;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
@ -342,9 +374,28 @@ div.body p.centered {
margin-top: 25px;
}
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
div.topic::after,
div.admonition::after,
blockquote::after {
display: block;
content: '';
clear: both;
}
/* -- tables ---------------------------------------------------------------- */
table.docutils {
margin-top: 10px;
margin-bottom: 10px;
border: 0;
border-collapse: collapse;
}
@ -354,6 +405,11 @@ table.align-center {
margin-right: auto;
}
table.align-default {
margin-left: auto;
margin-right: auto;
}
table caption span.caption-number {
font-style: italic;
}
@ -387,6 +443,16 @@ table.citation td {
border-bottom: none;
}
th > :first-child,
td > :first-child {
margin-top: 0px;
}
th > :last-child,
td > :last-child {
margin-bottom: 0px;
}
/* -- figures --------------------------------------------------------------- */
div.figure {
@ -427,6 +493,17 @@ table.field-list td, table.field-list th {
hyphens: manual;
}
/* -- hlist styles ---------------------------------------------------------- */
table.hlist {
margin: 1em 0;
}
table.hlist td {
vertical-align: top;
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
@ -449,11 +526,78 @@ ol.upperroman {
list-style: upper-roman;
}
:not(li) > ol > li:first-child > :first-child,
:not(li) > ul > li:first-child > :first-child {
margin-top: 0px;
}
:not(li) > ol > li:last-child > :last-child,
:not(li) > ul > li:last-child > :last-child {
margin-bottom: 0px;
}
ol.simple ol p,
ol.simple ul p,
ul.simple ol p,
ul.simple ul p {
margin-top: 0;
}
ol.simple > li:not(:first-child) > p,
ul.simple > li:not(:first-child) > p {
margin-top: 0;
}
ol.simple p,
ul.simple p {
margin-bottom: 0;
}
dl.footnote > dt,
dl.citation > dt {
float: left;
margin-right: 0.5em;
}
dl.footnote > dd,
dl.citation > dd {
margin-bottom: 0em;
}
dl.footnote > dd:after,
dl.citation > dd:after {
content: "";
clear: both;
}
dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) auto;
}
dl.field-list > dt {
font-weight: bold;
word-break: break-word;
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dt:after {
content: ":";
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}
dl {
margin-bottom: 15px;
}
dd p {
dd > :first-child {
margin-top: 0px;
}
@ -467,6 +611,11 @@ dd {
margin-left: 30px;
}
dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
}
dt:target, span.highlighted {
background-color: #fbe54e;
}
@ -526,6 +675,12 @@ dl.glossary dt {
font-style: oblique;
}
.classifier:before {
font-style: normal;
margin: 0.5em;
content: ":";
}
abbr, acronym {
border-bottom: dotted 1px;
cursor: help;
@ -538,6 +693,10 @@ pre {
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
pre, div[class|="highlight"] {
clear: both;
}
span.pre {
-moz-hyphens: none;
-ms-hyphens: none;
@ -545,22 +704,57 @@ span.pre {
hyphens: none;
}
div[class^="highlight-"] {
margin: 1em 0;
}
td.linenos pre {
padding: 5px 0px;
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
margin-left: 0.5em;
display: block;
}
table.highlighttable tbody {
display: block;
}
table.highlighttable tr {
display: flex;
}
table.highlighttable td {
padding: 0 0.5em 0 0.5em;
margin: 0;
padding: 0;
}
table.highlighttable td.linenos {
padding-right: 0.5em;
}
table.highlighttable td.code {
flex: 1;
overflow: hidden;
}
.highlight .hll {
display: block;
}
div.highlight pre,
table.highlighttable pre {
margin: 0;
}
div.code-block-caption + div {
margin-top: 0;
}
div.code-block-caption {
margin-top: 1em;
padding: 2px 5px;
font-size: small;
}
@ -569,8 +763,9 @@ div.code-block-caption code {
background-color: transparent;
}
div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
table.highlighttable td.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
div.code-block-caption span.caption-number {
@ -582,11 +777,7 @@ div.code-block-caption span.caption-text {
}
div.literal-block-wrapper {
padding: 1em 1em 0;
}
div.literal-block-wrapper div.highlight {
margin: 0;
margin: 1em 0;
}
code.descname {
@ -637,8 +828,7 @@ span.eqno {
}
span.eqno a.headerlink {
position: relative;
left: 0px;
position: absolute;
z-index: 1;
}

View File

@ -39,6 +39,11 @@ div.document {
-webkit-box-shadow: 2px 2px 5px #000;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 240px;
border-left: 1px solid #ccc;
@ -48,6 +53,9 @@ div.body {
margin: 0;
padding: 0.5em 20px 20px 20px;
}
div.bodywrapper {
margin: 0 0 0 calc(210px + 30px);
}
div.related {
font-size: 1em;
@ -94,7 +102,6 @@ div.sphinxsidebarwrapper {
}
div.sphinxsidebar {
margin: 0;
padding: 0.5em 12px 12px 12px;
width: 210px;
font-size: 1em;
@ -400,6 +407,15 @@ p.versionchanged span.versionmodified {
background-color: #DCE6A0;
}
dl.field-list > dt {
color: white;
background-color: #82A0BE;
}
dl.field-list > dd {
background-color: #f7f7f7;
}
/* -- table styles ---------------------------------------------------------- */
table.docutils {

View File

@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -70,7 +70,9 @@ jQuery.fn.highlightText = function(text, className) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) {
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
@ -85,14 +87,13 @@ jQuery.fn.highlightText = function(text, className) {
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var bbox = span.getBBox();
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.x.baseVal.value = bbox.x;
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
var parentOfText = node.parentNode.parentNode;
addItems.push({
"parent": node.parentNode,
"target": rect});
@ -148,7 +149,9 @@ var Documentation = {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
this.initOnKeyListeners();
}
},
/**
@ -280,10 +283,11 @@ var Documentation = {
},
initOnKeyListeners: function() {
$(document).keyup(function(event) {
$(document).keydown(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box or textarea
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
&& !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');
@ -308,4 +312,4 @@ _ = Documentation.gettext;
$(document).ready(function() {
Documentation.init();
});
});

View File

@ -1,9 +1,12 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '1.6',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false
};

File diff suppressed because one or more lines are too long

View File

@ -1,331 +1,54 @@
/*
* searchtools.js_t
* searchtools.js
* ~~~~~~~~~~~~~~~~
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
if (!Scorer) {
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: function(result) {
return result[4];
},
*/
/* Non-minified version JS is _stemmer.js if file is provided */
/**
* Porter Stemmer
*/
var Stemmer = function() {
// query matches the full name of an object
objNameMatch: 11,
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5}, // used to be unimportantResults
// Used when the priority is not in the mapping.
objPrioDefault: 0,
var step2list = {
ational: 'ate',
tional: 'tion',
enci: 'ence',
anci: 'ance',
izer: 'ize',
bli: 'ble',
alli: 'al',
entli: 'ent',
eli: 'e',
ousli: 'ous',
ization: 'ize',
ation: 'ate',
ator: 'ate',
alism: 'al',
iveness: 'ive',
fulness: 'ful',
ousness: 'ous',
aliti: 'al',
iviti: 'ive',
biliti: 'ble',
logi: 'log'
// query found in title
title: 15,
partialTitle: 7,
// query found in terms
term: 5,
partialTerm: 2
};
}
var step3list = {
icate: 'ic',
ative: '',
alize: 'al',
iciti: 'ic',
ical: 'ic',
ful: '',
ness: ''
};
var c = "[^aeiou]"; // consonant
var v = "[aeiouy]"; // vowel
var C = c + "[^aeiouy]*"; // consonant sequence
var V = v + "[aeiou]*"; // vowel sequence
var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0
var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1
var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1
var s_v = "^(" + C + ")?" + v; // vowel in stem
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
if (w.length < 3)
return w;
var re;
var re2;
var re3;
var re4;
firstch = w.substr(0,1);
if (firstch == "y")
w = firstch.toUpperCase() + w.substr(1);
// Step 1a
re = /^(.+?)(ss|i)es$/;
re2 = /^(.+?)([^s])s$/;
if (re.test(w))
w = w.replace(re,"$1$2");
else if (re2.test(w))
w = w.replace(re2,"$1$2");
// Step 1b
re = /^(.+?)eed$/;
re2 = /^(.+?)(ed|ing)$/;
if (re.test(w)) {
var fp = re.exec(w);
re = new RegExp(mgr0);
if (re.test(fp[1])) {
re = /.$/;
w = w.replace(re,"");
}
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1];
re2 = new RegExp(s_v);
if (re2.test(stem)) {
w = stem;
re2 = /(at|bl|iz)$/;
re3 = new RegExp("([^aeiouylsz])\\1$");
re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re2.test(w))
w = w + "e";
else if (re3.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
else if (re4.test(w))
w = w + "e";
}
}
// Step 1c
re = /^(.+?)y$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(s_v);
if (re.test(stem))
w = stem + "i";
}
// Step 2
re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step2list[suffix];
}
// Step 3
re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
suffix = fp[2];
re = new RegExp(mgr0);
if (re.test(stem))
w = stem + step3list[suffix];
}
// Step 4
re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
re2 = /^(.+?)(s|t)(ion)$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
if (re.test(stem))
w = stem;
}
else if (re2.test(w)) {
var fp = re2.exec(w);
stem = fp[1] + fp[2];
re2 = new RegExp(mgr1);
if (re2.test(stem))
w = stem;
}
// Step 5
re = /^(.+?)e$/;
if (re.test(w)) {
var fp = re.exec(w);
stem = fp[1];
re = new RegExp(mgr1);
re2 = new RegExp(meq1);
re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
w = stem;
}
re = /ll$/;
re2 = new RegExp(mgr1);
if (re.test(w) && re2.test(w)) {
re = /.$/;
w = w.replace(re,"");
}
// and turn initial Y back to y
if (firstch == "y")
w = firstch.toLowerCase() + w.substr(1);
return w;
if (!splitQuery) {
function splitQuery(query) {
return query.split(/\s+/);
}
}
/**
* Simple result scoring code.
*/
var Scorer = {
// Implement the following function to further tweak the score for each result
// The function takes a result array [filename, title, anchor, descr, score]
// and returns the new score.
/*
score: function(result) {
return result[4];
},
*/
// query matches the full name of an object
objNameMatch: 11,
// or matches in the last dotted part of the object name
objPartialMatch: 6,
// Additive scores depending on the priority of the object
objPrio: {0: 15, // used to be importantResults
1: 5, // used to be objectResults
2: -5}, // used to be unimportantResults
// Used when the priority is not in the mapping.
objPrioDefault: 0,
// query found in title
title: 15,
// query found in terms
term: 5
};
var splitChars = (function() {
var result = {};
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
var i, j, start, end;
for (i = 0; i < singles.length; i++) {
result[singles[i]] = true;
}
var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
[722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
[1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
[1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
[1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
[2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
[2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
[2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
[2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
[2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
[2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
[2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
[3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
[3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
[3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
[3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
[3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
[3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
[4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
[4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
[4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
[4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
[5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
[6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
[6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
[6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
[6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
[7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
[7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
[8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
[8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
[8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
[10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
[11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
[12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
[12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
[12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
[19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
[42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
[42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
[43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
[43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
[43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
[43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
[44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
[57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
[64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
[65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
[65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
for (i = 0; i < ranges.length; i++) {
start = ranges[i][0];
end = ranges[i][1];
for (j = start; j <= end; j++) {
result[j] = true;
}
}
return result;
})();
function splitQuery(query) {
var result = [];
var start = -1;
for (var i = 0; i < query.length; i++) {
if (splitChars[query.charCodeAt(i)]) {
if (start !== -1) {
result.push(query.slice(start, i));
start = -1;
}
} else if (start === -1) {
start = i;
}
}
if (start !== -1) {
result.push(query.slice(start));
}
return result;
}
/**
* Search Module
*/
@ -335,6 +58,19 @@ var Search = {
_queued_query : null,
_pulse_status : -1,
htmlToText : function(htmlString) {
var htmlElement = document.createElement('span');
htmlElement.innerHTML = htmlString;
$(htmlElement).find('.headerlink').remove();
docContent = $(htmlElement).find('[role=main]')[0];
if(docContent === undefined) {
console.warn("Content block not found. Sphinx search tries to obtain it " +
"via '[role=main]'. Could you check your theme or template.");
return "";
}
return docContent.textContent || docContent.innerText;
},
init : function() {
var params = $.getQueryParameters();
if (params.q) {
@ -399,7 +135,7 @@ var Search = {
this.out = $('#search-results');
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
this.dots = $('<span></span>').appendTo(this.title);
this.status = $('<p style="display: none"></p>').appendTo(this.out);
this.status = $('<p class="search-summary">&nbsp;</p>').appendTo(this.out);
this.output = $('<ul class="search"/>').appendTo(this.out);
$('#search-progress').text(_('Preparing search...'));
@ -417,7 +153,6 @@ var Search = {
*/
query : function(query) {
var i;
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
// stem the searchterms and add them to the correct list
var stemmer = new Stemmer();
@ -515,7 +250,9 @@ var Search = {
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
var requestUrl = "";
var linkUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
// dirhtml builder
var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) {
@ -523,15 +260,17 @@ var Search = {
} else if (dirname == 'index/') {
dirname = '';
}
listItem.append($('<a/>').attr('href',
DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
highlightstring + item[2]).html(item[1]));
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
listItem.append($('<a/>').attr('href',
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
highlightstring + item[2]).html(item[1]));
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
}
listItem.append($('<a/>').attr('href',
linkUrl +
highlightstring + item[2]).html(item[1]));
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
@ -539,11 +278,7 @@ var Search = {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
var suffix = DOCUMENTATION_OPTIONS.SOURCELINK_SUFFIX;
if (suffix === undefined) {
suffix = '.txt';
}
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[5] + (item[5].slice(-suffix.length) === suffix ? '' : suffix),
$.ajax({url: requestUrl,
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
@ -593,12 +328,13 @@ var Search = {
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
if (fullname.toLowerCase().indexOf(object) > -1) {
var fullnameLower = fullname.toLowerCase()
if (fullnameLower.indexOf(object) > -1) {
var score = 0;
var parts = fullname.split('.');
var parts = fullnameLower.split('.');
// check for different match types: exact matches of full name or
// "last name" (i.e. last dotted part)
if (fullname == object || parts[parts.length - 1] == object) {
if (fullnameLower == object || parts[parts.length - 1] == object) {
score += Scorer.objNameMatch;
// matches in last name
} else if (parts[parts.length - 1].indexOf(object) > -1) {
@ -665,6 +401,19 @@ var Search = {
{files: terms[word], score: Scorer.term},
{files: titleterms[word], score: Scorer.title}
];
// add support for partial matches
if (word.length > 2) {
for (var w in terms) {
if (w.match(word) && !terms[word]) {
_o.push({files: terms[w], score: Scorer.partialTerm})
}
}
for (var w in titleterms) {
if (w.match(word) && !titleterms[word]) {
_o.push({files: titleterms[w], score: Scorer.partialTitle})
}
}
}
// no match but word was a required one
if ($u.every(_o, function(o){return o.files === undefined;})) {
@ -684,7 +433,7 @@ var Search = {
for (j = 0; j < _files.length; j++) {
file = _files[j];
if (!(file in scoreMap))
scoreMap[file] = {}
scoreMap[file] = {};
scoreMap[file][word] = o.score;
}
});
@ -692,7 +441,7 @@ var Search = {
// create the mapping
for (j = 0; j < files.length; j++) {
file = files[j];
if (file in fileMap)
if (file in fileMap && fileMap[file].indexOf(word) === -1)
fileMap[file].push(word);
else
fileMap[file] = [word];
@ -704,8 +453,12 @@ var Search = {
var valid = true;
// check if all requirements are matched
if (fileMap[file].length != searchterms.length)
continue;
var filteredTermCount = // as search terms with length < 3 are discarded: ignore
searchterms.filter(function(term){return term.length > 2}).length
if (
fileMap[file].length != searchterms.length &&
fileMap[file].length != filteredTermCount
) continue;
// ensure that none of the excluded terms is in the search result
for (i = 0; i < excluded.length; i++) {
@ -736,7 +489,8 @@ var Search = {
* words. the first one is used to find the occurrence, the
* latter for highlighting it.
*/
makeSearchSummary : function(text, keywords, hlwords) {
makeSearchSummary : function(htmlText, keywords, hlwords) {
var text = Search.htmlToText(htmlText);
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
@ -758,4 +512,4 @@ var Search = {
$(document).ready(function() {
Search.init();
});
});

File diff suppressed because it is too large Load Diff

View File

@ -2,10 +2,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<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">
<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']);
@ -20,18 +20,19 @@
<title>pyFTS - Fuzzy Time Series for Python &#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 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>
<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 Quick Start" href="quickstart.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>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -46,48 +47,10 @@
<li class="right" >
<a href="quickstart.html" title="pyFTS Quick Start"
accesskey="N">next</a> |</li>
<li class="nav-item nav-item-0"><a href="#">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="#">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS - Fuzzy Time Series for Python</a></li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="#">
<img class="logo" src="_static/logo_heading2.png" alt="Logo"/>
</a></p>
<h3><a href="#">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">pyFTS - Fuzzy Time Series for Python</a><ul>
<li><a class="reference internal" href="#what-is-pyfts-library">What is pyFTS Library?</a></li>
<li><a class="reference internal" href="#how-to-reference-pyfts">How to reference pyFTS?</a></li>
<li><a class="reference internal" href="#indexes">Indexes</a></li>
</ul>
</li>
</ul>
<h4>Next topic</h4>
<p class="topless"><a href="quickstart.html"
title="next chapter">pyFTS Quick Start</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<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>
<div class="document">
<div class="documentwrapper">
@ -98,7 +61,6 @@
<h1>pyFTS - Fuzzy Time Series for Python<a class="headerlink" href="#pyfts-fuzzy-time-series-for-python" title="Permalink to this headline"></a></h1>
<div class="section" id="what-is-pyfts-library">
<h2>What is pyFTS Library?<a class="headerlink" href="#what-is-pyfts-library" title="Permalink to this headline"></a></h2>
<img alt="https://badges.frapsoft.com/os/v2/open-source.png?v=103" src="https://badges.frapsoft.com/os/v2/open-source.png?v=103" />
<img alt="https://img.shields.io/badge/License-GPLv3-blue.svg" src="https://img.shields.io/badge/License-GPLv3-blue.svg" /><img alt="https://img.shields.io/badge/Made%20with-Python-1f425f.svg" src="https://img.shields.io/badge/Made%20with-Python-1f425f.svg" /><style>
#forkongithub a{ background:#000; color:#fff; text-decoration:none; font-family:arial,sans-serif;
text-align:center;font-weight:bold;padding:5px 40px;font-size:1rem;line-height:2rem;position:relative;transition:0.5s;}#forkongithub a:hover{background:#c11;color:#fff;}
@ -134,7 +96,7 @@ src="http://www.ifmg.edu.br/portal/imagens/logovertical.jpg" alt="IFMG" width="1
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#how-to-install-pyfts">How to install pyFTS?</a></li>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#what-are-fuzzy-time-series-fts">What are Fuzzy Time Series (FTS)?</a></li>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#usage-examples">Usage examples</a></li>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#references">References</a></li>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#a-short-tutorial-on-fuzzy-time-series">A short tutorial on Fuzzy Time Series</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">pyFTS</a><ul>
@ -158,17 +120,52 @@ src="http://www.ifmg.edu.br/portal/imagens/logovertical.jpg" alt="IFMG" width="1
<div class="section" id="indexes">
<h2>Indexes<a class="headerlink" href="#indexes" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li>
<li><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></li>
<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="#">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">pyFTS - Fuzzy Time Series for Python</a><ul>
<li><a class="reference internal" href="#what-is-pyfts-library">What is pyFTS Library?</a></li>
<li><a class="reference internal" href="#how-to-reference-pyfts">How to reference pyFTS?</a></li>
<li><a class="reference internal" href="#indexes">Indexes</a></li>
</ul>
</li>
</ul>
<h4>Next topic</h4>
<p class="topless"><a href="quickstart.html"
title="next chapter">pyFTS Quick Start</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/index.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">
@ -183,12 +180,13 @@ src="http://www.ifmg.edu.br/portal/imagens/logovertical.jpg" alt="IFMG" width="1
<li class="right" >
<a href="quickstart.html" title="pyFTS Quick Start"
>next</a> |</li>
<li class="nav-item nav-item-0"><a href="#">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="#">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS - Fuzzy Time Series for Python</a></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.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>

View File

@ -2,10 +2,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<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">
<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']);
@ -20,19 +20,20 @@
<title>pyFTS &#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 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>
<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 package" href="pyFTS.html" />
<link rel="prev" title="pyFTS Quick Start" href="quickstart.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>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -50,41 +51,10 @@
<li class="right" >
<a href="quickstart.html" title="pyFTS Quick Start"
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-0"><a href="index.html">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS</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>
<h4>Previous topic</h4>
<p class="topless"><a href="quickstart.html"
title="previous chapter">pyFTS Quick Start</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="pyFTS.html"
title="next chapter">pyFTS package</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/modules.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<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>
<div class="document">
<div class="documentwrapper">
@ -109,7 +79,7 @@
<li class="toctree-l4"><a class="reference internal" href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.knn">pyFTS.benchmarks.knn module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.naive">pyFTS.benchmarks.naive module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.quantreg">pyFTS.benchmarks.quantreg module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.gaussianproc">pyFTS.benchmarks.gaussianproc module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.benchmarks.html#pyfts-benchmarks-gaussianproc-module">pyFTS.benchmarks.gaussianproc module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.BSTS">pyFTS.benchmarks.BSTS module</a></li>
</ul>
</li>
@ -159,16 +129,16 @@
<li class="toctree-l3"><a class="reference internal" href="pyFTS.distributed.html">pyFTS.distributed package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.distributed.html#module-pyFTS.distributed">Module contents</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.distributed.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.distributed.html#pyfts-distributed-dispy-module">pyFTS.distributed.dispy module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.distributed.html#module-pyFTS.distributed.spark">pyFTS.distributed.spark module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.distributed.html#module-pyFTS.distributed.dispy">pyFTS.distributed.dispy module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.distributed.html#pyfts-distributed-spark-module">pyFTS.distributed.spark module</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pyFTS.hyperparam.html">pyFTS.hyperparam package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.hyperparam.html#module-pyFTS.hyperparam">Module contents</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.hyperparam.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.hyperparam.html#module-pyFTS.hyperparam.Util">pyFTS.hyperparam.Util module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.hyperparam.html#pyfts-hyperparam-gridsearch-module">pyFTS.hyperparam.GridSearch module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.hyperparam.html#pyfts-hyperparam-evolutionary-module">pyFTS.hyperparam.Evolutionary module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.hyperparam.html#module-pyFTS.hyperparam.GridSearch">pyFTS.hyperparam.GridSearch module</a></li>
<li class="toctree-l4"><a class="reference internal" href="pyFTS.hyperparam.html#module-pyFTS.hyperparam.Evolutionary">pyFTS.hyperparam.Evolutionary module</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pyFTS.models.html">pyFTS.models package</a><ul>
@ -229,9 +199,37 @@
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="quickstart.html"
title="previous chapter">pyFTS Quick Start</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="pyFTS.html"
title="next chapter">pyFTS package</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/modules.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">
@ -249,12 +247,13 @@
<li class="right" >
<a href="quickstart.html" title="pyFTS Quick Start"
>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-0"><a href="index.html">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS</a></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.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>

Binary file not shown.

View File

@ -2,10 +2,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<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">
<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']);
@ -20,18 +20,19 @@
<title>Python Module Index &#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 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>
<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" />
<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>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
@ -45,28 +46,10 @@
<li class="right" >
<a href="#" title="Python Module Index"
>modules</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-0"><a href="index.html">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Python Module Index</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>
<div class="document">
<div class="documentwrapper">
@ -110,11 +93,6 @@
<td>&#160;&#160;&#160;
<a href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.BSTS"><code class="xref">pyFTS.benchmarks.BSTS</code></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.gaussianproc"><code class="xref">pyFTS.benchmarks.gaussianproc</code></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
@ -333,13 +311,23 @@
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="pyFTS.distributed.html#module-pyFTS.distributed.spark"><code class="xref">pyFTS.distributed.spark</code></a></td><td>
<a href="pyFTS.distributed.html#module-pyFTS.distributed.dispy"><code class="xref">pyFTS.distributed.dispy</code></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="pyFTS.hyperparam.html#module-pyFTS.hyperparam"><code class="xref">pyFTS.hyperparam</code></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="pyFTS.hyperparam.html#module-pyFTS.hyperparam.Evolutionary"><code class="xref">pyFTS.hyperparam.Evolutionary</code></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
<a href="pyFTS.hyperparam.html#module-pyFTS.hyperparam.GridSearch"><code class="xref">pyFTS.hyperparam.GridSearch</code></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&#160;&#160;&#160;
@ -643,9 +631,24 @@
</table>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<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">
@ -657,12 +660,13 @@
<li class="right" >
<a href="#" title="Python Module Index"
>modules</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-0"><a href="index.html">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Python Module Index</a></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.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,10 +2,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<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">
<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']);
@ -20,19 +20,20 @@
<title>pyFTS.distributed package &#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 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>
<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.hyperparam package" href="pyFTS.hyperparam.html" />
<link rel="prev" title="pyFTS.data package" href="pyFTS.data.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>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -52,21 +53,105 @@
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-1"><a href="modules.html" >pyFTS</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" accesskey="U">pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" accesskey="U">pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS.distributed package</a></li>
</ul>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="pyfts-distributed-package">
<h1>pyFTS.distributed package<a class="headerlink" href="#pyfts-distributed-package" title="Permalink to this headline"></a></h1>
<div class="section" id="module-pyFTS.distributed">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyFTS.distributed" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-pyFTS.distributed.dispy">
<span id="pyfts-distributed-dispy-module"></span><h2>pyFTS.distributed.dispy module<a class="headerlink" href="#module-pyFTS.distributed.dispy" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="pyFTS.distributed.dispy.distributed_predict">
<code class="sig-prename descclassname">pyFTS.distributed.dispy.</code><code class="sig-name descname">distributed_predict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">model</span></em>, <em class="sig-param"><span class="n">parameters</span></em>, <em class="sig-param"><span class="n">nodes</span></em>, <em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="n">num_batches</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/distributed/dispy.html#distributed_predict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.distributed.dispy.distributed_predict" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="pyFTS.distributed.dispy.distributed_train">
<code class="sig-prename descclassname">pyFTS.distributed.dispy.</code><code class="sig-name descname">distributed_train</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">model</span></em>, <em class="sig-param"><span class="n">train_method</span></em>, <em class="sig-param"><span class="n">nodes</span></em>, <em class="sig-param"><span class="n">fts_method</span></em>, <em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="n">num_batches</span><span class="o">=</span><span class="default_value">10</span></em>, <em class="sig-param"><span class="n">train_parameters</span><span class="o">=</span><span class="default_value">{}</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/distributed/dispy.html#distributed_train"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.distributed.dispy.distributed_train" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="pyFTS.distributed.dispy.get_number_of_cpus">
<code class="sig-prename descclassname">pyFTS.distributed.dispy.</code><code class="sig-name descname">get_number_of_cpus</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cluster</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/distributed/dispy.html#get_number_of_cpus"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.distributed.dispy.get_number_of_cpus" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="pyFTS.distributed.dispy.simple_model_predict">
<code class="sig-prename descclassname">pyFTS.distributed.dispy.</code><code class="sig-name descname">simple_model_predict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">model</span></em>, <em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="n">parameters</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/distributed/dispy.html#simple_model_predict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.distributed.dispy.simple_model_predict" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="pyFTS.distributed.dispy.simple_model_train">
<code class="sig-prename descclassname">pyFTS.distributed.dispy.</code><code class="sig-name descname">simple_model_train</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">model</span></em>, <em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="n">parameters</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/distributed/dispy.html#simple_model_train"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.distributed.dispy.simple_model_train" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="pyFTS.distributed.dispy.start_dispy_cluster">
<code class="sig-prename descclassname">pyFTS.distributed.dispy.</code><code class="sig-name descname">start_dispy_cluster</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">method</span></em>, <em class="sig-param"><span class="n">nodes</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/distributed/dispy.html#start_dispy_cluster"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.distributed.dispy.start_dispy_cluster" title="Permalink to this definition"></a></dt>
<dd><p>Start a new Dispy cluster on nodes to execute the method method</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>method</strong> function to be executed on each cluster node</p></li>
<li><p><strong>nodes</strong> list of node names or IPs.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the dispy cluster instance and the http_server for monitoring</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.distributed.dispy.stop_dispy_cluster">
<code class="sig-prename descclassname">pyFTS.distributed.dispy.</code><code class="sig-name descname">stop_dispy_cluster</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cluster</span></em>, <em class="sig-param"><span class="n">http_server</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/distributed/dispy.html#stop_dispy_cluster"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.distributed.dispy.stop_dispy_cluster" title="Permalink to this definition"></a></dt>
<dd><p>Stop a dispy cluster and http_server</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>cluster</strong> </p></li>
<li><p><strong>http_server</strong> </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="pyfts-distributed-spark-module">
<h2>pyFTS.distributed.spark module<a class="headerlink" href="#pyfts-distributed-spark-module" title="Permalink to this headline"></a></h2>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</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>
<h3><a href="index.html">Table Of Contents</a></h3>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">pyFTS.distributed package</a><ul>
<li><a class="reference internal" href="#module-pyFTS.distributed">Module contents</a></li>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#pyfts-distributed-dispy-module">pyFTS.distributed.dispy module</a></li>
<li><a class="reference internal" href="#module-pyFTS.distributed.spark">pyFTS.distributed.spark module</a></li>
<li><a class="reference internal" href="#module-pyFTS.distributed.dispy">pyFTS.distributed.dispy module</a></li>
<li><a class="reference internal" href="#pyfts-distributed-spark-module">pyFTS.distributed.spark module</a></li>
</ul>
</li>
</ul>
@ -85,307 +170,15 @@
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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">
<div class="section" id="pyfts-distributed-package">
<h1>pyFTS.distributed package<a class="headerlink" href="#pyfts-distributed-package" title="Permalink to this headline"></a></h1>
<div class="section" id="module-pyFTS.distributed">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyFTS.distributed" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="pyfts-distributed-dispy-module">
<h2>pyFTS.distributed.dispy module<a class="headerlink" href="#pyfts-distributed-dispy-module" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-pyFTS.distributed.spark">
<span id="pyfts-distributed-spark-module"></span><h2>pyFTS.distributed.spark module<a class="headerlink" href="#module-pyFTS.distributed.spark" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="pyFTS.distributed.spark.create_multivariate_model">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">create_multivariate_model</code><span class="sig-paren">(</span><em>**parameters</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.create_multivariate_model" title="Permalink to this definition"></a></dt>
<dd><p>From the dictionary of parameters, create a multivariate FTS model</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>parameters</strong> dictionary of parameters</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">multivariate FTS model</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.distributed.spark.create_spark_conf">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">create_spark_conf</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.create_spark_conf" title="Permalink to this definition"></a></dt>
<dd><p>Configure the Spark master node</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>kwargs</strong> </td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.distributed.spark.create_univariate_model">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">create_univariate_model</code><span class="sig-paren">(</span><em>**parameters</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.create_univariate_model" title="Permalink to this definition"></a></dt>
<dd><p>From the dictionary of parameters, create an univariate FTS model</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>parameters</strong> dictionary of parameters</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">univariate FTS model</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.distributed.spark.distributed_predict">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">distributed_predict</code><span class="sig-paren">(</span><em>data</em>, <em>model</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.distributed_predict" title="Permalink to this definition"></a></dt>
<dd><p>The main method for distributed forecasting with FTS models using Spark clusters.</p>
<p>It takes a trained FTS model and the test data, connect with the Spark cluster,
proceed the distributed forecasting and return the merged forecasted values.</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"><ul class="first simple">
<li><strong>model</strong> an FTS trained model</li>
<li><strong>data</strong> test data</li>
<li><strong>url</strong> URL of the Spark master</li>
<li><strong>app</strong> </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">forecasted values</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.distributed.spark.distributed_train">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">distributed_train</code><span class="sig-paren">(</span><em>model</em>, <em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.distributed_train" title="Permalink to this definition"></a></dt>
<dd><p>The main method for distributed training of FTS models using Spark clusters.</p>
<p>It takes an empty model and the train data, connect with the Spark cluster, proceed the
distributed training and return the learned model.</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"><ul class="first simple">
<li><strong>model</strong> An empty (non-trained) FTS model</li>
<li><strong>data</strong> train data</li>
<li><strong>url</strong> URL of the Spark master node</li>
<li><strong>app</strong> Application name</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">trained model</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.distributed.spark.get_clustered_partitioner">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">get_clustered_partitioner</code><span class="sig-paren">(</span><em>explanatory_variables</em>, <em>target_variable</em>, <em>**parameters</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.get_clustered_partitioner" title="Permalink to this definition"></a></dt>
<dd><p>Return the UoD partitioner from the shared_partitioner fuzzy sets, special case for
clustered multivariate FTS.</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"><ul class="first simple">
<li><strong>explanatory_variables</strong> the list with the names of the explanatory variables</li>
<li><strong>target_variable</strong> the name of the target variable</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Partitioner object</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.distributed.spark.get_partitioner">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">get_partitioner</code><span class="sig-paren">(</span><em>shared_partitioner</em>, <em>type='common'</em>, <em>variables=[]</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.get_partitioner" title="Permalink to this definition"></a></dt>
<dd><p>Return the UoD partitioner from the shared_partitioner fuzzy sets</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"><ul class="first simple">
<li><strong>shared_partitioner</strong> the shared variable with the fuzzy sets</li>
<li><strong>type</strong> the type of the partitioner</li>
<li><strong>variables</strong> in case of a Multivariate FTS, the list of variables</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Partitioner object</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.distributed.spark.get_variables">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">get_variables</code><span class="sig-paren">(</span><em>**parameters</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.get_variables" title="Permalink to this definition"></a></dt>
<dd><p>From the dictionary of parameters, return a tuple with the list of explanatory and target variables</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>parameters</strong> dictionary of parameters</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a tuple with the list of explanatory and target variables</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.distributed.spark.share_parameters">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">share_parameters</code><span class="sig-paren">(</span><em>model</em>, <em>context</em>, <em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.share_parameters" title="Permalink to this definition"></a></dt>
<dd><p>Create a shared variable with a dictionary of the model parameters and hyperparameters</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"><ul class="first simple">
<li><strong>model</strong> the FTS model to extract the parameters and hyperparameters</li>
<li><strong>context</strong> Spark context</li>
<li><strong>data</strong> dataset</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the shared variable with the dictionary of parameters</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.distributed.spark.slave_forecast_multivariate">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">slave_forecast_multivariate</code><span class="sig-paren">(</span><em>data</em>, <em>**parameters</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.slave_forecast_multivariate" title="Permalink to this definition"></a></dt>
<dd><p>Receive test data, create a multivariate FTS model from the parameters and return the forecasted values</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"><ul class="first simple">
<li><strong>data</strong> test data</li>
<li><strong>parameters</strong> dictionary of parameters</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">forecasted values from the data input</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.distributed.spark.slave_forecast_univariate">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">slave_forecast_univariate</code><span class="sig-paren">(</span><em>data</em>, <em>**parameters</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.slave_forecast_univariate" title="Permalink to this definition"></a></dt>
<dd><p>Receive test data, create an univariate FTS model from the parameters and return the forecasted values</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"><ul class="first simple">
<li><strong>data</strong> test data</li>
<li><strong>parameters</strong> dictionary of parameters</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">forecasted values from the data input</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.distributed.spark.slave_train_multivariate">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">slave_train_multivariate</code><span class="sig-paren">(</span><em>data</em>, <em>**parameters</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.slave_train_multivariate" title="Permalink to this definition"></a></dt>
<dd><p>Receive train data, train a multivariate FTS model and return the learned rules</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"><ul class="first simple">
<li><strong>data</strong> train data</li>
<li><strong>parameters</strong> dictionary of parameters</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Key/value list of the learned rules</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.distributed.spark.slave_train_univariate">
<code class="descclassname">pyFTS.distributed.spark.</code><code class="descname">slave_train_univariate</code><span class="sig-paren">(</span><em>data</em>, <em>**parameters</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.distributed.spark.slave_train_univariate" title="Permalink to this definition"></a></dt>
<dd><p>Receive train data, train an univariate FTS model and return the learned rules</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"><ul class="first simple">
<li><strong>data</strong> train data</li>
<li><strong>parameters</strong> dictionary of parameters</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Key/value list of the learned rules</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
@ -407,12 +200,13 @@ clustered multivariate FTS.</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-1"><a href="modules.html" >pyFTS</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" >pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" >pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS.distributed package</a></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.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>

View File

@ -2,10 +2,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<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">
<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']);
@ -20,19 +20,20 @@
<title>pyFTS package &#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 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>
<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.benchmarks package" href="pyFTS.benchmarks.html" />
<link rel="prev" title="pyFTS" href="modules.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>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -51,52 +52,10 @@
<a href="modules.html" title="pyFTS"
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-1"><a href="modules.html" accesskey="U">pyFTS</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="modules.html" accesskey="U">pyFTS</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS package</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>
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">pyFTS package</a><ul>
<li><a class="reference internal" href="#subpackages">Subpackages</a></li>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-pyFTS.conf">pyFTS.conf module</a></li>
<li><a class="reference internal" href="#module-pyFTS">Module contents</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="modules.html"
title="previous chapter">pyFTS</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="pyFTS.benchmarks.html"
title="next chapter">pyFTS.benchmarks package</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/pyFTS.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<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>
<div class="document">
<div class="documentwrapper">
@ -121,7 +80,7 @@
<li class="toctree-l2"><a class="reference internal" href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.knn">pyFTS.benchmarks.knn module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.naive">pyFTS.benchmarks.naive module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.quantreg">pyFTS.benchmarks.quantreg module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.gaussianproc">pyFTS.benchmarks.gaussianproc module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.benchmarks.html#pyfts-benchmarks-gaussianproc-module">pyFTS.benchmarks.gaussianproc module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.benchmarks.html#module-pyFTS.benchmarks.BSTS">pyFTS.benchmarks.BSTS module</a></li>
</ul>
</li>
@ -171,16 +130,16 @@
<li class="toctree-l1"><a class="reference internal" href="pyFTS.distributed.html">pyFTS.distributed package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.distributed.html#module-pyFTS.distributed">Module contents</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.distributed.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.distributed.html#pyfts-distributed-dispy-module">pyFTS.distributed.dispy module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.distributed.html#module-pyFTS.distributed.spark">pyFTS.distributed.spark module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.distributed.html#module-pyFTS.distributed.dispy">pyFTS.distributed.dispy module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.distributed.html#pyfts-distributed-spark-module">pyFTS.distributed.spark module</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pyFTS.hyperparam.html">pyFTS.hyperparam package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.hyperparam.html#module-pyFTS.hyperparam">Module contents</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.hyperparam.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.hyperparam.html#module-pyFTS.hyperparam.Util">pyFTS.hyperparam.Util module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.hyperparam.html#pyfts-hyperparam-gridsearch-module">pyFTS.hyperparam.GridSearch module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.hyperparam.html#pyfts-hyperparam-evolutionary-module">pyFTS.hyperparam.Evolutionary module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.hyperparam.html#module-pyFTS.hyperparam.GridSearch">pyFTS.hyperparam.GridSearch module</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyFTS.hyperparam.html#module-pyFTS.hyperparam.Evolutionary">pyFTS.hyperparam.Evolutionary module</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pyFTS.models.html">pyFTS.models package</a><ul>
@ -293,9 +252,48 @@
</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 package</a><ul>
<li><a class="reference internal" href="#subpackages">Subpackages</a></li>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-pyFTS.conf">pyFTS.conf module</a></li>
<li><a class="reference internal" href="#module-pyFTS">Module contents</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="modules.html"
title="previous chapter">pyFTS</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="pyFTS.benchmarks.html"
title="next chapter">pyFTS.benchmarks package</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/pyFTS.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">
@ -314,12 +312,13 @@
<a href="modules.html" title="pyFTS"
>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-1"><a href="modules.html" >pyFTS</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="modules.html" >pyFTS</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS package</a></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.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>

View File

@ -2,10 +2,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<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">
<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']);
@ -20,19 +20,20 @@
<title>pyFTS.hyperparam package &#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 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>
<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.models package" href="pyFTS.models.html" />
<link rel="prev" title="pyFTS.distributed package" href="pyFTS.distributed.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>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -52,22 +53,439 @@
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-1"><a href="modules.html" >pyFTS</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" accesskey="U">pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" accesskey="U">pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS.hyperparam package</a></li>
</ul>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="pyfts-hyperparam-package">
<h1>pyFTS.hyperparam package<a class="headerlink" href="#pyfts-hyperparam-package" title="Permalink to this headline"></a></h1>
<div class="section" id="module-pyFTS.hyperparam">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyFTS.hyperparam" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-pyFTS.hyperparam.Util">
<span id="pyfts-hyperparam-util-module"></span><h2>pyFTS.hyperparam.Util module<a class="headerlink" href="#module-pyFTS.hyperparam.Util" title="Permalink to this headline"></a></h2>
<p>Common facilities for hyperparameter optimization</p>
<dl class="py function">
<dt id="pyFTS.hyperparam.Util.create_hyperparam_tables">
<code class="sig-prename descclassname">pyFTS.hyperparam.Util.</code><code class="sig-name descname">create_hyperparam_tables</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">conn</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Util.html#create_hyperparam_tables"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Util.create_hyperparam_tables" title="Permalink to this definition"></a></dt>
<dd><p>Create a sqlite3 table designed to store benchmark results.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>conn</strong> a sqlite3 database connection</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Util.insert_hyperparam">
<code class="sig-prename descclassname">pyFTS.hyperparam.Util.</code><code class="sig-name descname">insert_hyperparam</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="n">conn</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Util.html#insert_hyperparam"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Util.insert_hyperparam" title="Permalink to this definition"></a></dt>
<dd><p>Insert benchmark data on database</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>data</strong> a tuple with the benchmark data with format:</p>
</dd>
</dl>
<p>Dataset: Identify on which dataset the dataset was performed
Tag: a user defined word that indentify a benchmark set
Model: FTS model
Transformation: The name of data transformation, if one was used
mf: membership function
Order: the order of the FTS method
Partitioner: UoD partitioning scheme
Partitions: Number of partitions
alpha: alpha cut
lags: lags
Measure: accuracy measure
Value: the measure value</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>conn</strong> a sqlite3 database connection</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Util.open_hyperparam_db">
<code class="sig-prename descclassname">pyFTS.hyperparam.Util.</code><code class="sig-name descname">open_hyperparam_db</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Util.html#open_hyperparam_db"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Util.open_hyperparam_db" title="Permalink to this definition"></a></dt>
<dd><p>Open a connection with a Sqlite database designed to store benchmark results.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>name</strong> database filenem</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a sqlite3 database connection</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-pyFTS.hyperparam.GridSearch">
<span id="pyfts-hyperparam-gridsearch-module"></span><h2>pyFTS.hyperparam.GridSearch module<a class="headerlink" href="#module-pyFTS.hyperparam.GridSearch" title="Permalink to this headline"></a></h2>
<dl class="py function">
<dt id="pyFTS.hyperparam.GridSearch.cluster_method">
<code class="sig-prename descclassname">pyFTS.hyperparam.GridSearch.</code><code class="sig-name descname">cluster_method</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">individual</span></em>, <em class="sig-param"><span class="n">dataset</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/GridSearch.html#cluster_method"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.GridSearch.cluster_method" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.GridSearch.dict_individual">
<code class="sig-prename descclassname">pyFTS.hyperparam.GridSearch.</code><code class="sig-name descname">dict_individual</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mf</span></em>, <em class="sig-param"><span class="n">partitioner</span></em>, <em class="sig-param"><span class="n">partitions</span></em>, <em class="sig-param"><span class="n">order</span></em>, <em class="sig-param"><span class="n">lags</span></em>, <em class="sig-param"><span class="n">alpha_cut</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/GridSearch.html#dict_individual"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.GridSearch.dict_individual" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.GridSearch.execute">
<code class="sig-prename descclassname">pyFTS.hyperparam.GridSearch.</code><code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">hyperparams</span></em>, <em class="sig-param"><span class="n">datasetname</span></em>, <em class="sig-param"><span class="n">dataset</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/GridSearch.html#execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.GridSearch.execute" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.GridSearch.process_jobs">
<code class="sig-prename descclassname">pyFTS.hyperparam.GridSearch.</code><code class="sig-name descname">process_jobs</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">jobs</span></em>, <em class="sig-param"><span class="n">datasetname</span></em>, <em class="sig-param"><span class="n">conn</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/GridSearch.html#process_jobs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.GridSearch.process_jobs" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-pyFTS.hyperparam.Evolutionary">
<span id="pyfts-hyperparam-evolutionary-module"></span><h2>pyFTS.hyperparam.Evolutionary module<a class="headerlink" href="#module-pyFTS.hyperparam.Evolutionary" title="Permalink to this headline"></a></h2>
<p>Distributed Evolutionary Hyperparameter Optimization (DEHO) for MVFTS</p>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.GeneticAlgorithm">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">GeneticAlgorithm</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">dataset</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#GeneticAlgorithm"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.GeneticAlgorithm" title="Permalink to this definition"></a></dt>
<dd><p>Genetic algoritm for Distributed Evolutionary Hyperparameter Optimization (DEHO)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>dataset</strong> The time series to optimize the FTS</p></li>
<li><p><strong>ngen</strong> An integer value with the maximum number of generations, default value: 30</p></li>
<li><p><strong>mgen</strong> An integer value with the maximum number of generations without improvement to stop, default value 7</p></li>
<li><p><strong>npop</strong> An integer value with the population size, default value: 20</p></li>
<li><p><strong>pcross</strong> A float value between 0 and 1 with the probability of crossover, default: .5</p></li>
<li><p><strong>psel</strong> A float value between 0 and 1 with the probability of selection, default: .5</p></li>
<li><p><strong>pmut</strong> A float value between 0 and 1 with the probability of mutation, default: .3</p></li>
<li><p><strong>fts_method</strong> The FTS method to optimize</p></li>
<li><p><strong>parameters</strong> dict with model specific arguments for fts_method</p></li>
<li><p><strong>elitism</strong> A boolean value indicating if the best individual must always survive to next population</p></li>
<li><p><strong>initial_operator</strong> a function that receives npop and return a random population with size npop</p></li>
<li><p><strong>evalutation_operator</strong> a function that receives a dataset and an individual and return its fitness</p></li>
<li><p><strong>selection_operator</strong> a function that receives the whole population and return a selected individual</p></li>
<li><p><strong>crossover_operator</strong> a function that receives the whole population and return a descendent individual</p></li>
<li><p><strong>mutation_operator</strong> a function that receives one individual and return a changed individual</p></li>
<li><p><strong>window_size</strong> An integer value with the the length of scrolling window for train/test on dataset</p></li>
<li><p><strong>train_rate</strong> A float value between 0 and 1 with the train/test split ([0,1])</p></li>
<li><p><strong>increment_rate</strong> A float value between 0 and 1 with the the increment of the scrolling window,
relative to the window_size ([0,1])</p></li>
<li><p><strong>collect_statistics</strong> A boolean value indicating to collect statistics for each generation</p></li>
<li><p><strong>distributed</strong> A value indicating it the execution will be local and sequential (distributed=False),
or parallel and distributed (distributed=dispy or distributed=spark)</p></li>
<li><p><strong>cluster</strong> If distributed=dispy the list of cluster nodes, else if distributed=spark it is the master node</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the best genotype</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.crossover">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">crossover</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">population</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#crossover"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.crossover" title="Permalink to this definition"></a></dt>
<dd><p>Crossover operation between two parents</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>population</strong> the original population</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a genotype</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.double_tournament">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">double_tournament</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">population</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#double_tournament"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.double_tournament" title="Permalink to this definition"></a></dt>
<dd><p>Double tournament selection strategy.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>population</strong> </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.elitism">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">elitism</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">population</span></em>, <em class="sig-param"><span class="n">new_population</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#elitism"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.elitism" title="Permalink to this definition"></a></dt>
<dd><p>Elitism operation, always select the best individual of the population and discard the worst</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>population</strong> </p></li>
<li><p><strong>new_population</strong> </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.evaluate">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">evaluate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">dataset</span></em>, <em class="sig-param"><span class="n">individual</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#evaluate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.evaluate" title="Permalink to this definition"></a></dt>
<dd><p>Evaluate an individual using a sliding window cross validation over the dataset.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>dataset</strong> Evaluation dataset</p></li>
<li><p><strong>individual</strong> genotype to be tested</p></li>
<li><p><strong>window_size</strong> The length of scrolling window for train/test on dataset</p></li>
<li><p><strong>train_rate</strong> The train/test split ([0,1])</p></li>
<li><p><strong>increment_rate</strong> The increment of the scrolling window, relative to the window_size ([0,1])</p></li>
<li><p><strong>parameters</strong> dict with model specific arguments for fit method.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a tuple (len_lags, rmse) with the parsimony fitness value and the accuracy fitness value</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.execute">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">datasetname</span></em>, <em class="sig-param"><span class="n">dataset</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.execute" title="Permalink to this definition"></a></dt>
<dd><p>Batch execution of Distributed Evolutionary Hyperparameter Optimization (DEHO) for monovariate methods</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>datasetname</strong> </p></li>
<li><p><strong>dataset</strong> The time series to optimize the FTS</p></li>
<li><p><strong>file</strong> </p></li>
<li><p><strong>experiments</strong> </p></li>
<li><p><strong>distributed</strong> </p></li>
<li><p><strong>ngen</strong> An integer value with the maximum number of generations, default value: 30</p></li>
<li><p><strong>mgen</strong> An integer value with the maximum number of generations without improvement to stop, default value 7</p></li>
<li><p><strong>npop</strong> An integer value with the population size, default value: 20</p></li>
<li><p><strong>pcross</strong> A float value between 0 and 1 with the probability of crossover, default: .5</p></li>
<li><p><strong>psel</strong> A float value between 0 and 1 with the probability of selection, default: .5</p></li>
<li><p><strong>pmut</strong> A float value between 0 and 1 with the probability of mutation, default: .3</p></li>
<li><p><strong>fts_method</strong> The FTS method to optimize</p></li>
<li><p><strong>parameters</strong> dict with model specific arguments for fts_method</p></li>
<li><p><strong>elitism</strong> A boolean value indicating if the best individual must always survive to next population</p></li>
<li><p><strong>initial_operator</strong> a function that receives npop and return a random population with size npop</p></li>
<li><p><strong>random_individual</strong> create an random genotype</p></li>
<li><p><strong>evalutation_operator</strong> a function that receives a dataset and an individual and return its fitness</p></li>
<li><p><strong>selection_operator</strong> a function that receives the whole population and return a selected individual</p></li>
<li><p><strong>crossover_operator</strong> a function that receives the whole population and return a descendent individual</p></li>
<li><p><strong>mutation_operator</strong> a function that receives one individual and return a changed individual</p></li>
<li><p><strong>window_size</strong> An integer value with the the length of scrolling window for train/test on dataset</p></li>
<li><p><strong>train_rate</strong> A float value between 0 and 1 with the train/test split ([0,1])</p></li>
<li><p><strong>increment_rate</strong> A float value between 0 and 1 with the the increment of the scrolling window,
relative to the window_size ([0,1])</p></li>
<li><p><strong>collect_statistics</strong> A boolean value indicating to collect statistics for each generation</p></li>
<li><p><strong>distributed</strong> A value indicating it the execution will be local and sequential (distributed=False),
or parallel and distributed (distributed=dispy or distributed=spark)</p></li>
<li><p><strong>cluster</strong> If distributed=dispy the list of cluster nodes, else if distributed=spark it is the master node</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the best genotype</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.genotype">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">genotype</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">mf</span></em>, <em class="sig-param"><span class="n">npart</span></em>, <em class="sig-param"><span class="n">partitioner</span></em>, <em class="sig-param"><span class="n">order</span></em>, <em class="sig-param"><span class="n">alpha</span></em>, <em class="sig-param"><span class="n">lags</span></em>, <em class="sig-param"><span class="n">f1</span></em>, <em class="sig-param"><span class="n">f2</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#genotype"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.genotype" title="Permalink to this definition"></a></dt>
<dd><p>Create the individual genotype</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>mf</strong> membership function</p></li>
<li><p><strong>npart</strong> number of partitions</p></li>
<li><p><strong>partitioner</strong> partitioner method</p></li>
<li><p><strong>order</strong> model order</p></li>
<li><p><strong>alpha</strong> alpha-cut</p></li>
<li><p><strong>lags</strong> array with lag indexes</p></li>
<li><p><strong>f1</strong> accuracy fitness value</p></li>
<li><p><strong>f2</strong> parsimony fitness value</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the genotype, a dictionary with all hyperparameters</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.initial_population">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">initial_population</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">n</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#initial_population"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.initial_population" title="Permalink to this definition"></a></dt>
<dd><p>Create a random population of size n</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>n</strong> the size of the population</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a list with n random individuals</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.lag_crossover2">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">lag_crossover2</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">best</span></em>, <em class="sig-param"><span class="n">worst</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#lag_crossover2"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.lag_crossover2" title="Permalink to this definition"></a></dt>
<dd><p>Cross over two lag genes</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>best</strong> best genotype</p></li>
<li><p><strong>worst</strong> worst genotype</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a tuple (order, lags)</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.log_result">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">log_result</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">conn</span></em>, <em class="sig-param"><span class="n">datasetname</span></em>, <em class="sig-param"><span class="n">fts_method</span></em>, <em class="sig-param"><span class="n">result</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#log_result"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.log_result" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.mutation">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">mutation</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">individual</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#mutation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.mutation" title="Permalink to this definition"></a></dt>
<dd><p>Mutation operator</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>individual</strong> an individual genotype</p></li>
<li><p><strong>pmut</strong> individual probability o</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.mutation_lags">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">mutation_lags</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">lags</span></em>, <em class="sig-param"><span class="n">order</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#mutation_lags"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.mutation_lags" title="Permalink to this definition"></a></dt>
<dd><p>Mutation operation for lags gene</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>lags</strong> </p></li>
<li><p><strong>order</strong> </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.persist_statistics">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">persist_statistics</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">datasetname</span></em>, <em class="sig-param"><span class="n">statistics</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#persist_statistics"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.persist_statistics" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.phenotype">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">phenotype</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">individual</span></em>, <em class="sig-param"><span class="n">train</span></em>, <em class="sig-param"><span class="n">fts_method</span></em>, <em class="sig-param"><span class="n">parameters</span><span class="o">=</span><span class="default_value">{}</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#phenotype"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.phenotype" title="Permalink to this definition"></a></dt>
<dd><p>Instantiate the genotype, creating a fitted model with the genotype hyperparameters</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>individual</strong> a genotype</p></li>
<li><p><strong>train</strong> the training dataset</p></li>
<li><p><strong>fts_method</strong> the FTS method</p></li>
<li><p><strong>parameters</strong> dict with model specific arguments for fit method.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a fitted FTS model</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.process_experiment">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">process_experiment</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">fts_method</span></em>, <em class="sig-param"><span class="n">result</span></em>, <em class="sig-param"><span class="n">datasetname</span></em>, <em class="sig-param"><span class="n">conn</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#process_experiment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.process_experiment" title="Permalink to this definition"></a></dt>
<dd><p>Persist the results of an DEHO execution in sqlite database (best hyperparameters) and json file (generation statistics)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>fts_method</strong> </p></li>
<li><p><strong>result</strong> </p></li>
<li><p><strong>datasetname</strong> </p></li>
<li><p><strong>conn</strong> </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.random_genotype">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">random_genotype</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#random_genotype"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.random_genotype" title="Permalink to this definition"></a></dt>
<dd><p>Create random genotype</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>the genotype, a dictionary with all hyperparameters</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.hyperparam.Evolutionary.tournament">
<code class="sig-prename descclassname">pyFTS.hyperparam.Evolutionary.</code><code class="sig-name descname">tournament</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">population</span></em>, <em class="sig-param"><span class="n">objective</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/hyperparam/Evolutionary.html#tournament"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.hyperparam.Evolutionary.tournament" title="Permalink to this definition"></a></dt>
<dd><p>Simple tournament selection strategy.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>population</strong> the population</p></li>
<li><p><strong>objective</strong> the objective to be considered on tournament</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</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>
<h3><a href="index.html">Table Of Contents</a></h3>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">pyFTS.hyperparam package</a><ul>
<li><a class="reference internal" href="#module-pyFTS.hyperparam">Module contents</a></li>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-pyFTS.hyperparam.Util">pyFTS.hyperparam.Util module</a></li>
<li><a class="reference internal" href="#pyfts-hyperparam-gridsearch-module">pyFTS.hyperparam.GridSearch module</a></li>
<li><a class="reference internal" href="#pyfts-hyperparam-evolutionary-module">pyFTS.hyperparam.Evolutionary module</a></li>
<li><a class="reference internal" href="#module-pyFTS.hyperparam.GridSearch">pyFTS.hyperparam.GridSearch module</a></li>
<li><a class="reference internal" href="#module-pyFTS.hyperparam.Evolutionary">pyFTS.hyperparam.Evolutionary module</a></li>
</ul>
</li>
</ul>
@ -86,113 +504,15 @@
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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">
<div class="section" id="pyfts-hyperparam-package">
<h1>pyFTS.hyperparam package<a class="headerlink" href="#pyfts-hyperparam-package" title="Permalink to this headline"></a></h1>
<div class="section" id="module-pyFTS.hyperparam">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyFTS.hyperparam" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-pyFTS.hyperparam.Util">
<span id="pyfts-hyperparam-util-module"></span><h2>pyFTS.hyperparam.Util module<a class="headerlink" href="#module-pyFTS.hyperparam.Util" title="Permalink to this headline"></a></h2>
<p>Common facilities for hyperparameter optimization</p>
<dl class="function">
<dt id="pyFTS.hyperparam.Util.create_hyperparam_tables">
<code class="descclassname">pyFTS.hyperparam.Util.</code><code class="descname">create_hyperparam_tables</code><span class="sig-paren">(</span><em>conn</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.hyperparam.Util.create_hyperparam_tables" title="Permalink to this definition"></a></dt>
<dd><p>Create a sqlite3 table designed to store benchmark results.</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>conn</strong> a sqlite3 database connection</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.hyperparam.Util.insert_hyperparam">
<code class="descclassname">pyFTS.hyperparam.Util.</code><code class="descname">insert_hyperparam</code><span class="sig-paren">(</span><em>data</em>, <em>conn</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.hyperparam.Util.insert_hyperparam" title="Permalink to this definition"></a></dt>
<dd><p>Insert benchmark data on database</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>data</strong> a tuple with the benchmark data with format:</td>
</tr>
</tbody>
</table>
<p>Dataset: Identify on which dataset the dataset was performed
Tag: a user defined word that indentify a benchmark set
Model: FTS model
Transformation: The name of data transformation, if one was used
mf: membership function
Order: the order of the FTS method
Partitioner: UoD partitioning scheme
Partitions: Number of partitions
alpha: alpha cut
lags: lags
Measure: accuracy measure
Value: the measure value</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>conn</strong> a sqlite3 database connection</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="pyFTS.hyperparam.Util.open_hyperparam_db">
<code class="descclassname">pyFTS.hyperparam.Util.</code><code class="descname">open_hyperparam_db</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.hyperparam.Util.open_hyperparam_db" title="Permalink to this definition"></a></dt>
<dd><p>Open a connection with a Sqlite database designed to store benchmark results.</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>name</strong> database filenem</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a sqlite3 database connection</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="pyfts-hyperparam-gridsearch-module">
<h2>pyFTS.hyperparam.GridSearch module<a class="headerlink" href="#pyfts-hyperparam-gridsearch-module" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="pyfts-hyperparam-evolutionary-module">
<h2>pyFTS.hyperparam.Evolutionary module<a class="headerlink" href="#pyfts-hyperparam-evolutionary-module" title="Permalink to this headline"></a></h2>
</div>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
@ -214,12 +534,13 @@ Value: the measure value</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-1"><a href="modules.html" >pyFTS</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" >pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" >pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS.hyperparam package</a></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.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>

View File

@ -2,10 +2,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<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">
<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']);
@ -20,19 +20,20 @@
<title>pyFTS.models.ensemble package &#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 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>
<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.models.incremental package" href="pyFTS.models.incremental.html" />
<link rel="prev" title="pyFTS.models package" href="pyFTS.models.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>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -53,15 +54,351 @@
<li class="nav-item nav-item-0"><a href="index.html">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="modules.html" >pyFTS</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" >pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="pyFTS.models.html" accesskey="U">pyFTS.models package</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="pyFTS.models.html" accesskey="U">pyFTS.models package</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS.models.ensemble package</a></li>
</ul>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="pyfts-models-ensemble-package">
<h1>pyFTS.models.ensemble package<a class="headerlink" href="#pyfts-models-ensemble-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-pyFTS.models.ensemble.ensemble">
<span id="pyfts-models-ensemble-ensemble-module"></span><h2>pyFTS.models.ensemble.ensemble module<a class="headerlink" href="#module-pyFTS.models.ensemble.ensemble" title="Permalink to this headline"></a></h2>
<p>EnsembleFTS wraps several FTS methods to ensemble their forecasts, providing point,
interval and probabilistic forecasting.</p>
<p>Silva, P. C. L et al. Probabilistic Forecasting with Seasonal Ensemble Fuzzy Time-Series
XIII Brazilian Congress on Computational Intelligence, 2017. Rio de Janeiro, Brazil.</p>
<dl class="py class">
<dt id="pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS">
<em class="property">class </em><code class="sig-prename descclassname">pyFTS.models.ensemble.ensemble.</code><code class="sig-name descname">AllMethodEnsembleFTS</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#AllMethodEnsembleFTS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS" title="pyFTS.models.ensemble.ensemble.EnsembleFTS"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.models.ensemble.ensemble.EnsembleFTS</span></code></a></p>
<p>Creates an EnsembleFTS with all point forecast methods, sharing the same partitioner</p>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS.set_transformations">
<code class="sig-name descname">set_transformations</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">model</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#AllMethodEnsembleFTS.set_transformations"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS.set_transformations" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS.train">
<code class="sig-name descname">train</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#AllMethodEnsembleFTS.train"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS.train" title="Permalink to this definition"></a></dt>
<dd><p>Method specific parameter fitting</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> training time series data</p></li>
<li><p><strong>kwargs</strong> Method specific parameters</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS">
<em class="property">class </em><code class="sig-prename descclassname">pyFTS.models.ensemble.ensemble.</code><code class="sig-name descname">EnsembleFTS</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="pyFTS.common.html#pyFTS.common.fts.FTS" title="pyFTS.common.fts.FTS"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.common.fts.FTS</span></code></a></p>
<p>Ensemble FTS</p>
<dl class="py attribute">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.alpha">
<code class="sig-name descname">alpha</code><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.alpha" title="Permalink to this definition"></a></dt>
<dd><p>The quantiles</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.append_model">
<code class="sig-name descname">append_model</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">model</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS.append_model"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.append_model" title="Permalink to this definition"></a></dt>
<dd><p>Append a new trained model to the ensemble</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>model</strong> FTS model</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast">
<code class="sig-name descname">forecast</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS.forecast"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast" title="Permalink to this definition"></a></dt>
<dd><p>Point forecast one step ahead</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>kwargs</strong> model specific parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a list with the forecasted values</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_ahead_distribution">
<code class="sig-name descname">forecast_ahead_distribution</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="n">steps</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS.forecast_ahead_distribution"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_ahead_distribution" title="Permalink to this definition"></a></dt>
<dd><p>Probabilistic forecast n steps ahead</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>steps</strong> the number of steps ahead to forecast</p></li>
<li><p><strong>start_at</strong> in the multi step forecasting, the index of the data where to start forecasting (default: 0)</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a list with the forecasted Probability Distributions</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_ahead_interval">
<code class="sig-name descname">forecast_ahead_interval</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="n">steps</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS.forecast_ahead_interval"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_ahead_interval" title="Permalink to this definition"></a></dt>
<dd><p>Interval forecast n steps ahead</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>steps</strong> the number of steps ahead to forecast</p></li>
<li><p><strong>start_at</strong> in the multi step forecasting, the index of the data where to start forecasting (default: 0)</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a list with the forecasted intervals</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_distribution">
<code class="sig-name descname">forecast_distribution</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS.forecast_distribution"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_distribution" title="Permalink to this definition"></a></dt>
<dd><p>Probabilistic forecast one step ahead</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>kwargs</strong> model specific parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a list with probabilistic.ProbabilityDistribution objects representing the forecasted Probability Distributions</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_interval">
<code class="sig-name descname">forecast_interval</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS.forecast_interval"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_interval" title="Permalink to this definition"></a></dt>
<dd><p>Interval forecast one step ahead</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>kwargs</strong> model specific parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a list with the prediction intervals</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.get_UoD">
<code class="sig-name descname">get_UoD</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS.get_UoD"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.get_UoD" title="Permalink to this definition"></a></dt>
<dd><p>Returns the interval of the known bounds of the universe of discourse (UoD), i. e.,
the known minimum and maximum values of the time series.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>A set with the lower and the upper bounds of the UoD</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.get_distribution_interquantile">
<code class="sig-name descname">get_distribution_interquantile</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">forecasts</span></em>, <em class="sig-param"><span class="n">alpha</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS.get_distribution_interquantile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.get_distribution_interquantile" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.get_interval">
<code class="sig-name descname">get_interval</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">forecasts</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS.get_interval"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.get_interval" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.get_models_forecasts">
<code class="sig-name descname">get_models_forecasts</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS.get_models_forecasts"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.get_models_forecasts" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.get_point">
<code class="sig-name descname">get_point</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">forecasts</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS.get_point"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.get_point" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.interval_method">
<code class="sig-name descname">interval_method</code><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.interval_method" title="Permalink to this definition"></a></dt>
<dd><p>The method used to mix the several models forecasts into a interval forecast. Options: quantile, extremum, normal</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.models">
<code class="sig-name descname">models</code><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.models" title="Permalink to this definition"></a></dt>
<dd><p>A list of FTS models, the ensemble components</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.parameters">
<code class="sig-name descname">parameters</code><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.parameters" title="Permalink to this definition"></a></dt>
<dd><p>A list with the parameters for each component model</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.point_method">
<code class="sig-name descname">point_method</code><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.point_method" title="Permalink to this definition"></a></dt>
<dd><p>The method used to mix the several models forecasts into a unique point forecast. Options: mean, median, quantile, exponential</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.train">
<code class="sig-name descname">train</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#EnsembleFTS.train"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.train" title="Permalink to this definition"></a></dt>
<dd><p>Method specific parameter fitting</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> training time series data</p></li>
<li><p><strong>kwargs</strong> Method specific parameters</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py class">
<dt id="pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS">
<em class="property">class </em><code class="sig-prename descclassname">pyFTS.models.ensemble.ensemble.</code><code class="sig-name descname">SimpleEnsembleFTS</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#SimpleEnsembleFTS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS" title="pyFTS.models.ensemble.ensemble.EnsembleFTS"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.models.ensemble.ensemble.EnsembleFTS</span></code></a></p>
<p>An homogeneous FTS method ensemble with variations on partitionings and orders.</p>
<dl class="py attribute">
<dt id="pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS.method">
<code class="sig-name descname">method</code><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS.method" title="Permalink to this definition"></a></dt>
<dd><p>FTS method class that will be used on internal models</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS.orders">
<code class="sig-name descname">orders</code><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS.orders" title="Permalink to this definition"></a></dt>
<dd><p>Possible variations of order on internal models</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS.partitioner_method">
<code class="sig-name descname">partitioner_method</code><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS.partitioner_method" title="Permalink to this definition"></a></dt>
<dd><p>UoD partitioner class that will be used on internal methods</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS.partitions">
<code class="sig-name descname">partitions</code><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS.partitions" title="Permalink to this definition"></a></dt>
<dd><p>Possible variations of number of partitions on internal models</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS.train">
<code class="sig-name descname">train</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#SimpleEnsembleFTS.train"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS.train" title="Permalink to this definition"></a></dt>
<dd><p>Method specific parameter fitting</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> training time series data</p></li>
<li><p><strong>kwargs</strong> Method specific parameters</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.models.ensemble.ensemble.sampler">
<code class="sig-prename descclassname">pyFTS.models.ensemble.ensemble.</code><code class="sig-name descname">sampler</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="n">quantiles</span></em>, <em class="sig-param"><span class="n">bounds</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/ensemble.html#sampler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.sampler" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-pyFTS.models.ensemble.multiseasonal">
<span id="pyfts-models-ensemble-multiseasonal-module"></span><h2>pyFTS.models.ensemble.multiseasonal module<a class="headerlink" href="#module-pyFTS.models.ensemble.multiseasonal" title="Permalink to this headline"></a></h2>
<p>Silva, P. C. L et al. Probabilistic Forecasting with Seasonal Ensemble Fuzzy Time-Series
XIII Brazilian Congress on Computational Intelligence, 2017. Rio de Janeiro, Brazil.</p>
<dl class="py class">
<dt id="pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS">
<em class="property">class </em><code class="sig-prename descclassname">pyFTS.models.ensemble.multiseasonal.</code><code class="sig-name descname">SeasonalEnsembleFTS</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/multiseasonal.html#SeasonalEnsembleFTS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS" title="pyFTS.models.ensemble.ensemble.EnsembleFTS"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.models.ensemble.ensemble.EnsembleFTS</span></code></a></p>
<dl class="py method">
<dt id="pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS.forecast_distribution">
<code class="sig-name descname">forecast_distribution</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/multiseasonal.html#SeasonalEnsembleFTS.forecast_distribution"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS.forecast_distribution" title="Permalink to this definition"></a></dt>
<dd><p>Probabilistic forecast one step ahead</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>kwargs</strong> model specific parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a list with probabilistic.ProbabilityDistribution objects representing the forecasted Probability Distributions</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS.train">
<code class="sig-name descname">train</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/multiseasonal.html#SeasonalEnsembleFTS.train"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS.train" title="Permalink to this definition"></a></dt>
<dd><p>Method specific parameter fitting</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> training time series data</p></li>
<li><p><strong>kwargs</strong> Method specific parameters</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS.update_uod">
<code class="sig-name descname">update_uod</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/multiseasonal.html#SeasonalEnsembleFTS.update_uod"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS.update_uod" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.models.ensemble.multiseasonal.train_individual_model">
<code class="sig-prename descclassname">pyFTS.models.ensemble.multiseasonal.</code><code class="sig-name descname">train_individual_model</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">partitioner</span></em>, <em class="sig-param"><span class="n">train_data</span></em>, <em class="sig-param"><span class="n">indexer</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/ensemble/multiseasonal.html#train_individual_model"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.ensemble.multiseasonal.train_individual_model" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-pyFTS.models.ensemble">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyFTS.models.ensemble" title="Permalink to this headline"></a></h2>
<p>Meta FTS that aggregates other FTS methods</p>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</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>
<h3><a href="index.html">Table Of Contents</a></h3>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">pyFTS.models.ensemble package</a><ul>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
@ -86,346 +423,15 @@
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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">
<div class="section" id="pyfts-models-ensemble-package">
<h1>pyFTS.models.ensemble package<a class="headerlink" href="#pyfts-models-ensemble-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-pyFTS.models.ensemble.ensemble">
<span id="pyfts-models-ensemble-ensemble-module"></span><h2>pyFTS.models.ensemble.ensemble module<a class="headerlink" href="#module-pyFTS.models.ensemble.ensemble" title="Permalink to this headline"></a></h2>
<p>EnsembleFTS wraps several FTS methods to ensemble their forecasts, providing point,
interval and probabilistic forecasting.</p>
<p>Silva, P. C. L et al. Probabilistic Forecasting with Seasonal Ensemble Fuzzy Time-Series
XIII Brazilian Congress on Computational Intelligence, 2017. Rio de Janeiro, Brazil.</p>
<dl class="class">
<dt id="pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS">
<em class="property">class </em><code class="descclassname">pyFTS.models.ensemble.ensemble.</code><code class="descname">AllMethodEnsembleFTS</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS" title="pyFTS.models.ensemble.ensemble.EnsembleFTS"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.models.ensemble.ensemble.EnsembleFTS</span></code></a></p>
<p>Creates an EnsembleFTS with all point forecast methods, sharing the same partitioner</p>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS.set_transformations">
<code class="descname">set_transformations</code><span class="sig-paren">(</span><em>model</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS.set_transformations" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS.train">
<code class="descname">train</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.AllMethodEnsembleFTS.train" title="Permalink to this definition"></a></dt>
<dd><p>Method specific parameter fitting</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"><ul class="first last simple">
<li><strong>data</strong> training time series data</li>
<li><strong>kwargs</strong> Method specific parameters</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS">
<em class="property">class </em><code class="descclassname">pyFTS.models.ensemble.ensemble.</code><code class="descname">EnsembleFTS</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="pyFTS.common.html#pyFTS.common.fts.FTS" title="pyFTS.common.fts.FTS"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.common.fts.FTS</span></code></a></p>
<p>Ensemble FTS</p>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.append_model">
<code class="descname">append_model</code><span class="sig-paren">(</span><em>model</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.append_model" title="Permalink to this definition"></a></dt>
<dd><p>Append a new trained model to the ensemble</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>model</strong> FTS model</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast">
<code class="descname">forecast</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast" title="Permalink to this definition"></a></dt>
<dd><p>Point forecast one step ahead</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"><ul class="first simple">
<li><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</li>
<li><strong>kwargs</strong> model specific parameters</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list with the forecasted values</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_ahead_distribution">
<code class="descname">forecast_ahead_distribution</code><span class="sig-paren">(</span><em>data</em>, <em>steps</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_ahead_distribution" title="Permalink to this definition"></a></dt>
<dd><p>Probabilistic forecast n steps ahead</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"><ul class="first simple">
<li><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</li>
<li><strong>steps</strong> the number of steps ahead to forecast</li>
<li><strong>start_at</strong> in the multi step forecasting, the index of the data where to start forecasting (default: 0)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list with the forecasted Probability Distributions</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_ahead_interval">
<code class="descname">forecast_ahead_interval</code><span class="sig-paren">(</span><em>data</em>, <em>steps</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_ahead_interval" title="Permalink to this definition"></a></dt>
<dd><p>Interval forecast n steps ahead</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"><ul class="first simple">
<li><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</li>
<li><strong>steps</strong> the number of steps ahead to forecast</li>
<li><strong>start_at</strong> in the multi step forecasting, the index of the data where to start forecasting (default: 0)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list with the forecasted intervals</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_distribution">
<code class="descname">forecast_distribution</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_distribution" title="Permalink to this definition"></a></dt>
<dd><p>Probabilistic forecast one step ahead</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"><ul class="first simple">
<li><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</li>
<li><strong>kwargs</strong> model specific parameters</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list with probabilistic.ProbabilityDistribution objects representing the forecasted Probability Distributions</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_interval">
<code class="descname">forecast_interval</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.forecast_interval" title="Permalink to this definition"></a></dt>
<dd><p>Interval forecast one step ahead</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"><ul class="first simple">
<li><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</li>
<li><strong>kwargs</strong> model specific parameters</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list with the prediction intervals</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.get_UoD">
<code class="descname">get_UoD</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.get_UoD" title="Permalink to this definition"></a></dt>
<dd><p>Returns the interval of the known bounds of the universe of discourse (UoD), i. e.,
the known minimum and maximum values of the time series.</p>
<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">A set with the lower and the upper bounds of the UoD</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.get_distribution_interquantile">
<code class="descname">get_distribution_interquantile</code><span class="sig-paren">(</span><em>forecasts</em>, <em>alpha</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.get_distribution_interquantile" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.get_interval">
<code class="descname">get_interval</code><span class="sig-paren">(</span><em>forecasts</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.get_interval" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.get_models_forecasts">
<code class="descname">get_models_forecasts</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.get_models_forecasts" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.get_point">
<code class="descname">get_point</code><span class="sig-paren">(</span><em>forecasts</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.get_point" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.EnsembleFTS.train">
<code class="descname">train</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS.train" title="Permalink to this definition"></a></dt>
<dd><p>Method specific parameter fitting</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"><ul class="first last simple">
<li><strong>data</strong> training time series data</li>
<li><strong>kwargs</strong> Method specific parameters</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS">
<em class="property">class </em><code class="descclassname">pyFTS.models.ensemble.ensemble.</code><code class="descname">SimpleEnsembleFTS</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS" title="pyFTS.models.ensemble.ensemble.EnsembleFTS"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.models.ensemble.ensemble.EnsembleFTS</span></code></a></p>
<p>An homogeneous FTS method ensemble with variations on partitionings and orders.</p>
<dl class="method">
<dt id="pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS.train">
<code class="descname">train</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS.train" title="Permalink to this definition"></a></dt>
<dd><p>Method specific parameter fitting</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"><ul class="first last simple">
<li><strong>data</strong> training time series data</li>
<li><strong>kwargs</strong> Method specific parameters</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="pyFTS.models.ensemble.ensemble.sampler">
<code class="descclassname">pyFTS.models.ensemble.ensemble.</code><code class="descname">sampler</code><span class="sig-paren">(</span><em>data</em>, <em>quantiles</em>, <em>bounds=False</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.ensemble.sampler" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-pyFTS.models.ensemble.multiseasonal">
<span id="pyfts-models-ensemble-multiseasonal-module"></span><h2>pyFTS.models.ensemble.multiseasonal module<a class="headerlink" href="#module-pyFTS.models.ensemble.multiseasonal" title="Permalink to this headline"></a></h2>
<p>Silva, P. C. L et al. Probabilistic Forecasting with Seasonal Ensemble Fuzzy Time-Series
XIII Brazilian Congress on Computational Intelligence, 2017. Rio de Janeiro, Brazil.</p>
<dl class="class">
<dt id="pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS">
<em class="property">class </em><code class="descclassname">pyFTS.models.ensemble.multiseasonal.</code><code class="descname">SeasonalEnsembleFTS</code><span class="sig-paren">(</span><em>name</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#pyFTS.models.ensemble.ensemble.EnsembleFTS" title="pyFTS.models.ensemble.ensemble.EnsembleFTS"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.models.ensemble.ensemble.EnsembleFTS</span></code></a></p>
<dl class="method">
<dt id="pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS.forecast_distribution">
<code class="descname">forecast_distribution</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS.forecast_distribution" title="Permalink to this definition"></a></dt>
<dd><p>Probabilistic forecast one step ahead</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"><ul class="first simple">
<li><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</li>
<li><strong>kwargs</strong> model specific parameters</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list with probabilistic.ProbabilityDistribution objects representing the forecasted Probability Distributions</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS.train">
<code class="descname">train</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS.train" title="Permalink to this definition"></a></dt>
<dd><p>Method specific parameter fitting</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"><ul class="first last simple">
<li><strong>data</strong> training time series data</li>
<li><strong>kwargs</strong> Method specific parameters</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS.update_uod">
<code class="descname">update_uod</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.multiseasonal.SeasonalEnsembleFTS.update_uod" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="function">
<dt id="pyFTS.models.ensemble.multiseasonal.train_individual_model">
<code class="descclassname">pyFTS.models.ensemble.multiseasonal.</code><code class="descname">train_individual_model</code><span class="sig-paren">(</span><em>partitioner</em>, <em>train_data</em>, <em>indexer</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.ensemble.multiseasonal.train_individual_model" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-pyFTS.models.ensemble">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyFTS.models.ensemble" title="Permalink to this headline"></a></h2>
<p>Meta FTS that aggregates other FTS methods</p>
</div>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
@ -448,12 +454,13 @@ XIII Brazilian Congress on Computational Intelligence, 2017. Rio de Janeiro, Bra
<li class="nav-item nav-item-0"><a href="index.html">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="modules.html" >pyFTS</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" >pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="pyFTS.models.html" >pyFTS.models package</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="pyFTS.models.html" >pyFTS.models package</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS.models.ensemble package</a></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.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -2,10 +2,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<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">
<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']);
@ -20,19 +20,20 @@
<title>pyFTS.models.incremental package &#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 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>
<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.models.multivariate package" href="pyFTS.models.multivariate.html" />
<link rel="prev" title="pyFTS.models.ensemble package" href="pyFTS.models.ensemble.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>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -53,15 +54,280 @@
<li class="nav-item nav-item-0"><a href="index.html">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="modules.html" >pyFTS</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" >pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="pyFTS.models.html" accesskey="U">pyFTS.models package</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="pyFTS.models.html" accesskey="U">pyFTS.models package</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS.models.incremental package</a></li>
</ul>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="pyfts-models-incremental-package">
<h1>pyFTS.models.incremental package<a class="headerlink" href="#pyfts-models-incremental-package" title="Permalink to this headline"></a></h1>
<div class="section" id="module-pyFTS.models.incremental">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyFTS.models.incremental" title="Permalink to this headline"></a></h2>
<p>FTS methods with incremental/online learning</p>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-pyFTS.models.incremental.TimeVariant">
<span id="pyfts-models-incremental-timevariant-module"></span><h2>pyFTS.models.incremental.TimeVariant module<a class="headerlink" href="#module-pyFTS.models.incremental.TimeVariant" title="Permalink to this headline"></a></h2>
<p>Meta model that wraps another FTS method and continously retrain it using a data window with
the most recent data</p>
<dl class="py class">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer">
<em class="property">class </em><code class="sig-prename descclassname">pyFTS.models.incremental.TimeVariant.</code><code class="sig-name descname">Retrainer</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/incremental/TimeVariant.html#Retrainer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="pyFTS.common.html#pyFTS.common.fts.FTS" title="pyFTS.common.fts.FTS"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.common.fts.FTS</span></code></a></p>
<p>Meta model for incremental/online learning that retrain its internal model after
data windows controlled by the parameter batch_size, using as the training data a
window of recent lags, whose size is controlled by the parameter window_length.</p>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.auto_update">
<code class="sig-name descname">auto_update</code><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.auto_update" title="Permalink to this definition"></a></dt>
<dd><p>If true the model is updated at each time and not recreated</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.batch_size">
<code class="sig-name descname">batch_size</code><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.batch_size" title="Permalink to this definition"></a></dt>
<dd><p>The batch interval between each retraining</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.forecast">
<code class="sig-name descname">forecast</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/incremental/TimeVariant.html#Retrainer.forecast"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.forecast" title="Permalink to this definition"></a></dt>
<dd><p>Point forecast one step ahead</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>kwargs</strong> model specific parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a list with the forecasted values</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.forecast_ahead">
<code class="sig-name descname">forecast_ahead</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="n">steps</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/incremental/TimeVariant.html#Retrainer.forecast_ahead"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.forecast_ahead" title="Permalink to this definition"></a></dt>
<dd><p>Point forecast n steps ahead</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>steps</strong> the number of steps ahead to forecast (default: 1)</p></li>
<li><p><strong>start_at</strong> in the multi step forecasting, the index of the data where to start forecasting (default: 0)</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a list with the forecasted values</p>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.fts_method">
<code class="sig-name descname">fts_method</code><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.fts_method" title="Permalink to this definition"></a></dt>
<dd><p>The FTS method to be called when a new model is build</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.fts_params">
<code class="sig-name descname">fts_params</code><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.fts_params" title="Permalink to this definition"></a></dt>
<dd><p>The FTS method specific parameters</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.model">
<code class="sig-name descname">model</code><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.model" title="Permalink to this definition"></a></dt>
<dd><p>The most recent trained model</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.offset">
<code class="sig-name descname">offset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/incremental/TimeVariant.html#Retrainer.offset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.offset" title="Permalink to this definition"></a></dt>
<dd><p>Returns the number of lags to skip in the input test data in order to synchronize it with
the forecasted values given by the predict function. This is necessary due to the order of the
model, among other parameters.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>An integer with the number of lags to skip</p>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.partitioner">
<code class="sig-name descname">partitioner</code><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.partitioner" title="Permalink to this definition"></a></dt>
<dd><p>The most recent trained partitioner</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.partitioner_method">
<code class="sig-name descname">partitioner_method</code><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.partitioner_method" title="Permalink to this definition"></a></dt>
<dd><p>The partitioner method to be called when a new model is build</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.partitioner_params">
<code class="sig-name descname">partitioner_params</code><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.partitioner_params" title="Permalink to this definition"></a></dt>
<dd><p>The partitioner method parameters</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.train">
<code class="sig-name descname">train</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/incremental/TimeVariant.html#Retrainer.train"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.train" title="Permalink to this definition"></a></dt>
<dd><p>Method specific parameter fitting</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> training time series data</p></li>
<li><p><strong>kwargs</strong> Method specific parameters</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.window_length">
<code class="sig-name descname">window_length</code><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.window_length" title="Permalink to this definition"></a></dt>
<dd><p>The memory window length</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-pyFTS.models.incremental.IncrementalEnsemble">
<span id="pyfts-models-incremental-incrementalensemble-module"></span><h2>pyFTS.models.incremental.IncrementalEnsemble module<a class="headerlink" href="#module-pyFTS.models.incremental.IncrementalEnsemble" title="Permalink to this headline"></a></h2>
<p>Time Variant/Incremental Ensemble of FTS methods</p>
<dl class="py class">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS">
<em class="property">class </em><code class="sig-prename descclassname">pyFTS.models.incremental.IncrementalEnsemble.</code><code class="sig-name descname">IncrementalEnsembleFTS</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/incremental/IncrementalEnsemble.html#IncrementalEnsembleFTS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="pyFTS.models.ensemble.html#pyFTS.models.ensemble.ensemble.EnsembleFTS" title="pyFTS.models.ensemble.ensemble.EnsembleFTS"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.models.ensemble.ensemble.EnsembleFTS</span></code></a></p>
<p>Time Variant/Incremental Ensemble of FTS methods</p>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.batch_size">
<code class="sig-name descname">batch_size</code><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.batch_size" title="Permalink to this definition"></a></dt>
<dd><p>The batch interval between each retraining</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.forecast">
<code class="sig-name descname">forecast</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/incremental/IncrementalEnsemble.html#IncrementalEnsembleFTS.forecast"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.forecast" title="Permalink to this definition"></a></dt>
<dd><p>Point forecast one step ahead</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>kwargs</strong> model specific parameters</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a list with the forecasted values</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.forecast_ahead">
<code class="sig-name descname">forecast_ahead</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="n">steps</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/incremental/IncrementalEnsemble.html#IncrementalEnsembleFTS.forecast_ahead"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.forecast_ahead" title="Permalink to this definition"></a></dt>
<dd><p>Point forecast n steps ahead</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</p></li>
<li><p><strong>steps</strong> the number of steps ahead to forecast (default: 1)</p></li>
<li><p><strong>start_at</strong> in the multi step forecasting, the index of the data where to start forecasting (default: 0)</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>a list with the forecasted values</p>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.fts_method">
<code class="sig-name descname">fts_method</code><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.fts_method" title="Permalink to this definition"></a></dt>
<dd><p>The FTS method to be called when a new model is build</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.fts_params">
<code class="sig-name descname">fts_params</code><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.fts_params" title="Permalink to this definition"></a></dt>
<dd><p>The FTS method specific parameters</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.num_models">
<code class="sig-name descname">num_models</code><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.num_models" title="Permalink to this definition"></a></dt>
<dd><p>The number of models to hold in the ensemble</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.offset">
<code class="sig-name descname">offset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/incremental/IncrementalEnsemble.html#IncrementalEnsembleFTS.offset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.offset" title="Permalink to this definition"></a></dt>
<dd><p>Returns the number of lags to skip in the input test data in order to synchronize it with
the forecasted values given by the predict function. This is necessary due to the order of the
model, among other parameters.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>An integer with the number of lags to skip</p>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.partitioner_method">
<code class="sig-name descname">partitioner_method</code><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.partitioner_method" title="Permalink to this definition"></a></dt>
<dd><p>The partitioner method to be called when a new model is build</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.partitioner_params">
<code class="sig-name descname">partitioner_params</code><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.partitioner_params" title="Permalink to this definition"></a></dt>
<dd><p>The partitioner method parameters</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.train">
<code class="sig-name descname">train</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/models/incremental/IncrementalEnsemble.html#IncrementalEnsembleFTS.train"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.train" title="Permalink to this definition"></a></dt>
<dd><p>Method specific parameter fitting</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>data</strong> training time series data</p></li>
<li><p><strong>kwargs</strong> Method specific parameters</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.window_length">
<code class="sig-name descname">window_length</code><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.window_length" title="Permalink to this definition"></a></dt>
<dd><p>The memory window length</p>
</dd></dl>
</dd></dl>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</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>
<h3><a href="index.html">Table Of Contents</a></h3>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">pyFTS.models.incremental package</a><ul>
<li><a class="reference internal" href="#module-pyFTS.models.incremental">Module contents</a></li>
@ -86,217 +352,15 @@
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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">
<div class="section" id="pyfts-models-incremental-package">
<h1>pyFTS.models.incremental package<a class="headerlink" href="#pyfts-models-incremental-package" title="Permalink to this headline"></a></h1>
<div class="section" id="module-pyFTS.models.incremental">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyFTS.models.incremental" title="Permalink to this headline"></a></h2>
<p>FTS methods with incremental/online learning</p>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-pyFTS.models.incremental.TimeVariant">
<span id="pyfts-models-incremental-timevariant-module"></span><h2>pyFTS.models.incremental.TimeVariant module<a class="headerlink" href="#module-pyFTS.models.incremental.TimeVariant" title="Permalink to this headline"></a></h2>
<p>Meta model that wraps another FTS method and continously retrain it using a data window with
the most recent data</p>
<dl class="class">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer">
<em class="property">class </em><code class="descclassname">pyFTS.models.incremental.TimeVariant.</code><code class="descname">Retrainer</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="pyFTS.common.html#pyFTS.common.fts.FTS" title="pyFTS.common.fts.FTS"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.common.fts.FTS</span></code></a></p>
<p>Meta model for incremental/online learning that retrain its internal model after
data windows controlled by the parameter batch_size, using as the training data a
window of recent lags, whose size is controlled by the parameter window_length.</p>
<dl class="method">
<dt id="pyFTS.models.incremental.TimeVariant.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="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.forecast" title="Permalink to this definition"></a></dt>
<dd><p>Point forecast one step ahead</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"><ul class="first simple">
<li><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</li>
<li><strong>kwargs</strong> model specific parameters</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list with the forecasted values</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.forecast_ahead">
<code class="descname">forecast_ahead</code><span class="sig-paren">(</span><em>data</em>, <em>steps</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.forecast_ahead" title="Permalink to this definition"></a></dt>
<dd><p>Point forecast n steps ahead</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"><ul class="first simple">
<li><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</li>
<li><strong>steps</strong> the number of steps ahead to forecast (default: 1)</li>
<li><strong>start_at</strong> in the multi step forecasting, the index of the data where to start forecasting (default: 0)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list with the forecasted values</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.offset">
<code class="descname">offset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.offset" title="Permalink to this definition"></a></dt>
<dd><p>Returns the number of lags to skip in the input test data in order to synchronize it with
the forecasted values given by the predict function. This is necessary due to the order of the
model, among other parameters.</p>
<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">An integer with the number of lags to skip</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.incremental.TimeVariant.Retrainer.train">
<code class="descname">train</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.incremental.TimeVariant.Retrainer.train" title="Permalink to this definition"></a></dt>
<dd><p>Method specific parameter fitting</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"><ul class="first last simple">
<li><strong>data</strong> training time series data</li>
<li><strong>kwargs</strong> Method specific parameters</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-pyFTS.models.incremental.IncrementalEnsemble">
<span id="pyfts-models-incremental-incrementalensemble-module"></span><h2>pyFTS.models.incremental.IncrementalEnsemble module<a class="headerlink" href="#module-pyFTS.models.incremental.IncrementalEnsemble" title="Permalink to this headline"></a></h2>
<p>Time Variant/Incremental Ensemble of FTS methods</p>
<dl class="class">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS">
<em class="property">class </em><code class="descclassname">pyFTS.models.incremental.IncrementalEnsemble.</code><code class="descname">IncrementalEnsembleFTS</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="pyFTS.models.ensemble.html#pyFTS.models.ensemble.ensemble.EnsembleFTS" title="pyFTS.models.ensemble.ensemble.EnsembleFTS"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyFTS.models.ensemble.ensemble.EnsembleFTS</span></code></a></p>
<p>Time Variant/Incremental Ensemble of FTS methods</p>
<dl class="method">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.forecast">
<code class="descname">forecast</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.forecast" title="Permalink to this definition"></a></dt>
<dd><p>Point forecast one step ahead</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"><ul class="first simple">
<li><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</li>
<li><strong>kwargs</strong> model specific parameters</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list with the forecasted values</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.forecast_ahead">
<code class="descname">forecast_ahead</code><span class="sig-paren">(</span><em>data</em>, <em>steps</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.forecast_ahead" title="Permalink to this definition"></a></dt>
<dd><p>Point forecast n steps ahead</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"><ul class="first simple">
<li><strong>data</strong> time series data with the minimal length equal to the max_lag of the model</li>
<li><strong>steps</strong> the number of steps ahead to forecast (default: 1)</li>
<li><strong>start_at</strong> in the multi step forecasting, the index of the data where to start forecasting (default: 0)</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list with the forecasted values</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.offset">
<code class="descname">offset</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.offset" title="Permalink to this definition"></a></dt>
<dd><p>Returns the number of lags to skip in the input test data in order to synchronize it with
the forecasted values given by the predict function. This is necessary due to the order of the
model, among other parameters.</p>
<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">An integer with the number of lags to skip</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.train">
<code class="descname">train</code><span class="sig-paren">(</span><em>data</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.models.incremental.IncrementalEnsemble.IncrementalEnsembleFTS.train" title="Permalink to this definition"></a></dt>
<dd><p>Method specific parameter fitting</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"><ul class="first last simple">
<li><strong>data</strong> training time series data</li>
<li><strong>kwargs</strong> Method specific parameters</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
@ -319,12 +383,13 @@ model, among other parameters.</p>
<li class="nav-item nav-item-0"><a href="index.html">pyFTS 1.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="modules.html" >pyFTS</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" >pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="pyFTS.models.html" >pyFTS.models package</a> &#187;</li>
<li class="nav-item nav-item-3"><a href="pyFTS.models.html" >pyFTS.models package</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS.models.incremental package</a></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.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,10 +2,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<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">
<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']);
@ -20,18 +20,19 @@
<title>pyFTS.probabilistic package &#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 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>
<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="prev" title="pyFTS.partitioners package" href="pyFTS.partitioners.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>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -48,15 +49,334 @@
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-1"><a href="modules.html" >pyFTS</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" accesskey="U">pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" accesskey="U">pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS.probabilistic package</a></li>
</ul>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="pyfts-probabilistic-package">
<h1>pyFTS.probabilistic package<a class="headerlink" href="#pyfts-probabilistic-package" title="Permalink to this headline"></a></h1>
<div class="section" id="module-pyFTS.probabilistic">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyFTS.probabilistic" title="Permalink to this headline"></a></h2>
<p>Probability Distribution objects</p>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-pyFTS.probabilistic.ProbabilityDistribution">
<span id="pyfts-probabilistic-probabilitydistribution-module"></span><h2>pyFTS.probabilistic.ProbabilityDistribution module<a class="headerlink" href="#module-pyFTS.probabilistic.ProbabilityDistribution" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution">
<em class="property">class </em><code class="sig-prename descclassname">pyFTS.probabilistic.ProbabilityDistribution.</code><code class="sig-name descname">ProbabilityDistribution</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">type</span><span class="o">=</span><span class="default_value">'KDE'</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Represents a discrete or continous probability distribution
If type is histogram, the PDF is discrete
If type is KDE the PDF is continuous</p>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.append">
<code class="sig-name descname">append</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">values</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.append"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.append" title="Permalink to this definition"></a></dt>
<dd><p>Increment the frequency count for the values</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>values</strong> A list of values to account the frequency</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.append_interval">
<code class="sig-name descname">append_interval</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">intervals</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.append_interval"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.append_interval" title="Permalink to this definition"></a></dt>
<dd><p>Increment the frequency count for all values inside an interval</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>intervals</strong> A list of intervals do increment the frequency</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.averageloglikelihood">
<code class="sig-name descname">averageloglikelihood</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.averageloglikelihood"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.averageloglikelihood" title="Permalink to this definition"></a></dt>
<dd><p>Average log likelihood of the probability distribution with respect to data</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>data</strong> </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.bins">
<code class="sig-name descname">bins</code><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.bins" title="Permalink to this definition"></a></dt>
<dd><p>Number of bins on a discrete PDF</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.build_cdf_qtl">
<code class="sig-name descname">build_cdf_qtl</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.build_cdf_qtl"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.build_cdf_qtl" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.crossentropy">
<code class="sig-name descname">crossentropy</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.crossentropy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.crossentropy" title="Permalink to this definition"></a></dt>
<dd><p>Cross entropy between the actual probability distribution and the informed one,
H(P,Q) = - ∑ P(x) log ( Q(x) )</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>q</strong> a probabilistic.ProbabilityDistribution object</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Cross entropy between this probability distribution and the given distribution</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.cumulative">
<code class="sig-name descname">cumulative</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">values</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.cumulative"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.cumulative" title="Permalink to this definition"></a></dt>
<dd><p>Return the cumulative probability densities for the input values,
such that F(x) = P(X &lt;= x)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>values</strong> A list of input values</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The cumulative probability densities for the input values</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.density">
<code class="sig-name descname">density</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">values</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.density"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.density" title="Permalink to this definition"></a></dt>
<dd><p>Return the probability densities for the input values</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>values</strong> List of values to return the densities</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>List of probability densities for the input values</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.differential_offset">
<code class="sig-name descname">differential_offset</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.differential_offset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.differential_offset" title="Permalink to this definition"></a></dt>
<dd><p>Auxiliary function for probability distributions of differentiated data</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>value</strong> </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.empiricalloglikelihood">
<code class="sig-name descname">empiricalloglikelihood</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.empiricalloglikelihood"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.empiricalloglikelihood" title="Permalink to this definition"></a></dt>
<dd><p>Empirical Log Likelihood of the probability distribution, L(P) = ∑ log( P(x) )</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.entropy">
<code class="sig-name descname">entropy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.entropy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.entropy" title="Permalink to this definition"></a></dt>
<dd><p>Return the entropy of the probability distribution, H(P) = E[ -ln P(X) ] = - ∑ P(x) log ( P(x) )</p>
<p>:return:the entropy of the probability distribution</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.expected_value">
<code class="sig-name descname">expected_value</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.expected_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.expected_value" title="Permalink to this definition"></a></dt>
<dd><p>Return the expected value of the distribution, as E[X] = ∑ x * P(x)</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>The expected value of the distribution</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.kullbackleiblerdivergence">
<code class="sig-name descname">kullbackleiblerdivergence</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">q</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.kullbackleiblerdivergence"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.kullbackleiblerdivergence" title="Permalink to this definition"></a></dt>
<dd><p>Kullback-Leibler divergence between the actual probability distribution and the informed one.
DKL(P || Q) = - ∑ P(x) log( P(X) / Q(x) )</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>q</strong> a probabilistic.ProbabilityDistribution object</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>Kullback-Leibler divergence</p>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.labels">
<code class="sig-name descname">labels</code><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.labels" title="Permalink to this definition"></a></dt>
<dd><p>Bins labels on a discrete PDF</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.plot">
<code class="sig-name descname">plot</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">axis</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">color</span><span class="o">=</span><span class="default_value">'black'</span></em>, <em class="sig-param"><span class="n">tam</span><span class="o">=</span><span class="default_value">[10, 6]</span></em>, <em class="sig-param"><span class="n">title</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.plot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.plot" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.pseudologlikelihood">
<code class="sig-name descname">pseudologlikelihood</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.pseudologlikelihood"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.pseudologlikelihood" title="Permalink to this definition"></a></dt>
<dd><p>Pseudo log likelihood of the probability distribution with respect to data</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>data</strong> </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.quantile">
<code class="sig-name descname">quantile</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">values</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.quantile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.quantile" title="Permalink to this definition"></a></dt>
<dd><p>Return the Universe of Discourse values in relation to the quantile input values,
such that Q(tau) = min( {x | F(x) &gt;= tau })</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>values</strong> input values</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>The list of the quantile values for the input values</p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.set">
<code class="sig-name descname">set</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">value</span></em>, <em class="sig-param"><span class="n">density</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#ProbabilityDistribution.set"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.set" title="Permalink to this definition"></a></dt>
<dd><p>Assert a probability density for a certain value value, such that P(value) = density</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>value</strong> A value in the universe of discourse from the distribution</p></li>
<li><p><strong>density</strong> The probability density to assign to the value</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.type">
<code class="sig-name descname">type</code><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.type" title="Permalink to this definition"></a></dt>
<dd><p>If type is histogram, the PDF is discrete
If type is KDE the PDF is continuous</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.uod">
<code class="sig-name descname">uod</code><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.uod" title="Permalink to this definition"></a></dt>
<dd><p>Universe of discourse</p>
</dd></dl>
</dd></dl>
<dl class="py function">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.from_point">
<code class="sig-prename descclassname">pyFTS.probabilistic.ProbabilityDistribution.</code><code class="sig-name descname">from_point</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/ProbabilityDistribution.html#from_point"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.from_point" title="Permalink to this definition"></a></dt>
<dd><p>Create a probability distribution from a scalar value</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> scalar value</p></li>
<li><p><strong>kwargs</strong> common parameters of the distribution</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>the ProbabilityDistribution object</p>
</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-pyFTS.probabilistic.kde">
<span id="pyfts-probabilistic-kde-module"></span><h2>pyFTS.probabilistic.kde module<a class="headerlink" href="#module-pyFTS.probabilistic.kde" title="Permalink to this headline"></a></h2>
<p>Kernel Density Estimation</p>
<dl class="py class">
<dt id="pyFTS.probabilistic.kde.KernelSmoothing">
<em class="property">class </em><code class="sig-prename descclassname">pyFTS.probabilistic.kde.</code><code class="sig-name descname">KernelSmoothing</code><span class="sig-paren">(</span><em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/kde.html#KernelSmoothing"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.kde.KernelSmoothing" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Kernel Density Estimation</p>
<dl class="py attribute">
<dt id="pyFTS.probabilistic.kde.KernelSmoothing.h">
<code class="sig-name descname">h</code><a class="headerlink" href="#pyFTS.probabilistic.kde.KernelSmoothing.h" title="Permalink to this definition"></a></dt>
<dd><p>Width parameter</p>
</dd></dl>
<dl class="py attribute">
<dt id="pyFTS.probabilistic.kde.KernelSmoothing.kernel">
<code class="sig-name descname">kernel</code><a class="headerlink" href="#pyFTS.probabilistic.kde.KernelSmoothing.kernel" title="Permalink to this definition"></a></dt>
<dd><p>Kernel function</p>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.kde.KernelSmoothing.kernel_function">
<code class="sig-name descname">kernel_function</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">u</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/kde.html#KernelSmoothing.kernel_function"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.kde.KernelSmoothing.kernel_function" title="Permalink to this definition"></a></dt>
<dd><p>Apply the kernel</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>u</strong> </p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="pyFTS.probabilistic.kde.KernelSmoothing.probability">
<code class="sig-name descname">probability</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">x</span></em>, <em class="sig-param"><span class="o">**</span><span class="n">kwargs</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pyFTS/probabilistic/kde.html#KernelSmoothing.probability"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyFTS.probabilistic.kde.KernelSmoothing.probability" title="Permalink to this definition"></a></dt>
<dd><p>Probability of the point x on data</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> </p></li>
<li><p><strong>data</strong> </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</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>
<h3><a href="index.html">Table Of Contents</a></h3>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">pyFTS.probabilistic package</a><ul>
<li><a class="reference internal" href="#module-pyFTS.probabilistic">Module contents</a></li>
@ -78,342 +398,15 @@
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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">
<div class="section" id="pyfts-probabilistic-package">
<h1>pyFTS.probabilistic package<a class="headerlink" href="#pyfts-probabilistic-package" title="Permalink to this headline"></a></h1>
<div class="section" id="module-pyFTS.probabilistic">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pyFTS.probabilistic" title="Permalink to this headline"></a></h2>
<p>Probability Distribution objects</p>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-pyFTS.probabilistic.ProbabilityDistribution">
<span id="pyfts-probabilistic-probabilitydistribution-module"></span><h2>pyFTS.probabilistic.ProbabilityDistribution module<a class="headerlink" href="#module-pyFTS.probabilistic.ProbabilityDistribution" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution">
<em class="property">class </em><code class="descclassname">pyFTS.probabilistic.ProbabilityDistribution.</code><code class="descname">ProbabilityDistribution</code><span class="sig-paren">(</span><em>type='KDE'</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Represents a discrete or continous probability distribution
If type is histogram, the PDF is discrete
If type is KDE the PDF is continuous</p>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.append">
<code class="descname">append</code><span class="sig-paren">(</span><em>values</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.append" title="Permalink to this definition"></a></dt>
<dd><p>Increment the frequency count for the values</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>values</strong> A list of values to account the frequency</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.append_interval">
<code class="descname">append_interval</code><span class="sig-paren">(</span><em>intervals</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.append_interval" title="Permalink to this definition"></a></dt>
<dd><p>Increment the frequency count for all values inside an interval</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>intervals</strong> A list of intervals do increment the frequency</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.averageloglikelihood">
<code class="descname">averageloglikelihood</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.averageloglikelihood" title="Permalink to this definition"></a></dt>
<dd><p>Average log likelihood of the probability distribution with respect to 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>data</strong> </td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.build_cdf_qtl">
<code class="descname">build_cdf_qtl</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.build_cdf_qtl" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.crossentropy">
<code class="descname">crossentropy</code><span class="sig-paren">(</span><em>q</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.crossentropy" title="Permalink to this definition"></a></dt>
<dd><p>Cross entropy between the actual probability distribution and the informed one,
H(P,Q) = - ∑ P(x) log ( Q(x) )</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>q</strong> a probabilistic.ProbabilityDistribution object</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Cross entropy between this probability distribution and the given distribution</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.cumulative">
<code class="descname">cumulative</code><span class="sig-paren">(</span><em>values</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.cumulative" title="Permalink to this definition"></a></dt>
<dd><p>Return the cumulative probability densities for the input values,
such that F(x) = P(X &lt;= x)</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>values</strong> A list of input values</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The cumulative probability densities for the input values</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.density">
<code class="descname">density</code><span class="sig-paren">(</span><em>values</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.density" title="Permalink to this definition"></a></dt>
<dd><p>Return the probability densities for the input values</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>values</strong> List of values to return the densities</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">List of probability densities for the input values</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.differential_offset">
<code class="descname">differential_offset</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.differential_offset" title="Permalink to this definition"></a></dt>
<dd><p>Auxiliary function for probability distributions of differentiated 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>value</strong> </td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.empiricalloglikelihood">
<code class="descname">empiricalloglikelihood</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.empiricalloglikelihood" title="Permalink to this definition"></a></dt>
<dd><p>Empirical Log Likelihood of the probability distribution, L(P) = ∑ log( P(x) )</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"></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.entropy">
<code class="descname">entropy</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.entropy" title="Permalink to this definition"></a></dt>
<dd><p>Return the entropy of the probability distribution, H(P) = E[ -ln P(X) ] = - ∑ P(x) log ( P(x) )</p>
<p>:return:the entropy of the probability distribution</p>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.expected_value">
<code class="descname">expected_value</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.expected_value" title="Permalink to this definition"></a></dt>
<dd><p>Return the expected value of the distribution, as E[X] = ∑ x * P(x)</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">The expected value of the distribution</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.kullbackleiblerdivergence">
<code class="descname">kullbackleiblerdivergence</code><span class="sig-paren">(</span><em>q</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.kullbackleiblerdivergence" title="Permalink to this definition"></a></dt>
<dd><p>Kullback-Leibler divergence between the actual probability distribution and the informed one.
DKL(P || Q) = - ∑ P(x) log( P(X) / Q(x) )</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>q</strong> a probabilistic.ProbabilityDistribution object</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Kullback-Leibler divergence</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.plot">
<code class="descname">plot</code><span class="sig-paren">(</span><em>axis=None, color='black', tam=[10, 6], title=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.plot" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.pseudologlikelihood">
<code class="descname">pseudologlikelihood</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.pseudologlikelihood" title="Permalink to this definition"></a></dt>
<dd><p>Pseudo log likelihood of the probability distribution with respect to 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>data</strong> </td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.quantile">
<code class="descname">quantile</code><span class="sig-paren">(</span><em>values</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.quantile" title="Permalink to this definition"></a></dt>
<dd><p>Return the Universe of Discourse values in relation to the quantile input values,
such that Q(tau) = min( {x | F(x) &gt;= tau })</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>values</strong> input values</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">The list of the quantile values for the input values</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.set">
<code class="descname">set</code><span class="sig-paren">(</span><em>value</em>, <em>density</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution.set" title="Permalink to this definition"></a></dt>
<dd><p>Assert a probability density for a certain value value, such that P(value) = density</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"><ul class="first last simple">
<li><strong>value</strong> A value in the universe of discourse from the distribution</li>
<li><strong>density</strong> The probability density to assign to the value</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="pyFTS.probabilistic.ProbabilityDistribution.from_point">
<code class="descclassname">pyFTS.probabilistic.ProbabilityDistribution.</code><code class="descname">from_point</code><span class="sig-paren">(</span><em>x</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.ProbabilityDistribution.from_point" title="Permalink to this definition"></a></dt>
<dd><p>Create a probability distribution from a scalar value</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"><ul class="first simple">
<li><strong>x</strong> scalar value</li>
<li><strong>kwargs</strong> common parameters of the distribution</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the ProbabilityDistribution object</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="module-pyFTS.probabilistic.kde">
<span id="pyfts-probabilistic-kde-module"></span><h2>pyFTS.probabilistic.kde module<a class="headerlink" href="#module-pyFTS.probabilistic.kde" title="Permalink to this headline"></a></h2>
<p>Kernel Density Estimation</p>
<dl class="class">
<dt id="pyFTS.probabilistic.kde.KernelSmoothing">
<em class="property">class </em><code class="descclassname">pyFTS.probabilistic.kde.</code><code class="descname">KernelSmoothing</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.kde.KernelSmoothing" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Kernel Density Estimation</p>
<dl class="method">
<dt id="pyFTS.probabilistic.kde.KernelSmoothing.kernel_function">
<code class="descname">kernel_function</code><span class="sig-paren">(</span><em>u</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.kde.KernelSmoothing.kernel_function" title="Permalink to this definition"></a></dt>
<dd><p>Apply the kernel</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>u</strong> </td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="pyFTS.probabilistic.kde.KernelSmoothing.probability">
<code class="descname">probability</code><span class="sig-paren">(</span><em>x</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#pyFTS.probabilistic.kde.KernelSmoothing.probability" title="Permalink to this definition"></a></dt>
<dd><p>Probability of the point x on 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"><ul class="first simple">
<li><strong>x</strong> </li>
<li><strong>data</strong> </li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
@ -432,12 +425,13 @@ such that Q(tau) = min( {x | F(x) &gt;= tau })</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-1"><a href="modules.html" >pyFTS</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" >pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-2"><a href="pyFTS.html" >pyFTS package</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pyFTS.probabilistic package</a></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.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>

View File

@ -2,10 +2,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<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">
<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']);
@ -20,19 +20,20 @@
<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 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>
<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 type="text/javascript" src="_static/css3-mediaqueries.js"></script>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
@ -50,21 +51,86 @@
<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-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>
<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">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/logo_heading2.png" alt="Logo"/>
</a></p>
<h3><a href="index.html">Table Of Contents</a></h3>
<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="#references">References</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>
@ -83,112 +149,15 @@
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="text" name="q" aria-labelledby="searchlabel" />
<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">
<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>pip install -U pyFTS</div></blockquote>
<p>Ou clone directly from the GitHub repo for the most recent review:</p>
<blockquote>
<div>pip install -U git+https://github.com/PYFTS/pyFTS</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><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.</li>
<li><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:</li>
</ol>
<blockquote>
<div><ul class="simple">
<li>the number of intervals</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/Huarng.py">HuarngPartitioner</a>)</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><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>
</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><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.</li>
<li><strong>Defuzzyfication</strong>: This step transform the fuzzy forecast into a real number.</li>
<li><strong>Data postprocessing</strong>: The inverse operations of step 1.</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="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline"></a></h2>
<ol class="arabic simple">
<li><ol class="first upperalpha" start="17">
<li>Song and B. S. Chissom, “Fuzzy time series and its models,” Fuzzy Sets Syst., vol. 54, no. 3, pp. 269277, 1993.</li>
</ol>
</li>
<li>S.-M. Chen, “Forecasting enrollments based on fuzzy time series,” Fuzzy Sets Syst., vol. 81, no. 3, pp. 311319, 1996.</li>
<li><ol class="first upperalpha" start="3">
<li><ol class="first upperalpha" start="8">
<li>Cheng, R. J. Chang, and C. A. Yeh, “Entropy-based and trapezoidal fuzzification-based fuzzy time series approach for forecasting IT project cost”. Technol. Forecast. Social Change, vol. 73, no. 5, pp. 524542, Jun. 2006.</li>
</ol>
</li>
</ol>
</li>
<li><ol class="first upperalpha" start="11">
<li><ol class="first upperalpha" start="8">
<li>Huarng, “Effective lengths of intervals to improve forecasting in fuzzy time series”. Fuzzy Sets Syst., vol. 123, no. 3, pp. 387394, Nov. 2001.</li>
</ol>
</li>
</ol>
</li>
<li>H.-K. Yu, “Weighted fuzzy time series models for TAIEX forecasting”. Phys. A Stat. Mech. its Appl., vol. 349, no. 3, pp. 609624, 2005.</li>
<li><ol class="first upperalpha" start="18">
<li>Efendi, Z. Ismail, and M. M. Deris, “Improved weight Fuzzy Time Series as used in the exchange rates forecasting of US Dollar to Ringgit Malaysia,” Int. J. Comput. Intell. Appl., vol. 12, no. 1, p. 1350005, 2013.</li>
</ol>
</li>
<li><ol class="first upperalpha" start="8">
<li><ol class="first upperalpha" start="10">
<li>Sadaei, R. Enayatifar, A. H. Abdullah, and A. Gani, “Short-term load forecasting using a hybrid model with a refined exponentially weighted fuzzy time series and an improved harmony search,” Int. J. Electr. Power Energy Syst., vol. 62, no. from 2005, pp. 118129, 2014.</li>
</ol>
</li>
</ol>
</li>
<li>C.-H. Cheng, Y.-S. Chen, and Y.-L. Wu, “Forecasting innovation diffusion of products using trend-weighted fuzzy time-series model,” Expert Syst. Appl., vol. 36, no. 2, pp. 18261832, 2009.</li>
</ol>
</div>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
@ -208,12 +177,13 @@
<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-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="http://sphinx-doc.org/">Sphinx</a> 1.7.2.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>

View File

@ -2,10 +2,10 @@
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<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">
<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']);
@ -20,24 +20,22 @@
<title>Search &#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 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/searchtools.js"></script>
<script type="text/javascript" src="_static/bizstyle.js"></script>
<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>
<script src="_static/searchtools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="#" />
<script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
<script type="text/javascript" id="searchindexloader"></script>
<script src="searchindex.js" defer></script>
<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>
<script src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
@ -50,16 +48,10 @@
<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.6 documentation</a> &#187;</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="">Search</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>
</div>
</div>
<div class="document">
<div class="documentwrapper">
@ -68,20 +60,18 @@
<h1 id="search-documentation">Search</h1>
<div id="fallback" class="admonition warning">
<script type="text/javascript">$('#fallback').hide();</script>
<script>$('#fallback').hide();</script>
<p>
Please activate JavaScript to enable the search
functionality.
</p>
</div>
<p>
From here you can search these documents. Enter your search
words into the box below and click "search". Note that the search
function will automatically search for all of the words. Pages
containing fewer words won't appear in the result list.
Searching for multiple words only shows matches that contain
all words.
</p>
<form action="" method="get">
<input type="text" name="q" value="" />
<input type="text" name="q" aria-labelledby="search-documentation" value="" />
<input type="submit" value="search" />
<span id="search-progress" style="padding-left: 10px"></span>
</form>
@ -90,9 +80,14 @@
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
@ -104,12 +99,13 @@
<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.6 documentation</a> &#187;</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="">Search</a></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.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.2.
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,6 @@ pyFTS - Fuzzy Time Series for Python
What is pyFTS Library?
----------------------
.. image:: https://badges.frapsoft.com/os/v2/open-source.png?v=103
.. image:: https://img.shields.io/badge/License-GPLv3-blue.svg
.. image:: https://img.shields.io/badge/Made%20with-Python-1f425f.svg

View File

@ -51,14 +51,12 @@ There is nothing better than good code examples to start. `Then check out the de
A Google Colab example can also be found `here <https://drive.google.com/file/d/1zRBCHXOawwgmzjEoKBgmvBqkIrKxuaz9/view?usp=sharing>`_.
References
----------
A short tutorial on Fuzzy Time Series
-------------------------------------
Part I: `Introduction to the Fuzzy Logic, Fuzzy Time Series and the pyFTS library <https://towardsdatascience.com/a-short-tutorial-on-fuzzy-time-series-dcc6d4eb1b15>`_.
Part II: `High order, weighted and multivariate methods and a case study of solar energy forecasting. <https://towardsdatascience.com/a-short-tutorial-on-fuzzy-time-series-part-ii-with-an-case-study-on-solar-energy-bda362ecca6d>`_.
Part III: `Interval and probabilistic forecasting, non-stationary time series, concept drifts and time variant models. <https://towardsdatascience.com/a-short-tutorial-on-fuzzy-time-series-part-iii-69445dff83fb>`_.
1. Q. Song and B. S. Chissom, “Fuzzy time series and its models,” Fuzzy Sets Syst., vol. 54, no. 3, pp. 269277, 1993.
2. S.-M. Chen, “Forecasting enrollments based on fuzzy time series,” Fuzzy Sets Syst., vol. 81, no. 3, pp. 311319, 1996.
3. C. H. Cheng, R. J. Chang, and C. A. Yeh, “Entropy-based and trapezoidal fuzzification-based fuzzy time series approach for forecasting IT project cost”. Technol. Forecast. Social Change, vol. 73, no. 5, pp. 524542, Jun. 2006.
4. K. H. Huarng, “Effective lengths of intervals to improve forecasting in fuzzy time series”. Fuzzy Sets Syst., vol. 123, no. 3, pp. 387394, Nov. 2001.
5. H.-K. Yu, “Weighted fuzzy time series models for TAIEX forecasting”. Phys. A Stat. Mech. its Appl., vol. 349, no. 3, pp. 609624, 2005.
6. R. Efendi, Z. Ismail, and M. M. Deris, “Improved weight Fuzzy Time Series as used in the exchange rates forecasting of US Dollar to Ringgit Malaysia,” Int. J. Comput. Intell. Appl., vol. 12, no. 1, p. 1350005, 2013.
7. H. J. Sadaei, R. Enayatifar, A. H. Abdullah, and A. Gani, “Short-term load forecasting using a hybrid model with a refined exponentially weighted fuzzy time series and an improved harmony search,” Int. J. Electr. Power Energy Syst., vol. 62, no. from 2005, pp. 118129, 2014.
8. C.-H. Cheng, Y.-S. Chen, and Y.-L. Wu, “Forecasting innovation diffusion of products using trend-weighted fuzzy time-series model,” Expert Syst. Appl., vol. 36, no. 2, pp. 18261832, 2009.

View File

@ -4,7 +4,6 @@ Common facilities for pyFTS
import time
import matplotlib.pyplot as plt
import dill
import numpy as np
import pandas as pd
import matplotlib.cm as cmx
@ -515,6 +514,7 @@ def persist_obj(obj, file):
:param obj: object on memory
:param file: file name to store the object
"""
import dill
try:
with open(file, 'wb') as _file:
dill.dump(obj, _file)
@ -529,6 +529,7 @@ def load_obj(file):
:param file: file name where the object is stored
:return: object
"""
import dill
with open(file, 'rb') as _file:
obj = dill.load(_file)
return obj
@ -540,10 +541,12 @@ def persist_env(file):
:param file: file name to store the environment
"""
import dill
dill.dump_session(file)
def load_env(file):
import dill
dill.load_session(file)

View File

@ -51,11 +51,14 @@ class MultivariateFuzzySet(Composite.FuzzySet):
def fuzzyfy_instance(data_point, var, tuples=True):
#try:
fsets = var.partitioner.fuzzyfy(data_point, mode='sets', method='fuzzy', alpha_cut=var.alpha_cut)
if tuples:
return [(var.name, fs) for fs in fsets]
else:
return fsets
#except Exception as ex:
# print(data_point)
def fuzzyfy_instance_clustered(data_point, cluster, **kwargs):

View File

@ -3,6 +3,7 @@ S. T. Li, Y. C. Cheng, and S. Y. Lin, “A FCM-based deterministic forecasting m
Comput. Math. Appl., vol. 56, no. 12, pp. 30523063, Dec. 2008. DOI: 10.1016/j.camwa.2008.07.033.
"""
import numpy as np
import pandas as pd
import math
import random as rnd
import functools, operator
@ -11,7 +12,7 @@ from pyFTS.partitioners import partitioner
def fuzzy_distance(x, y):
if isinstance(x, list):
if isinstance(x, (list, tuple, np.ndarray)):
tmp = functools.reduce(operator.add, [(x[k] - y[k]) ** 2 for k in range(0, len(x))])
else:
tmp = (x - y) ** 2
@ -28,78 +29,65 @@ def membership(val, vals):
return soma
def fuzzy_cmeans(k, dados, tam, m, deltadist=0.001):
tam_dados = len(dados)
def fuzzy_cmeans(k, data, size, m, deltadist=0.001):
data_length = len(data)
# Inicializa as centróides escolhendo elementos aleatórios dos conjuntos
centroides = [dados[rnd.randint(0, tam_dados - 1)] for kk in range(0, k)]
# Centroid initialization
centroids = [data[rnd.randint(0, data_length - 1)] for kk in range(0, k)]
# Tabela de pertinência das instâncias aos grupos
grupos = [[0 for kk in range(0, k)] for xx in range(0, tam_dados)]
# Membership table
membership_table = np.zeros((k, data_length)) #[[0 for kk in range(0, k)] for xx in range(0, data_length)]
alteracaomedia = 1000
mean_change = 1000
m_exp = 1 / (m - 1)
# para cada instância
iteracoes = 0
iterations = 0
while iteracoes < 1000 and alteracaomedia > deltadist:
alteracaomedia = 0
# verifica a distância para cada centroide
# Atualiza a pertinencia daquela instância para cada um dos grupos
while iterations < 1000 and mean_change > deltadist:
mean_change = 0
inst_count = 0
for instancia in dados:
for instance in data:
dist_grupos = [0 for xx in range(0, k)]
dist_groups = np.zeros(k) #[0 for xx in range(0, k)]
grupo_count = 0
for grupo in centroides:
dist_grupos[grupo_count] = fuzzy_distance(grupo, instancia)
grupo_count = grupo_count + 1
for group_count, group in enumerate(centroids):
dist_groups[group_count] = fuzzy_distance(group, instance)
dist_grupos_total = functools.reduce(operator.add, [xk for xk in dist_grupos])
dist_groups_total = functools.reduce(operator.add, [xk for xk in dist_groups])
for grp in range(0, k):
if dist_grupos[grp] == 0:
grupos[inst_count][grp] = 1
if dist_groups[grp] == 0:
membership_table[inst_count][grp] = 1
else:
grupos[inst_count][grp] = 1 / membership(dist_grupos[grp], dist_grupos)
# grupos[inst_count][grp] = 1/(dist_grupos[grp] / dist_grupos_total)
# grupos[inst_count][grp] = (1/(dist_grupos[grp]**2))**m_exp / (1/(dist_grupos_total**2))**m_exp
membership_table[inst_count][grp] = 1 / membership(dist_groups[grp], dist_groups)
# membership_table[inst_count][grp] = 1/(dist_groups[grp] / dist_grupos_total)
# membership_table[inst_count][grp] = (1/(dist_groups[grp]**2))**m_exp / (1/(dist_grupos_total**2))**m_exp
inst_count = inst_count + 1
# return centroides
# atualiza cada centroide com base na Média de todos os padrões ponderados pelo grau de pertinência
grupo_count = 0
for grupo in centroides:
if tam > 1:
oldgrp = [xx for xx in grupo]
for atr in range(0, tam):
for group_count, group in enumerate(centroids):
if size > 1:
oldgrp = [xx for xx in group]
for atr in range(0, size):
soma = functools.reduce(operator.add,
[grupos[xk][grupo_count] * dados[xk][atr] for xk in range(0, tam_dados)])
norm = functools.reduce(operator.add, [grupos[xk][grupo_count] for xk in range(0, tam_dados)])
centroides[grupo_count][atr] = soma / norm
[membership_table[xk][group_count] * data[xk][atr] for xk in range(0, data_length)])
norm = functools.reduce(operator.add, [membership_table[xk][group_count] for xk in range(0, data_length)])
centroids[group_count][atr] = soma / norm
else:
oldgrp = grupo
oldgrp = group
soma = functools.reduce(operator.add,
[grupos[xk][grupo_count] * dados[xk] for xk in range(0, tam_dados)])
norm = functools.reduce(operator.add, [grupos[xk][grupo_count] for xk in range(0, tam_dados)])
centroides[grupo_count] = soma / norm
[membership_table[xk][group_count] * data[xk] for xk in range(0, data_length)])
norm = functools.reduce(operator.add, [membership_table[xk][group_count] for xk in range(0, data_length)])
centroids[group_count] = soma / norm
alteracaomedia = alteracaomedia + fuzzy_distance(oldgrp, grupo)
grupo_count = grupo_count + 1
mean_change = mean_change + fuzzy_distance(oldgrp, group)
alteracaomedia = alteracaomedia / k
iteracoes = iteracoes + 1
mean_change = mean_change / k
iterations = iterations + 1
return centroides
return centroids
class FCMPartitioner(partitioner.Partitioner):

View File

@ -4,6 +4,7 @@ from scipy.spatial import KDTree
import matplotlib.pylab as plt
import logging
class Partitioner(object):
"""
Universe of Discourse partitioner. Split data on several fuzzy sets

View File

@ -20,6 +20,54 @@ import os
from pyFTS.data import Malaysia, Enrollments
# Esta função cria o grid de data. Dada uma índice e a quantidade de dias out of range e in range ele retorna uma lista com a janela móvel
def gen_dates(index, time_is, time_os):
t = -1
t_aux = t
size = len(index)
dates = []
while -size < t - time_is - time_os + 1:
t = t_aux
end_os = index[t]
t -= time_os - 1
init_os = index[t]
t -= 1
t_aux = t
end_is = index[t]
t -= time_is - 1
init_is = index[t]
t -= 1
row = [init_is, end_is, init_os, end_os]
dates.append(row)
return dates
sp500 = pd.read_csv('/home/petronio/Downloads/sp500.csv', index_col=0)
stock = sp500.iloc[:, :5]
date_grid = gen_dates (index = stock.index, time_is= 100, time_os = 2)
date_range = date_grid[0]
init_is, end_is, init_os, end_os = date_range
train = stock[init_is:end_is]
test = stock[init_os:end_os]
close = variable.Variable("close", data_label='Adj Close', partitioner=Grid.GridPartitioner, npart=20,data=train)
polarity = variable.Variable("polarity", data_label='sentiment_bert', partitioner=Grid.GridPartitioner, npart=50,data=train)
from pyFTS.models import hofts
#mpolarity = mvfts.MVFTS(explanatory_variables=[close, polarity], target_variable=polarity)
mpolarity = hofts.HighOrderFTS(partitioner=polarity.partitioner)
mpolarity.fit(train['sentiment_bert'].values)
mclose = mvfts.MVFTS(explanatory_variables=[close, polarity], target_variable=close)
mclose.fit(train)
forecasts = mclose.predict(train[-1:], steps_ahead=2, generators = {'sentiment_bert': mpolarity})
'''
df = Malaysia.get_dataframe()
df['time'] = pd.to_datetime(df["time"], format='%m/%d/%y %I:%M %p')
@ -50,7 +98,7 @@ model.fit(train_mv) #, num_batches=10) #, distributed='dispy',nodes=['192.168.0.
print(model)
'''
def sample_by_hour(data):
return [np.nanmean(data[k:k+60]) for k in np.arange(0,len(data),60)]