\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/common/Membership.html b/docs/build/html/_modules/pyFTS/common/Membership.html
index f9dc69d..b14367f 100644
--- a/docs/build/html/_modules/pyFTS/common/Membership.html
+++ b/docs/build/html/_modules/pyFTS/common/Membership.html
@@ -5,31 +5,19 @@
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/common/SortedCollection.html b/docs/build/html/_modules/pyFTS/common/SortedCollection.html
index 9bcff75..4ad350f 100644
--- a/docs/build/html/_modules/pyFTS/common/SortedCollection.html
+++ b/docs/build/html/_modules/pyFTS/common/SortedCollection.html
@@ -5,31 +5,19 @@
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/common/fts.html b/docs/build/html/_modules/pyFTS/common/fts.html
index 6c62349..c4f0efe 100644
--- a/docs/build/html/_modules/pyFTS/common/fts.html
+++ b/docs/build/html/_modules/pyFTS/common/fts.html
@@ -5,31 +5,19 @@
import numpy as np
import pandas as pd
-from pyFTS.common import FuzzySet , SortedCollection , tree , Util
+from pyFTS.common import FuzzySet , Util
+from pyFTS.common.transformations import transformation
+from pyFTS.partitioners import partitioner
+from pyFTS.probabilistic import ProbabilityDistribution
[docs] class FTS ( object ):
"""
Fuzzy Time Series object model
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
"""
Create a Fuzzy Time Series model
"""
-
self . flrgs = {}
+
self . flrgs : dict = {}
"""The list of Fuzzy Logical Relationship Groups - FLRG"""
-
self . order = kwargs . get ( 'order' , 1 )
+
self . order : int = kwargs . get ( 'order' , 1 )
"""A integer with the model order (number of past lags are used on forecasting)"""
-
self . shortname = kwargs . get ( 'name' , "" )
+
self . shortname : str = kwargs . get ( 'name' , "" )
"""A string with a short name or alias for the model"""
-
self . name = kwargs . get ( 'name' , "" )
+
self . name : str = kwargs . get ( 'name' , "" )
"""A string with the model name"""
-
self . detail = kwargs . get ( 'name' , "" )
+
self . detail : str = kwargs . get ( 'name' , "" )
"""A string with the model detailed information"""
-
self . is_wrapper = False
+
self . is_wrapper : bool = False
"""Indicates that this model is a wrapper for other(s) method(s)"""
-
self . is_high_order = False
+
self . is_high_order : bool = False
"""A boolean value indicating if the model support orders greater than 1, default: False"""
-
self . min_order = 1
+
self . min_order : int = 1
"""In high order models, this integer value indicates the minimal order supported for the model, default: 1"""
-
self . has_seasonality = False
+
self . has_seasonality : bool = False
"""A boolean value indicating if the model supports seasonal indexers, default: False"""
-
self . has_point_forecasting = True
+
self . has_point_forecasting : bool = True
"""A boolean value indicating if the model supports point forecasting, default: True"""
-
self . has_interval_forecasting = False
+
self . has_interval_forecasting : bool = False
"""A boolean value indicating if the model supports interval forecasting, default: False"""
-
self . has_probability_forecasting = False
+
self . has_probability_forecasting : bool = False
"""A boolean value indicating if the model support probabilistic forecasting, default: False"""
-
self . is_multivariate = False
+
self . is_multivariate : bool = False
"""A boolean value indicating if the model support multivariate time series (Pandas DataFrame), default: False"""
-
self . is_clustered = False
+
self . is_clustered : bool = False
"""A boolean value indicating if the model support multivariate time series (Pandas DataFrame), but works like
a monovariate method, default: False"""
-
self . dump = False
-
self . transformations = []
+
self . dump : bool = False
+
self . transformations : list [ transformation . Transformation ] = []
"""A list with the data transformations (common.Transformations) applied on model pre and post processing, default: []"""
-
self . transformations_param = []
+
self . transformations_param : list = []
"""A list with the specific parameters for each data transformation"""
-
self . original_max = 0
+
self . original_max : float = 0.0
"""A float with the upper limit of the Universe of Discourse, the maximal value found on training data"""
-
self . original_min = 0
+
self . original_min : float = 0.0
"""A float with the lower limit of the Universe of Discourse, the minimal value found on training data"""
-
self . partitioner = kwargs . get ( "partitioner" , None )
+
self . partitioner : partitioner . Partitioner = kwargs . get ( "partitioner" , None )
"""A pyFTS.partitioners.Partitioner object with the Universe of Discourse partitioner used on the model. This is a mandatory dependecy. """
if self . partitioner != None :
self . sets = self . partitioner . sets
-
self . auto_update = False
+
self . auto_update : bool = False
"""A boolean value indicating that model is incremental"""
-
self . benchmark_only = False
+
self . benchmark_only : bool = False
"""A boolean value indicating a façade for external (non-FTS) model used on benchmarks or ensembles."""
self . indexer = kwargs . get ( "indexer" , None )
"""An pyFTS.models.seasonal.Indexer object for indexing the time series data"""
-
self . uod_clip = kwargs . get ( "uod_clip" , True )
+
self . uod_clip : bool = kwargs . get ( "uod_clip" , True )
"""Flag indicating if the test data will be clipped inside the training Universe of Discourse"""
-
self . alpha_cut = kwargs . get ( "alpha_cut" , 0.0 )
+
self . alpha_cut : float = kwargs . get ( "alpha_cut" , 0.0 )
"""A float with the minimal membership to be considered on fuzzyfication process"""
-
self . lags = kwargs . get ( "lags" , None )
+
self . lags : list [ int ] = kwargs . get ( "lags" , None )
"""The list of lag indexes for high order models"""
-
self . max_lag = self . order
+
self . max_lag : int = self . order
"""A integer indicating the largest lag used by the model. This value also indicates the minimum number of past lags
needed to forecast a single step ahead"""
-
self . log = pd . DataFrame ([], columns = [ "Datetime" , "Operation" , "Value" ])
+
self . log : pd . DataFrame = pd . DataFrame ([], columns = [ "Datetime" , "Operation" , "Value" ])
""""""
-
self . is_time_variant = False
+
self . is_time_variant : bool = False
"""A boolean value indicating if this model is time variant"""
-
self . standard_horizon = kwargs . get ( "standard_horizon" , 1 )
+
self . standard_horizon : int = kwargs . get ( "standard_horizon" , 1 )
"""Standard forecasting horizon (Default: 1)"""
-
[docs] def fuzzy ( self , data ):
+
[docs] def fuzzy ( self , data ) -> dict :
"""
Fuzzify a data point
@@ -234,7 +225,7 @@
else :
if distributed == 'dispy' :
-
from pyFTS.distributed import dispy
+
from pyFTS.distributed import dispy
nodes = kw . pop ( "nodes" , [ '127.0.0.1' ])
num_batches = kw . pop ( 'num_batches' , 10 )
@@ -242,7 +233,7 @@
ret = dispy . distributed_predict ( self , kw , nodes , ndata , num_batches , ** kw )
elif distributed == 'spark' :
-
from pyFTS.distributed import spark
+
from pyFTS.distributed import spark
ret = spark . distributed_predict ( data = ndata , model = self , ** kw )
@@ -255,7 +246,7 @@
return ret
-
[docs] def forecast ( self , data , ** kwargs ):
+
[docs] def forecast ( self , data , ** kwargs ) -> list :
"""
Point forecast one step ahead
@@ -265,7 +256,7 @@
"""
raise NotImplementedError ( 'This model do not perform one step ahead point forecasts!' )
-
[docs] def forecast_interval ( self , data , ** kwargs ):
+
[docs] def forecast_interval ( self , data , ** kwargs ) -> list :
"""
Interval forecast one step ahead
@@ -275,7 +266,7 @@
"""
raise NotImplementedError ( 'This model do not perform one step ahead interval forecasts!' )
-
[docs] def forecast_distribution ( self , data , ** kwargs ):
+
[docs] def forecast_distribution ( self , data , ** kwargs ) -> list :
"""
Probabilistic forecast one step ahead
@@ -285,7 +276,7 @@
"""
raise NotImplementedError ( 'This model do not perform one step ahead distribution forecasts!' )
-
[docs] def forecast_multivariate ( self , data , ** kwargs ):
+
[docs] def forecast_multivariate ( self , data , ** kwargs ) -> pd . DataFrame :
"""
Multivariate forecast one step ahead
@@ -296,7 +287,7 @@
raise NotImplementedError ( 'This model do not perform one step ahead multivariate forecasts!' )
-
[docs] def forecast_ahead ( self , data , steps , ** kwargs ):
+
[docs] def forecast_ahead ( self , data , steps , ** kwargs ) -> list :
"""
Point forecast from 1 to H steps ahead, where H is given by the steps parameter
@@ -326,7 +317,7 @@
return ret [ - steps :]
-
[docs] def forecast_ahead_interval ( self , data , steps , ** kwargs ):
+
[docs] def forecast_ahead_interval ( self , data , steps , ** kwargs ) -> list :
"""
Interval forecast from 1 to H steps ahead, where H is given by the steps parameter
@@ -337,7 +328,7 @@
"""
raise NotImplementedError ( 'This model do not perform multi step ahead interval forecasts!' )
-
[docs] def forecast_ahead_distribution ( self , data , steps , ** kwargs ):
+
[docs] def forecast_ahead_distribution ( self , data , steps , ** kwargs ) -> list :
"""
Probabilistic forecast from 1 to H steps ahead, where H is given by the steps parameter
@@ -348,7 +339,7 @@
"""
raise NotImplementedError ( 'This model do not perform multi step ahead distribution forecasts!' )
-
[docs] def forecast_ahead_multivariate ( self , data , steps , ** kwargs ):
+
[docs] def forecast_ahead_multivariate ( self , data , steps , ** kwargs ) -> pd . DataFrame :
"""
Multivariate forecast n step ahead
@@ -359,7 +350,7 @@
"""
raise NotImplementedError ( 'This model do not perform one step ahead multivariate forecasts!' )
-
[docs] def forecast_step ( self , data , step , ** kwargs ):
+
[docs] def forecast_step ( self , data , step , ** kwargs ) -> list :
"""
Point forecast for H steps ahead, where H is given by the step parameter
@@ -381,7 +372,7 @@
start = kwargs . get ( 'start_at' , 0 )
-
for k in np . arange ( start + self . max_lag , l ):
+
for k in np . arange ( start + self . max_lag , l + 1 ):
sample = data [ k - self . max_lag : k ]
tmp = self . forecast_ahead ( sample , step , ** kwargs )
@@ -457,13 +448,13 @@
num_batches = 10
if distributed == 'dispy' :
-
from pyFTS.distributed import dispy
+
from pyFTS.distributed import dispy
nodes = kw . pop ( 'nodes' , False )
train_method = kwargs . get ( 'train_method' , dispy . simple_model_train )
dispy . distributed_train ( self , train_method , nodes , type ( self ), data , num_batches , {},
** kw )
elif distributed == 'spark' :
-
from pyFTS.distributed import spark
+
from pyFTS.distributed import spark
url = kwargs . get ( 'url' , 'spark://127.0.0.1:7077' )
app = kwargs . get ( 'app' , 'pyFTS' )
@@ -481,7 +472,7 @@
rng = range ( self . order , n , batch_size )
if dump == 'tqdm' :
-
from tqdm import tqdm
+
from tqdm import tqdm
rng = tqdm ( rng )
@@ -630,7 +621,7 @@
else :
return data
-
[docs] def get_UoD ( self ):
+
[docs] def get_UoD ( self ) -> set :
"""
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.
@@ -642,7 +633,7 @@
else :
return ( self . original_min , self . original_max )
-
[docs] def offset ( self ):
+
[docs] def offset ( self ) -> int :
"""
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
@@ -655,7 +646,7 @@
else :
return 1
-
def __str__ ( self ):
+
def __str__ ( self ):
"""
String representation of the model
@@ -672,7 +663,7 @@
tmp = " {0}{1} \n " . format ( tmp , str ( self . flrgs [ r ]))
return tmp
-
def __len__ ( self ):
+
def __len__ ( self ):
"""
The length (number of rules) of the model
@@ -718,7 +709,7 @@
Quick search
@@ -737,14 +728,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.common.fts
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/common/tree.html b/docs/build/html/_modules/pyFTS/common/tree.html
index 407d315..1b47d25 100644
--- a/docs/build/html/_modules/pyFTS/common/tree.html
+++ b/docs/build/html/_modules/pyFTS/common/tree.html
@@ -5,31 +5,19 @@
-
-
pyFTS.common.tree — pyFTS 1.6 documentation
-
-
+
+
pyFTS.common.tree — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.common.tree
@@ -59,8 +47,8 @@
Tree data structure
"""
-
from pyFTS import *
-
from functools import reduce
+
from pyFTS import *
+
from functools import reduce
import numpy as np
@@ -69,7 +57,7 @@
Tree node for
"""
-
def __init__ ( self , value ):
+
def __init__ ( self , value ):
self . isRoot = False
self . children = []
self . value = value
@@ -98,13 +86,13 @@
tmp = tmp + " \n " + child . getStr ( k + 1 )
return tmp
-
def __str__ ( self ):
+
def __str__ ( self ):
return self . getStr ( 0 )
[docs] class FLRGTree :
"""Represents a FLRG set with a tree structure"""
-
def __init__ ( self ):
+
def __init__ ( self ):
self . root = FLRGTreeNode ( None )
@@ -140,7 +128,7 @@
Quick search
@@ -159,14 +147,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.common.tree
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/AirPassengers.html b/docs/build/html/_modules/pyFTS/data/AirPassengers.html
index f41548a..83fd631 100644
--- a/docs/build/html/_modules/pyFTS/data/AirPassengers.html
+++ b/docs/build/html/_modules/pyFTS/data/AirPassengers.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.AirPassengers — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.AirPassengers — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.AirPassengers
@@ -61,12 +49,12 @@
Source: Hyndman, R.J., Time Series Data Library, http://www-personal.buseco.monash.edu.au/~hyndman/TSDL/.
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ():
+
[docs] def get_data () -> np . ndarray :
"""
Get a simple univariate time series data.
@@ -76,7 +64,7 @@
dat = np . array ( dat [ "Passengers" ])
return dat
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/Bitcoin.html b/docs/build/html/_modules/pyFTS/data/Bitcoin.html
index 039b971..6995362 100644
--- a/docs/build/html/_modules/pyFTS/data/Bitcoin.html
+++ b/docs/build/html/_modules/pyFTS/data/Bitcoin.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.Bitcoin — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.Bitcoin — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.Bitcoin
@@ -64,12 +52,12 @@
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ( field = 'AVG' ):
+
[docs] def get_data ( field : str = 'AVG' ) -> np . ndarray :
"""
Get the univariate time series data.
@@ -79,7 +67,8 @@
dat = get_dataframe ()
return np . array ( dat [ field ])
-
[docs] def get_dataframe ():
+
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/DowJones.html b/docs/build/html/_modules/pyFTS/data/DowJones.html
index 788e76a..9e36827 100644
--- a/docs/build/html/_modules/pyFTS/data/DowJones.html
+++ b/docs/build/html/_modules/pyFTS/data/DowJones.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.DowJones — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.DowJones — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.DowJones
@@ -64,12 +52,12 @@
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ( field = 'AVG' ):
+
[docs] def get_data ( field : str = 'AVG' ) -> np . ndarray :
"""
Get the univariate time series data.
@@ -80,7 +68,7 @@
return np . array ( dat [ field ])
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/EURGBP.html b/docs/build/html/_modules/pyFTS/data/EURGBP.html
index efc8ea1..5cd71ee 100644
--- a/docs/build/html/_modules/pyFTS/data/EURGBP.html
+++ b/docs/build/html/_modules/pyFTS/data/EURGBP.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.EURGBP — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.EURGBP — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.EURGBP
@@ -62,12 +50,12 @@
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ( field = 'avg' ):
+
[docs] def get_data ( field : str = 'avg' ) -> np . ndarray :
"""
Get the univariate time series data.
@@ -78,7 +66,7 @@
return np . array ( dat [ field ])
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/EURUSD.html b/docs/build/html/_modules/pyFTS/data/EURUSD.html
index 34c98f8..0ed6382 100644
--- a/docs/build/html/_modules/pyFTS/data/EURUSD.html
+++ b/docs/build/html/_modules/pyFTS/data/EURUSD.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.EURUSD — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.EURUSD — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.EURUSD
@@ -62,12 +50,12 @@
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ( field = 'avg' ):
+
[docs] def get_data ( field : str = 'avg' ) -> np . ndarray :
"""
Get the univariate time series data.
@@ -78,7 +66,7 @@
return np . array ( dat [ field ])
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/Enrollments.html b/docs/build/html/_modules/pyFTS/data/Enrollments.html
index 9c9805e..29ee458 100644
--- a/docs/build/html/_modules/pyFTS/data/Enrollments.html
+++ b/docs/build/html/_modules/pyFTS/data/Enrollments.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.Enrollments — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.Enrollments — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.Enrollments
@@ -59,12 +47,12 @@
Yearly University of Alabama enrollments from 1971 to 1992.
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ():
+
[docs] def get_data () -> np . ndarray :
"""
Get a simple univariate time series data.
@@ -75,7 +63,7 @@
return dat
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/Ethereum.html b/docs/build/html/_modules/pyFTS/data/Ethereum.html
index 34dce24..cd2a0b2 100644
--- a/docs/build/html/_modules/pyFTS/data/Ethereum.html
+++ b/docs/build/html/_modules/pyFTS/data/Ethereum.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.Ethereum — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.Ethereum — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.Ethereum
@@ -64,12 +52,12 @@
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ( field = 'AVG' ):
+
[docs] def get_data ( field : str = 'AVG' ) -> np . ndarray :
"""
Get the univariate time series data.
@@ -80,7 +68,7 @@
return np . array ( dat [ field ])
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/GBPUSD.html b/docs/build/html/_modules/pyFTS/data/GBPUSD.html
index e7e65b7..b9fd6bb 100644
--- a/docs/build/html/_modules/pyFTS/data/GBPUSD.html
+++ b/docs/build/html/_modules/pyFTS/data/GBPUSD.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.GBPUSD — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.GBPUSD — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.GBPUSD
@@ -62,12 +50,12 @@
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ( field = 'avg' ):
+
[docs] def get_data ( field : str = 'avg' ) -> np . ndarray :
"""
Get the univariate time series data.
@@ -78,7 +66,7 @@
return np . array ( dat [ field ])
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/INMET.html b/docs/build/html/_modules/pyFTS/data/INMET.html
index 270d0ff..74b21e1 100644
--- a/docs/build/html/_modules/pyFTS/data/INMET.html
+++ b/docs/build/html/_modules/pyFTS/data/INMET.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.INMET — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.INMET — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.INMET
@@ -63,11 +51,11 @@
Source: http://www.inmet.gov.br
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/Malaysia.html b/docs/build/html/_modules/pyFTS/data/Malaysia.html
index 883291b..ae09f51 100644
--- a/docs/build/html/_modules/pyFTS/data/Malaysia.html
+++ b/docs/build/html/_modules/pyFTS/data/Malaysia.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.Malaysia — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.Malaysia — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.Malaysia
@@ -60,12 +48,12 @@
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ( field = 'load' ):
+
[docs] def get_data ( field : str = 'load' ) -> np . ndarray :
"""
Get the univariate time series data.
@@ -76,7 +64,7 @@
return np . array ( dat [ field ])
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/NASDAQ.html b/docs/build/html/_modules/pyFTS/data/NASDAQ.html
index da8cb12..6430ac2 100644
--- a/docs/build/html/_modules/pyFTS/data/NASDAQ.html
+++ b/docs/build/html/_modules/pyFTS/data/NASDAQ.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.NASDAQ — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.NASDAQ — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.NASDAQ
@@ -63,12 +51,12 @@
Source: http://www.nasdaq.com/aspx/flashquotes.aspx?symbol=IXIC&selected=IXIC
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ( field = "avg" ):
+
[docs] def get_data ( field : str = "avg" ) -> np . ndarray :
"""
Get a simple univariate time series data.
@@ -80,7 +68,7 @@
return dat
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/SONDA.html b/docs/build/html/_modules/pyFTS/data/SONDA.html
index d7402bf..b20bfb9 100644
--- a/docs/build/html/_modules/pyFTS/data/SONDA.html
+++ b/docs/build/html/_modules/pyFTS/data/SONDA.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.SONDA — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.SONDA — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.SONDA
@@ -63,12 +51,12 @@
Source: http://sonda.ccst.inpe.br/
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ( field ):
+
[docs] def get_data ( field : str ) -> np . ndarray :
"""
Get a simple univariate time series data.
@@ -80,7 +68,7 @@
return dat
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/SP500.html b/docs/build/html/_modules/pyFTS/data/SP500.html
index b1e8e27..8d67f4f 100644
--- a/docs/build/html/_modules/pyFTS/data/SP500.html
+++ b/docs/build/html/_modules/pyFTS/data/SP500.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.SP500 — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.SP500 — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.SP500
@@ -63,12 +51,12 @@
Source: https://finance.yahoo.com/quote/%5EGSPC/history?p=%5EGSPC
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ():
+
[docs] def get_data () -> np . ndarray :
"""
Get the univariate time series data.
@@ -78,7 +66,7 @@
return np . array ( dat [ "Avg" ])
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/TAIEX.html b/docs/build/html/_modules/pyFTS/data/TAIEX.html
index df4656b..e0c9309 100644
--- a/docs/build/html/_modules/pyFTS/data/TAIEX.html
+++ b/docs/build/html/_modules/pyFTS/data/TAIEX.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.TAIEX — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.TAIEX — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.TAIEX
@@ -62,12 +50,12 @@
Source: http://www.twse.com.tw/en/products/indices/Index_Series.php
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ():
+
[docs] def get_data () -> np . ndarray :
"""
Get the univariate time series data.
@@ -78,7 +66,7 @@
return dat
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/artificial.html b/docs/build/html/_modules/pyFTS/data/artificial.html
index e085c33..5952ef5 100644
--- a/docs/build/html/_modules/pyFTS/data/artificial.html
+++ b/docs/build/html/_modules/pyFTS/data/artificial.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.artificial — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.artificial — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.artificial
@@ -67,13 +55,13 @@
Emulate a complex signal built from several additive and non-additive components
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( SignalEmulator , self ) . __init__ ()
self . components = []
"""Components of the signal"""
-
[docs] def stationary_gaussian ( self , mu , sigma , ** kwargs ):
+
[docs] def stationary_gaussian ( self , mu : float , sigma : float , ** kwargs ):
"""
Creates a continuous Gaussian signal with mean mu and variance sigma.
@@ -93,7 +81,7 @@
'parameters' : parameters , 'args' : kwargs })
return self
-
[docs] def incremental_gaussian ( self , mu , sigma , ** kwargs ):
+
[docs] def incremental_gaussian ( self , mu : float , sigma : float , ** kwargs ):
"""
Creates an additive gaussian interference on a previous signal
@@ -111,7 +99,7 @@
'parameters' : parameters , 'args' : kwargs })
return self
-
[docs] def periodic_gaussian ( self , type , period , mu_min , sigma_min , mu_max , sigma_max , ** kwargs ):
+
[docs] def periodic_gaussian ( self , type : str , period : int , mu_min : float , sigma_min : float , mu_max : float , sigma_max : float , ** kwargs ):
"""
Creates an additive periodic gaussian interference on a previous signal
@@ -407,7 +395,7 @@
Quick search
@@ -426,14 +414,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.artificial
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/common.html b/docs/build/html/_modules/pyFTS/data/common.html
index 6d2c5b4..15e29e2 100644
--- a/docs/build/html/_modules/pyFTS/data/common.html
+++ b/docs/build/html/_modules/pyFTS/data/common.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.common — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.common — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.common
@@ -60,11 +48,11 @@
import numpy as np
import os
import pkg_resources
-
from pathlib import Path
-
from urllib import request
+
from pathlib import Path
+
from urllib import request
-
[docs] def get_dataframe ( filename , url , sep = ";" , compression = 'infer' ):
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/henon.html b/docs/build/html/_modules/pyFTS/data/henon.html
index ee62d8b..30f3459 100644
--- a/docs/build/html/_modules/pyFTS/data/henon.html
+++ b/docs/build/html/_modules/pyFTS/data/henon.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.henon — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.henon — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.henon
@@ -66,7 +54,7 @@
import pandas as pd
-
[docs] def get_data ( var , a = 1.4 , b = 0.3 , initial_values = [ 1 , 1 ], iterations = 1000 ):
+
[docs] def get_data ( var : str , a : float = 1.4 , b : float = 0.3 , initial_values : list = [ 1 , 1 ], iterations : int = 1000 ) -> pd . DataFrame :
"""
Get a simple univariate time series data.
@@ -76,7 +64,7 @@
return get_dataframe ( a , b , initial_values , iterations )[ var ] . values
-
[docs] def get_dataframe ( a = 1.4 , b = 0.3 , initial_values = [ 1 , 1 ], iterations = 1000 ):
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/logistic_map.html b/docs/build/html/_modules/pyFTS/data/logistic_map.html
index 80313e2..b9eff32 100644
--- a/docs/build/html/_modules/pyFTS/data/logistic_map.html
+++ b/docs/build/html/_modules/pyFTS/data/logistic_map.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.logistic_map — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.logistic_map — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.logistic_map
@@ -65,7 +53,7 @@
import numpy as np
-
[docs] def get_data ( r = 4 , initial_value = 0.3 , iterations = 100 ):
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/lorentz.html b/docs/build/html/_modules/pyFTS/data/lorentz.html
index bda3492..fb4fad4 100644
--- a/docs/build/html/_modules/pyFTS/data/lorentz.html
+++ b/docs/build/html/_modules/pyFTS/data/lorentz.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.lorentz — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.lorentz — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.lorentz
@@ -68,8 +56,8 @@
import pandas as pd
-
[docs] def get_data ( var , a = 10.0 , b = 28.0 , c = 8.0 / 3.0 , dt = 0.01 ,
-
initial_values = [ 0.1 , 0 , 0 ], iterations = 1000 ):
+
[docs] def get_data ( var : str , a : float = 10.0 , b : float = 28.0 , c : float = 8.0 / 3.0 , dt : float = 0.01 ,
+
initial_values : list = [ 0.1 , 0 , 0 ], iterations : int = 1000 ) -> pd . DataFrame :
"""
Get a simple univariate time series data.
@@ -79,8 +67,8 @@
return get_dataframe ( a , b , c , dt , initial_values , iterations )[ var ] . values
-
[docs] def get_dataframe ( a = 10.0 , b = 28.0 , c = 8.0 / 3.0 , dt = 0.01 ,
-
initial_values = [ 0.1 , 0 , 0 ], iterations = 1000 ):
+
[docs] def get_dataframe ( a : float = 10.0 , b : float = 28.0 , c : float = 8.0 / 3.0 , dt : float = 0.01 ,
+
initial_values : list = [ 0.1 , 0 , 0 ], iterations : int = 1000 ) -> pd . DataFrame :
'''
Return a dataframe with the multivariate Lorenz Map time series (x, y, z).
@@ -118,7 +106,7 @@
Quick search
@@ -137,14 +125,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.lorentz
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/mackey_glass.html b/docs/build/html/_modules/pyFTS/data/mackey_glass.html
index b381054..cbc32d0 100644
--- a/docs/build/html/_modules/pyFTS/data/mackey_glass.html
+++ b/docs/build/html/_modules/pyFTS/data/mackey_glass.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.mackey_glass — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.mackey_glass — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.mackey_glass
@@ -65,7 +53,7 @@
import numpy as np
-
[docs] def get_data ( b = 0.1 , c = 0.2 , tau = 17 , initial_values = np . linspace ( 0.5 , 1.5 , 18 ), iterations = 1000 ):
+
[docs] def get_data ( b : float = 0.1 , c : float = 0.2 , tau : float = 17 , initial_values : np . ndarray = np . linspace ( 0.5 , 1.5 , 18 ), iterations : int = 1000 ) -> list :
'''
Return a list with the Mackey-Glass chaotic time series.
@@ -94,7 +82,7 @@
Quick search
@@ -113,14 +101,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.mackey_glass
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/rossler.html b/docs/build/html/_modules/pyFTS/data/rossler.html
index d0b3b8e..4110ebe 100644
--- a/docs/build/html/_modules/pyFTS/data/rossler.html
+++ b/docs/build/html/_modules/pyFTS/data/rossler.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.rossler — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.rossler — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.rossler
@@ -68,8 +56,8 @@
import pandas as pd
-
[docs] def get_data ( var , a = 0.2 , b = 0.2 , c = 5.7 , dt = 0.01 ,
-
initial_values = [ 0.001 , 0.001 , 0.001 ], iterations = 5000 ):
+
[docs] def get_data ( var : str , a : float = 0.2 , b : float = 0.2 , c : float = 5.7 , dt : float = 0.01 ,
+
initial_values : np . ndarray = [ 0.001 , 0.001 , 0.001 ], iterations : int = 5000 ) -> np . ndarray :
"""
Get a simple univariate time series data.
@@ -79,8 +67,8 @@
return get_dataframe ( a , b , c , dt , initial_values , iterations )[ var ] . values
-
[docs] def get_dataframe ( a = 0.2 , b = 0.2 , c = 5.7 , dt = 0.01 ,
-
initial_values = [ 0.001 , 0.001 , 0.001 ], iterations = 5000 ):
+
[docs] def get_dataframe ( a : float = 0.2 , b : float = 0.2 , c : float = 5.7 , dt : float = 0.01 ,
+
initial_values : np . ndarray = [ 0.001 , 0.001 , 0.001 ], iterations : int = 5000 ) -> pd . DataFrame :
'''
Return a dataframe with the multivariate Rössler Map time series (x, y, z).
@@ -118,7 +106,7 @@
Quick search
@@ -137,14 +125,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.rossler
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/data/sunspots.html b/docs/build/html/_modules/pyFTS/data/sunspots.html
index 5b83b34..2333e72 100644
--- a/docs/build/html/_modules/pyFTS/data/sunspots.html
+++ b/docs/build/html/_modules/pyFTS/data/sunspots.html
@@ -5,31 +5,19 @@
-
-
pyFTS.data.sunspots — pyFTS 1.6 documentation
-
-
+
+
pyFTS.data.sunspots — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.data.sunspots
@@ -61,11 +49,11 @@
Source: https://www.esrl.noaa.gov/psd/gcos_wgsp/Timeseries/SUNSPOT/
"""
-
from pyFTS.data import common
+
from pyFTS.data import common
import pandas as pd
import numpy as np
-
[docs] def get_data ():
+
[docs] def get_data () -> np . ndarray :
"""
Get a simple univariate time series data.
@@ -75,7 +63,7 @@
dat = np . array ( dat [ "SUNACTIVITY" ])
return dat
-
[docs] def get_dataframe ():
+
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/hyperparam/Evolutionary.html b/docs/build/html/_modules/pyFTS/hyperparam/Evolutionary.html
index 9b4bc45..e0a53a5 100644
--- a/docs/build/html/_modules/pyFTS/hyperparam/Evolutionary.html
+++ b/docs/build/html/_modules/pyFTS/hyperparam/Evolutionary.html
@@ -5,31 +5,19 @@
-
-
pyFTS.hyperparam.Evolutionary — pyFTS 1.6 documentation
-
-
+
+
pyFTS.hyperparam.Evolutionary — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.hyperparam.Evolutionary
@@ -63,16 +51,16 @@
import pandas as pd
import math
import time
-
from functools import reduce
-
from operator import itemgetter
+
from functools import reduce
+
from operator import itemgetter
import random
-
from pyFTS.common import Util
-
from pyFTS.benchmarks import Measures
-
from pyFTS.partitioners import Grid , Entropy # , Huarng
-
from pyFTS.common import Membership
-
from pyFTS.models import hofts , ifts , pwfts
-
from pyFTS.hyperparam import Util as hUtil
+
from pyFTS.common import Util
+
from pyFTS.benchmarks import Measures
+
from pyFTS.partitioners import Grid , Entropy # , Huarng
+
from pyFTS.common import Membership
+
from pyFTS.models import hofts , ifts , pwfts
+
from pyFTS.hyperparam import Util as hUtil
__measures = [ 'f1' , 'f2' , 'rmse' , 'size' ]
@@ -144,7 +132,7 @@
:param parameters: dict with model specific arguments for fit method.
:return: a fitted FTS model
"""
-
from pyFTS.models import hofts , ifts , pwfts
+
from pyFTS.models import hofts , ifts , pwfts
if individual [ 'mf' ] == 1 :
mf = Membership . trimf
@@ -182,10 +170,10 @@
:param parameters: dict with model specific arguments for fit method.
:return: a tuple (len_lags, rmse) with the parsimony fitness value and the accuracy fitness value
"""
-
from pyFTS.models import hofts , ifts , pwfts
-
from pyFTS.common import Util
-
from pyFTS.benchmarks import Measures
-
from pyFTS.hyperparam.Evolutionary import phenotype , __measures
+
from pyFTS.models import hofts , ifts , pwfts
+
from pyFTS.common import Util
+
from pyFTS.benchmarks import Measures
+
from pyFTS.hyperparam.Evolutionary import phenotype , __measures
import numpy as np
window_size = kwargs . get ( 'window_size' , 800 )
@@ -471,7 +459,7 @@
for key in __measures :
individual [ key ] = ret [ key ]
elif distributed == 'dispy' :
-
from pyFTS.distributed import dispy as dUtil
+
from pyFTS.distributed import dispy as dUtil
import dispy
jobs = []
for ct , individual in enumerate ( population ):
@@ -660,7 +648,7 @@
shortname = str ( fts_method . __module__ ) . split ( '.' )[ - 1 ]
if distributed == 'dispy' :
-
from pyFTS.distributed import dispy as dUtil
+
from pyFTS.distributed import dispy as dUtil
nodes = kwargs . get ( 'nodes' , [ '127.0.0.1' ])
cluster , http_server = dUtil . start_dispy_cluster ( evaluate , nodes = nodes )
kwargs [ 'cluster' ] = cluster
@@ -693,7 +681,7 @@
Quick search
@@ -712,14 +700,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.hyperparam.Evolutionary
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/hyperparam/GridSearch.html b/docs/build/html/_modules/pyFTS/hyperparam/GridSearch.html
index f052f42..462e189 100644
--- a/docs/build/html/_modules/pyFTS/hyperparam/GridSearch.html
+++ b/docs/build/html/_modules/pyFTS/hyperparam/GridSearch.html
@@ -5,31 +5,19 @@
-
-
pyFTS.hyperparam.GridSearch — pyFTS 1.6 documentation
-
-
+
+
pyFTS.hyperparam.GridSearch — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.hyperparam.GridSearch
@@ -56,14 +44,14 @@
Source code for pyFTS.hyperparam.GridSearch
-from pyFTS.common import Util , Membership
-from pyFTS.models import hofts
-from pyFTS.partitioners import Grid , Entropy
-from pyFTS.benchmarks import Measures
-from pyFTS.hyperparam import Util as hUtil
+from pyFTS.common import Util , Membership
+from pyFTS.models import hofts
+from pyFTS.partitioners import Grid , Entropy
+from pyFTS.benchmarks import Measures
+from pyFTS.hyperparam import Util as hUtil
import numpy as np
-from itertools import product
+from itertools import product
[docs] def dict_individual ( mf , partitioner , partitions , order , lags , alpha_cut ):
@@ -78,10 +66,10 @@
[docs] def cluster_method ( individual , dataset , ** kwargs ):
-
from pyFTS.common import Util , Membership
-
from pyFTS.models import hofts
-
from pyFTS.partitioners import Grid , Entropy
-
from pyFTS.benchmarks import Measures
+
from pyFTS.common import Util , Membership
+
from pyFTS.models import hofts
+
from pyFTS.partitioners import Grid , Entropy
+
from pyFTS.benchmarks import Measures
import numpy as np
if individual [ 'mf' ] == 1 :
@@ -129,7 +117,7 @@
[docs] def process_jobs ( jobs , datasetname , conn ):
-
from pyFTS.distributed import dispy as dUtil
+
from pyFTS.distributed import dispy as dUtil
import dispy
for ct , job in enumerate ( jobs ):
print ( "Processing job {} " . format ( ct ))
@@ -156,7 +144,7 @@
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/hyperparam/Util.html b/docs/build/html/_modules/pyFTS/hyperparam/Util.html
index da359fc..bb0e9e7 100644
--- a/docs/build/html/_modules/pyFTS/hyperparam/Util.html
+++ b/docs/build/html/_modules/pyFTS/hyperparam/Util.html
@@ -5,31 +5,19 @@
-
-
pyFTS.hyperparam.Util — pyFTS 1.6 documentation
-
-
+
+
pyFTS.hyperparam.Util — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.hyperparam.Util
@@ -137,7 +125,7 @@
Quick search
@@ -156,14 +144,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.hyperparam.Util
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/chen.html b/docs/build/html/_modules/pyFTS/models/chen.html
index 5bf3e9f..c4ae96c 100644
--- a/docs/build/html/_modules/pyFTS/models/chen.html
+++ b/docs/build/html/_modules/pyFTS/models/chen.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.chen — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.chen — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.chen
@@ -62,12 +50,12 @@
"""
import numpy as np
-
from pyFTS.common import FuzzySet , FLR , fts , flrg
+
from pyFTS.common import FuzzySet , FLR , fts , flrg
[docs] class ConventionalFLRG ( flrg . FLRG ):
"""First Order Conventional Fuzzy Logical Relationship Group"""
-
def __init__ ( self , LHS , ** kwargs ):
+
def __init__ ( self , LHS , ** kwargs ):
super ( ConventionalFLRG , self ) . __init__ ( 1 , ** kwargs )
self . LHS = LHS
self . RHS = set ()
@@ -78,7 +66,7 @@
[docs] def append_rhs ( self , c , ** kwargs ):
self . RHS . add ( c )
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = str ( self . LHS ) + " -> "
tmp2 = ""
for c in sorted ( self . RHS , key = lambda s : s ):
@@ -90,7 +78,7 @@
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/cheng.html b/docs/build/html/_modules/pyFTS/models/cheng.html
index 3462e63..f684fb1 100644
--- a/docs/build/html/_modules/pyFTS/models/cheng.html
+++ b/docs/build/html/_modules/pyFTS/models/cheng.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.cheng — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.cheng — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.cheng
@@ -63,15 +51,15 @@
"""
import numpy as np
-
from pyFTS.common import FuzzySet , FLR , fts
-
from pyFTS.models import yu
+
from pyFTS.common import FuzzySet , FLR , fts
+
from pyFTS.models import yu
[docs] class TrendWeightedFLRG ( yu . WeightedFLRG ):
"""
First Order Trend Weighted Fuzzy Logical Relationship Group
"""
-
def __init__ ( self , LHS , ** kwargs ):
+
def __init__ ( self , LHS , ** kwargs ):
super ( TrendWeightedFLRG , self ) . __init__ ( LHS , ** kwargs )
self . w = None
@@ -102,7 +90,7 @@
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/ensemble/ensemble.html b/docs/build/html/_modules/pyFTS/models/ensemble/ensemble.html
index 0a424c9..18d2df6 100644
--- a/docs/build/html/_modules/pyFTS/models/ensemble/ensemble.html
+++ b/docs/build/html/_modules/pyFTS/models/ensemble/ensemble.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.ensemble.ensemble — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.ensemble.ensemble — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.ensemble.ensemble
@@ -66,12 +54,12 @@
import numpy as np
import pandas as pd
-
from pyFTS.common import SortedCollection , fts , tree
-
from pyFTS.models import chen , cheng , hofts , hwang , ismailefendi , sadaei , song , yu
-
from pyFTS.probabilistic import ProbabilityDistribution
-
from pyFTS.partitioners import Grid
+
from pyFTS.common import SortedCollection , fts , tree
+
from pyFTS.models import chen , cheng , hofts , hwang , ismailefendi , sadaei , song , yu
+
from pyFTS.probabilistic import ProbabilityDistribution
+
from pyFTS.partitioners import Grid
import scipy.stats as st
-
from itertools import product
+
from itertools import product
[docs] def sampler ( data , quantiles , bounds = False ):
@@ -88,7 +76,7 @@
"""
Ensemble FTS
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( EnsembleFTS , self ) . __init__ ( ** kwargs )
self . shortname = "EnsembleFTS"
self . name = "Ensemble FTS"
@@ -346,7 +334,7 @@
'''
An homogeneous FTS method ensemble with variations on partitionings and orders.
'''
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( SimpleEnsembleFTS , self ) . __init__ ( ** kwargs )
self . method = kwargs . get ( 'fts_method' , hofts . WeightedHighOrderFTS )
"""FTS method class that will be used on internal models"""
@@ -376,7 +364,7 @@
"""
Creates an EnsembleFTS with all point forecast methods, sharing the same partitioner
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( AllMethodEnsembleFTS , self ) . __init__ ( ** kwargs )
self . min_order = 3
self . shortname = "Ensemble FTS"
@@ -421,7 +409,7 @@
Quick search
@@ -440,14 +428,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.ensemble.ensemble
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/ensemble/multiseasonal.html b/docs/build/html/_modules/pyFTS/models/ensemble/multiseasonal.html
index f378cc9..579b915 100644
--- a/docs/build/html/_modules/pyFTS/models/ensemble/multiseasonal.html
+++ b/docs/build/html/_modules/pyFTS/models/ensemble/multiseasonal.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.ensemble.multiseasonal — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.ensemble.multiseasonal — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.ensemble.multiseasonal
@@ -61,12 +49,12 @@
"""
import numpy as np
-
from pyFTS.common import Util as cUtil
-
from pyFTS.models.ensemble import ensemble
-
from pyFTS.models.seasonal import cmsfts
-
from pyFTS.probabilistic import ProbabilityDistribution
-
from copy import deepcopy
-
from joblib import Parallel , delayed
+
from pyFTS.common import Util as cUtil
+
from pyFTS.models.ensemble import ensemble
+
from pyFTS.models.seasonal import cmsfts
+
from pyFTS.probabilistic import ProbabilityDistribution
+
from copy import deepcopy
+
from joblib import Parallel , delayed
import multiprocessing
@@ -87,7 +75,7 @@
[docs] class SeasonalEnsembleFTS ( ensemble . EnsembleFTS ):
-
def __init__ ( self , name , ** kwargs ):
+
def __init__ ( self , name , ** kwargs ):
super ( SeasonalEnsembleFTS , self ) . __init__ ( name = "Seasonal Ensemble FTS" , ** kwargs )
self . min_order = 1
self . indexers = []
@@ -160,7 +148,7 @@
Quick search
@@ -179,14 +167,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.ensemble.multiseasonal
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/hofts.html b/docs/build/html/_modules/pyFTS/models/hofts.html
index 3612789..4b599ae 100644
--- a/docs/build/html/_modules/pyFTS/models/hofts.html
+++ b/docs/build/html/_modules/pyFTS/models/hofts.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.hofts — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.hofts — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.hofts
@@ -63,13 +51,13 @@
"""
import numpy as np
-
from pyFTS.common import FuzzySet , FLR , fts , flrg
-
from itertools import product
+
from pyFTS.common import FuzzySet , FLR , fts , flrg
+
from itertools import product
[docs] class HighOrderFLRG ( flrg . FLRG ):
"""Conventional High Order Fuzzy Logical Relationship Group"""
-
def __init__ ( self , order , ** kwargs ):
+
def __init__ ( self , order , ** kwargs ):
super ( HighOrderFLRG , self ) . __init__ ( order , ** kwargs )
self . LHS = []
self . RHS = {}
@@ -86,7 +74,7 @@
else :
self . LHS . append ( c )
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = ""
for c in sorted ( self . RHS ):
if len ( tmp ) > 0 :
@@ -95,14 +83,14 @@
return self . get_key () + " -> " + tmp
-
def __len__ ( self ):
+
def __len__ ( self ):
return len ( self . RHS )
[docs] class WeightedHighOrderFLRG ( flrg . FLRG ):
"""Weighted High Order Fuzzy Logical Relationship Group"""
-
def __init__ ( self , order , ** kwargs ):
+
def __init__ ( self , order , ** kwargs ):
super ( WeightedHighOrderFLRG , self ) . __init__ ( order , ** kwargs )
self . LHS = []
self . RHS = {}
@@ -145,7 +133,7 @@
self . upper = up . dot ( self . weights ())
return self . upper
-
def __str__ ( self ):
+
def __str__ ( self ):
_str = ""
for k in self . RHS . keys ():
_str += ", " if len ( _str ) > 0 else ""
@@ -153,13 +141,13 @@
return self . get_key () + " -> " + _str
-
def __len__ ( self ):
+
def __len__ ( self ):
return len ( self . RHS )
[docs] class HighOrderFTS ( fts . FTS ):
"""Conventional High Order Fuzzy Time Series"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( HighOrderFTS , self ) . __init__ ( ** kwargs )
self . name = "High Order FTS"
self . shortname = "HOFTS"
@@ -223,7 +211,7 @@
sample = data [ k - self . max_lag : k ]
-
rhs = self . partitioner . fuzzyfy ( data [ k + _tmp_steps ], mode = "sets" , alpha_cut = self . alpha_cut )
+
rhs = self . partitioner . fuzzyfy ( data [ k + _tmp_steps ], mode = "sets" , alpha_cut = self . alpha_cut )
flrgs = self . generate_lhs_flrg ( sample )
@@ -238,12 +226,12 @@
[docs] def generate_flrg_fuzzyfied ( self , data ):
_tmp_steps = self . standard_horizon - 1
l = len ( data )
-
for k in np . arange ( self . max_lag , l ):
+
for k in np . arange ( self . max_lag , l - _tmp_steps ):
if self . dump : print ( "FLR: " + str ( k ))
sample = data [ k - self . max_lag : k ]
-
rhs = data [ k + _tmp_steps ]
+
rhs = data [ k + _tmp_steps ]
flrgs = self . generate_lhs_flrg_fuzzyfied ( sample )
@@ -326,7 +314,7 @@
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/hwang.html b/docs/build/html/_modules/pyFTS/models/hwang.html
index 89f079d..0a7b851 100644
--- a/docs/build/html/_modules/pyFTS/models/hwang.html
+++ b/docs/build/html/_modules/pyFTS/models/hwang.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.hwang — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.hwang — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.hwang
@@ -63,11 +51,11 @@
"""
import numpy as np
-
from pyFTS.common import FuzzySet , FLR , Transformations , fts
+
from pyFTS.common import FuzzySet , FLR , fts
[docs] class HighOrderFTS ( fts . FTS ):
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( HighOrderFTS , self ) . __init__ ( ** kwargs )
self . is_high_order = True
self . min_order = 2
@@ -84,7 +72,7 @@
[docs] def forecast ( self , ndata , ** kwargs ):
-
l = len ( self . sets )
+
l = len ( self . partitioner )
cn = np . array ([ 0.0 for k in range ( l )])
ow = np . array ([[ 0.0 for k in range ( l )] for z in range ( self . order - 1 )])
@@ -97,9 +85,9 @@
for ix in range ( l ):
s = self . partitioner . ordered_sets [ ix ]
-
cn [ ix ] = self . sets [ s ] . membership ( FuzzySet . grant_bounds ( ndata [ t ], self . sets , self . partitioner . ordered_sets ))
+
cn [ ix ] = self . partitioner . sets [ s ] . membership ( FuzzySet . grant_bounds ( ndata [ t ], self . partitioner . sets , self . partitioner . ordered_sets ))
for w in np . arange ( self . order - 1 ):
-
ow [ w , ix ] = self . sets [ s ] . membership ( FuzzySet . grant_bounds ( ndata [ t - w ], self . sets , self . partitioner . ordered_sets ))
+
ow [ w , ix ] = self . partitioner . sets [ s ] . membership ( FuzzySet . grant_bounds ( ndata [ t - w ], self . partitioner . sets , self . partitioner . ordered_sets ))
rn [ w , ix ] = ow [ w , ix ] * cn [ ix ]
ft [ ix ] = max ( ft [ ix ], rn [ w , ix ])
mft = max ( ft )
@@ -108,17 +96,13 @@
for ix in range ( l ):
s = self . partitioner . ordered_sets [ ix ]
if ft [ ix ] == mft :
-
out = out + self . sets [ s ] . centroid
+
out = out + self . partitioner . sets [ s ] . centroid
count += 1.0
ret . append ( out / count )
return ret
[docs] def train ( self , data , ** kwargs ):
-
-
if self . sets == None :
-
self . sets = self . partitioner . sets
-
self . configure_lags ( ** kwargs )
@@ -132,7 +116,7 @@
Quick search
@@ -151,14 +135,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.hwang
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/ifts.html b/docs/build/html/_modules/pyFTS/models/ifts.html
index 4b9e9b8..178c7f6 100644
--- a/docs/build/html/_modules/pyFTS/models/ifts.html
+++ b/docs/build/html/_modules/pyFTS/models/ifts.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.ifts — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.ifts — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.ifts
@@ -66,15 +54,15 @@
"""
import numpy as np
-
from pyFTS.common import FuzzySet , FLR , fts , tree
-
from pyFTS.models import hofts
+
from pyFTS.common import FuzzySet , FLR , fts , tree
+
from pyFTS.models import hofts
[docs] class IntervalFTS ( hofts . HighOrderFTS ):
"""
High Order Interval Fuzzy Time Series
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( IntervalFTS , self ) . __init__ ( ** kwargs )
self . shortname = "IFTS"
self . name = "Interval FTS"
@@ -160,7 +148,7 @@
"""
Weighted High Order Interval Fuzzy Time Series
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( WeightedIntervalFTS , self ) . __init__ ( ** kwargs )
self . shortname = "WIFTS"
self . name = "Weighted Interval FTS"
@@ -253,7 +241,7 @@
Quick search
@@ -272,14 +260,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.ifts
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/incremental/IncrementalEnsemble.html b/docs/build/html/_modules/pyFTS/models/incremental/IncrementalEnsemble.html
index c3e2664..56e0410 100644
--- a/docs/build/html/_modules/pyFTS/models/incremental/IncrementalEnsemble.html
+++ b/docs/build/html/_modules/pyFTS/models/incremental/IncrementalEnsemble.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.incremental.IncrementalEnsemble — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.incremental.IncrementalEnsemble — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.incremental.IncrementalEnsemble
@@ -62,17 +50,17 @@
import numpy as np
import pandas as pd
-
from pyFTS.common import FuzzySet , FLR , fts , flrg
-
from pyFTS.partitioners import Grid
-
from pyFTS.models import hofts
-
from pyFTS.models.ensemble import ensemble
+
from pyFTS.common import FuzzySet , FLR , fts , flrg
+
from pyFTS.partitioners import Grid
+
from pyFTS.models import hofts
+
from pyFTS.models.ensemble import ensemble
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/incremental/TimeVariant.html b/docs/build/html/_modules/pyFTS/models/incremental/TimeVariant.html
index 88a3cac..52cd59b 100644
--- a/docs/build/html/_modules/pyFTS/models/incremental/TimeVariant.html
+++ b/docs/build/html/_modules/pyFTS/models/incremental/TimeVariant.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.incremental.TimeVariant — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.incremental.TimeVariant — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.incremental.TimeVariant
@@ -61,8 +49,8 @@
"""
import numpy as np
-
from pyFTS.common import FuzzySet , FLR , fts , flrg
-
from pyFTS.partitioners import Grid
+
from pyFTS.common import FuzzySet , FLR , fts , flrg
+
from pyFTS.partitioners import Grid
[docs] class Retrainer ( fts . FTS ):
@@ -71,7 +59,7 @@
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'.
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( Retrainer , self ) . __init__ ( ** kwargs )
self . partitioner_method = kwargs . get ( 'partitioner_method' , Grid . GridPartitioner )
@@ -159,12 +147,12 @@
[docs] def offset ( self ):
return self . max_lag
-
def __str__ ( self ):
+
def __str__ ( self ):
"""String representation of the model"""
return str ( self . model )
-
def __len__ ( self ):
+
def __len__ ( self ):
"""
The length (number of rules) of the model
@@ -183,7 +171,7 @@
Quick search
@@ -202,14 +190,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.incremental.TimeVariant
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/ismailefendi.html b/docs/build/html/_modules/pyFTS/models/ismailefendi.html
index b59e220..9dbb840 100644
--- a/docs/build/html/_modules/pyFTS/models/ismailefendi.html
+++ b/docs/build/html/_modules/pyFTS/models/ismailefendi.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.ismailefendi — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.ismailefendi — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.ismailefendi
@@ -63,12 +51,12 @@
"""
import numpy as np
-
from pyFTS.common import FuzzySet , FLR , fts , flrg
+
from pyFTS.common import FuzzySet , FLR , fts , flrg
[docs] class ImprovedWeightedFLRG ( flrg . FLRG ):
"""First Order Improved Weighted Fuzzy Logical Relationship Group"""
-
def __init__ ( self , LHS , ** kwargs ):
+
def __init__ ( self , LHS , ** kwargs ):
super ( ImprovedWeightedFLRG , self ) . __init__ ( 1 , ** kwargs )
self . LHS = LHS
self . RHS = {}
@@ -90,7 +78,7 @@
self . w = np . array ([ self . rhs_counts [ c ] / self . count for c in self . RHS . keys ()])
return self . w
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = self . LHS + " -> "
tmp2 = ""
for c in sorted ( self . RHS . keys ()):
@@ -99,13 +87,13 @@
tmp2 = tmp2 + c + "(" + str ( round ( self . rhs_counts [ c ] / self . count , 3 )) + ")"
return tmp + tmp2
-
def __len__ ( self ):
+
def __len__ ( self ):
return len ( self . RHS )
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/multivariate/FLR.html b/docs/build/html/_modules/pyFTS/models/multivariate/FLR.html
index d225313..a6d4485 100644
--- a/docs/build/html/_modules/pyFTS/models/multivariate/FLR.html
+++ b/docs/build/html/_modules/pyFTS/models/multivariate/FLR.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.multivariate.FLR — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.multivariate.FLR — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.FLR
@@ -60,7 +48,7 @@
[docs] class FLR ( object ):
"""Multivariate Fuzzy Logical Relationship"""
-
def __init__ ( self ):
+
def __init__ ( self ):
"""
Creates a Fuzzy Logical Relationship
:param LHS: Left Hand Side fuzzy set
@@ -75,7 +63,7 @@
[docs] def set_rhs ( self , set ):
self . RHS = set
-
def __str__ ( self ):
+
def __str__ ( self ):
return " {} -> {} " . format ([ k for k in self . LHS . values ()], self . RHS )
@@ -92,7 +80,7 @@
Quick search
@@ -111,14 +99,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.FLR
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/multivariate/cmvfts.html b/docs/build/html/_modules/pyFTS/models/multivariate/cmvfts.html
index b09165c..5e2642d 100644
--- a/docs/build/html/_modules/pyFTS/models/multivariate/cmvfts.html
+++ b/docs/build/html/_modules/pyFTS/models/multivariate/cmvfts.html
@@ -5,31 +5,19 @@
-
- pyFTS.models.multivariate.cmvfts — pyFTS 1.6 documentation
-
-
+
+ pyFTS.models.multivariate.cmvfts — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.cmvfts
@@ -58,17 +46,17 @@
import numpy as np
import pandas as pd
-
from pyFTS.common import FuzzySet , FLR , fts , flrg
-
from pyFTS.models import hofts
-
from pyFTS.models.multivariate import mvfts , grid , common
-
from types import LambdaType
+
from pyFTS.common import FuzzySet , FLR , fts , flrg
+
from pyFTS.models import hofts
+
from pyFTS.models.multivariate import mvfts , grid , common
+
from types import LambdaType
[docs] class ClusteredMVFTS ( mvfts . MVFTS ):
"""
Meta model for high order, clustered multivariate FTS
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( ClusteredMVFTS , self ) . __init__ ( ** kwargs )
self . fts_method = kwargs . get ( 'fts_method' , hofts . WeightedHighOrderFTS )
@@ -260,11 +248,11 @@
return ret
-
def __str__ ( self ):
+
def __str__ ( self ):
"""String representation of the model"""
return str ( self . model )
-
def __len__ ( self ):
+
def __len__ ( self ):
"""
The length (number of rules) of the model
@@ -284,7 +272,7 @@
Quick search
@@ -303,14 +291,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.cmvfts
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/multivariate/common.html b/docs/build/html/_modules/pyFTS/models/multivariate/common.html
index b87d60f..477daf8 100644
--- a/docs/build/html/_modules/pyFTS/models/multivariate/common.html
+++ b/docs/build/html/_modules/pyFTS/models/multivariate/common.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.multivariate.common — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.multivariate.common — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.common
@@ -57,14 +45,14 @@
Source code for pyFTS.models.multivariate.common
import numpy as np
import pandas as pd
-from pyFTS.common import FuzzySet , Composite
+from pyFTS.common import FuzzySet , Composite
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/multivariate/flrg.html b/docs/build/html/_modules/pyFTS/models/multivariate/flrg.html
index 6aabf6c..5193938 100644
--- a/docs/build/html/_modules/pyFTS/models/multivariate/flrg.html
+++ b/docs/build/html/_modules/pyFTS/models/multivariate/flrg.html
@@ -5,31 +5,19 @@
-
- pyFTS.models.multivariate.flrg — pyFTS 1.6 documentation
-
-
+
+ pyFTS.models.multivariate.flrg — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.flrg
@@ -57,7 +45,7 @@
Source code for pyFTS.models.multivariate.flrg
import numpy as np
-from pyFTS.common import flrg as flg
+from pyFTS.common import flrg as flg
[docs] class FLRG ( flg . FLRG ):
@@ -65,7 +53,7 @@
Multivariate Fuzzy Logical Rule Group
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( FLRG , self ) . __init__ ( 0 , ** kwargs )
self . order = kwargs . get ( 'order' , 1 )
self . LHS = kwargs . get ( 'lhs' , {})
@@ -102,7 +90,7 @@
return self . upper
- def __str__ ( self ):
+ def __str__ ( self ):
_str = ""
for k in self . RHS :
_str += "," if len ( _str ) > 0 else ""
@@ -121,7 +109,7 @@
Quick search
@@ -140,14 +128,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.flrg
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/multivariate/granular.html b/docs/build/html/_modules/pyFTS/models/multivariate/granular.html
index 44bb5ac..78d7440 100644
--- a/docs/build/html/_modules/pyFTS/models/multivariate/granular.html
+++ b/docs/build/html/_modules/pyFTS/models/multivariate/granular.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.multivariate.granular — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.multivariate.granular — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.granular
@@ -55,8 +43,8 @@
Source code for pyFTS.models.multivariate.granular
-from pyFTS.models.multivariate import cmvfts , grid
-from pyFTS.models import hofts
+from pyFTS.models.multivariate import cmvfts , grid
+from pyFTS.models import hofts
[docs] class GranularWMVFTS ( cmvfts . ClusteredMVFTS ):
@@ -64,7 +52,7 @@
Granular multivariate weighted high order FTS
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( GranularWMVFTS , self ) . __init__ ( ** kwargs )
self . fts_method = kwargs . get ( 'fts_method' , hofts . WeightedHighOrderFTS )
@@ -95,7 +83,7 @@
Quick search
@@ -114,14 +102,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.granular
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/multivariate/grid.html b/docs/build/html/_modules/pyFTS/models/multivariate/grid.html
index 748f7a7..66b158b 100644
--- a/docs/build/html/_modules/pyFTS/models/multivariate/grid.html
+++ b/docs/build/html/_modules/pyFTS/models/multivariate/grid.html
@@ -5,31 +5,19 @@
-
- pyFTS.models.multivariate.grid — pyFTS 1.6 documentation
-
-
+
+ pyFTS.models.multivariate.grid — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.grid
@@ -55,10 +43,10 @@
Source code for pyFTS.models.multivariate.grid
-from pyFTS.models.multivariate import partitioner
-from pyFTS.models.multivariate.common import MultivariateFuzzySet , fuzzyfy_instance_clustered
-from itertools import product
-from scipy.spatial import KDTree
+from pyFTS.models.multivariate import partitioner
+from pyFTS.models.multivariate.common import MultivariateFuzzySet , fuzzyfy_instance_clustered
+from itertools import product
+from scipy.spatial import KDTree
import numpy as np
import pandas as pd
@@ -68,7 +56,7 @@
A cartesian product of all fuzzy sets of all variables
"""
- def __init__ ( self , ** kwargs ):
+ def __init__ ( self , ** kwargs ):
super ( GridCluster , self ) . __init__ ( ** kwargs )
self . name = "GridCluster"
self . build ( None )
@@ -123,7 +111,7 @@
multivariate fuzzy set base.
"""
- def __init__ ( self , ** kwargs ):
+ def __init__ ( self , ** kwargs ):
super ( IncrementalGridCluster , self ) . __init__ ( ** kwargs )
self . name = "IncrementalGridCluster"
self . build ( None )
@@ -205,7 +193,7 @@
Quick search
@@ -224,14 +212,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.grid
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/multivariate/mvfts.html b/docs/build/html/_modules/pyFTS/models/multivariate/mvfts.html
index 2eaec27..71388b7 100644
--- a/docs/build/html/_modules/pyFTS/models/multivariate/mvfts.html
+++ b/docs/build/html/_modules/pyFTS/models/multivariate/mvfts.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.multivariate.mvfts — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.multivariate.mvfts — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.mvfts
@@ -55,12 +43,12 @@
Source code for pyFTS.models.multivariate.mvfts
-from pyFTS.common import fts , FuzzySet , FLR , Membership
-from pyFTS.partitioners import Grid
-from pyFTS.models.multivariate import FLR as MVFLR , common , flrg as mvflrg
-from itertools import product
-from types import LambdaType
-from copy import deepcopy
+from pyFTS.common import fts , FuzzySet , FLR , Membership
+from pyFTS.partitioners import Grid
+from pyFTS.models.multivariate import FLR as MVFLR , common , flrg as mvflrg
+from itertools import product
+from types import LambdaType
+from copy import deepcopy
import numpy as np
import pandas as pd
@@ -82,7 +70,7 @@
"""
Multivariate extension of Chen's ConventionalFTS method
"""
- def __init__ ( self , ** kwargs ):
+ def __init__ ( self , ** kwargs ):
super ( MVFTS , self ) . __init__ ( ** kwargs )
self . explanatory_variables = kwargs . get ( 'explanatory_variables' ,[])
self . target_variable = kwargs . get ( 'target_variable' , None )
@@ -375,7 +363,7 @@
self . explanatory_variables = model . explanatory_variables
self . target_variable = model . target_variable
-
def __str__ ( self ):
+
def __str__ ( self ):
_str = self . name + ": \n "
for k in self . flrgs . keys ():
_str += str ( self . flrgs [ k ]) + " \n "
@@ -395,7 +383,7 @@
Quick search
@@ -414,14 +402,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.mvfts
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/multivariate/partitioner.html b/docs/build/html/_modules/pyFTS/models/multivariate/partitioner.html
index ccf1e8a..c40e157 100644
--- a/docs/build/html/_modules/pyFTS/models/multivariate/partitioner.html
+++ b/docs/build/html/_modules/pyFTS/models/multivariate/partitioner.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.multivariate.partitioner — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.multivariate.partitioner — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.partitioner
@@ -55,10 +43,10 @@
Source code for pyFTS.models.multivariate.partitioner
-from pyFTS.partitioners import partitioner
-from pyFTS.models.multivariate.common import MultivariateFuzzySet , fuzzyfy_instance_clustered
-from itertools import product
-from scipy.spatial import KDTree
+from pyFTS.partitioners import partitioner
+from pyFTS.models.multivariate.common import MultivariateFuzzySet , fuzzyfy_instance_clustered
+from itertools import product
+from scipy.spatial import KDTree
import numpy as np
import pandas as pd
@@ -68,7 +56,7 @@
Base class for partitioners which use the MultivariateFuzzySet
"""
- def __init__ ( self , ** kwargs ):
+ def __init__ ( self , ** kwargs ):
super ( MultivariatePartitioner , self ) . __init__ ( name = "MultivariatePartitioner" , preprocess = False , ** kwargs )
self . type = 'multivariate'
@@ -187,7 +175,7 @@
Quick search
@@ -206,14 +194,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.partitioner
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/multivariate/variable.html b/docs/build/html/_modules/pyFTS/models/multivariate/variable.html
index bcc1afb..2b7b99d 100644
--- a/docs/build/html/_modules/pyFTS/models/multivariate/variable.html
+++ b/docs/build/html/_modules/pyFTS/models/multivariate/variable.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.multivariate.variable — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.multivariate.variable — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.variable
@@ -56,9 +44,9 @@
Source code for pyFTS.models.multivariate.variable
import pandas as pd
-from pyFTS.common import fts , FuzzySet , FLR , Membership , tree
-from pyFTS.partitioners import Grid
-from pyFTS.models.multivariate import FLR as MVFLR
+from pyFTS.common import fts , FuzzySet , FLR , Membership , tree
+from pyFTS.partitioners import Grid
+from pyFTS.models.multivariate import FLR as MVFLR
[docs] class Variable :
@@ -66,7 +54,7 @@
A variable of a fuzzy time series multivariate model. Each variable contains its own
transformations and partitioners.
"""
-
def __init__ ( self , name , ** kwargs ):
+
def __init__ ( self , name , ** kwargs ):
"""
:param name:
@@ -104,11 +92,11 @@
:param kwargs:
:return:
"""
-
fs = kwargs . get ( 'partitioner' , Grid . GridPartitioner )
-
mf = kwargs . get ( 'func' , Membership . trimf )
-
np = kwargs . get ( 'npart' , 10 )
+
fs = kwargs . pop ( 'partitioner' , Grid . GridPartitioner )
+
mf = kwargs . pop ( 'func' , Membership . trimf )
+
np = kwargs . pop ( 'npart' , 10 )
data = kwargs . get ( 'data' , None )
-
kw = kwargs . get ( 'partitioner_specific' , {})
+
kw = kwargs . pop ( 'partitioner_specific' , {})
self . partitioner = fs ( data = data [ self . data_label ] . values , npart = np , func = mf ,
transformation = self . transformation , prefix = self . alias ,
variable = self . name , ** kw )
@@ -135,7 +123,7 @@
return data
- def __str__ ( self ):
+ def __str__ ( self ):
return self . name
@@ -149,7 +137,7 @@
Quick search
@@ -168,14 +156,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.variable
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/multivariate/wmvfts.html b/docs/build/html/_modules/pyFTS/models/multivariate/wmvfts.html
index 6d528a1..7f15c60 100644
--- a/docs/build/html/_modules/pyFTS/models/multivariate/wmvfts.html
+++ b/docs/build/html/_modules/pyFTS/models/multivariate/wmvfts.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.multivariate.wmvfts — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.multivariate.wmvfts — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.wmvfts
@@ -55,9 +43,9 @@
Source code for pyFTS.models.multivariate.wmvfts
-from pyFTS.common import fts , FuzzySet , FLR , Membership , tree
-from pyFTS.partitioners import Grid
-from pyFTS.models.multivariate import mvfts , FLR as MVFLR , common , flrg as mvflrg
+from pyFTS.common import fts , FuzzySet , FLR , Membership , tree
+from pyFTS.partitioners import Grid
+from pyFTS.models.multivariate import mvfts , FLR as MVFLR , common , flrg as mvflrg
import numpy as np
import pandas as pd
@@ -68,7 +56,7 @@
Weighted Multivariate Fuzzy Logical Rule Group
"""
- def __init__ ( self , ** kwargs ):
+ def __init__ ( self , ** kwargs ):
super ( WeightedFLRG , self ) . __init__ ( ** kwargs )
self . order = kwargs . get ( 'order' , 1 )
self . LHS = kwargs . get ( 'lhs' , {})
@@ -108,7 +96,7 @@
self . upper = up . dot ( self . weights ())
return self . upper
-
def __str__ ( self ):
+
def __str__ ( self ):
_str = ""
for k in self . RHS . keys ():
_str += ", " if len ( _str ) > 0 else ""
@@ -121,7 +109,7 @@
"""
Weighted Multivariate FTS
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( WeightedMVFTS , self ) . __init__ ( order = 1 , ** kwargs )
self . shortname = "WeightedMVFTS"
self . name = "Weighted Multivariate FTS"
@@ -146,7 +134,7 @@
Quick search
@@ -165,14 +153,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.multivariate.wmvfts
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/nonstationary/common.html b/docs/build/html/_modules/pyFTS/models/nonstationary/common.html
index 9e707d9..5e8e912 100644
--- a/docs/build/html/_modules/pyFTS/models/nonstationary/common.html
+++ b/docs/build/html/_modules/pyFTS/models/nonstationary/common.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.nonstationary.common — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.nonstationary.common — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.common
@@ -63,10 +51,10 @@
"""
import numpy as np
-
from pyFTS import *
-
from pyFTS.common import FuzzySet as FS , Membership , FLR
-
from pyFTS.partitioners import partitioner
-
from pyFTS.models.nonstationary import perturbation
+
from pyFTS import *
+
from pyFTS.common import FuzzySet as FS , Membership , FLR
+
from pyFTS.partitioners import partitioner
+
from pyFTS.models.nonstationary import perturbation
[docs] class FuzzySet ( FS . FuzzySet ):
@@ -74,7 +62,7 @@
Non Stationary Fuzzy Sets
"""
-
def __init__ ( self , name , mf , parameters , ** kwargs ):
+
def __init__ ( self , name , mf , parameters , ** kwargs ):
"""
Constructor
"""
@@ -229,7 +217,7 @@
else :
return param
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = ""
if self . location is not None :
tmp += "Location: "
@@ -309,7 +297,7 @@
Quick search
@@ -328,14 +316,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.common
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/nonstationary/cvfts.html b/docs/build/html/_modules/pyFTS/models/nonstationary/cvfts.html
index 29c3f72..6f9e09a 100644
--- a/docs/build/html/_modules/pyFTS/models/nonstationary/cvfts.html
+++ b/docs/build/html/_modules/pyFTS/models/nonstationary/cvfts.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.nonstationary.cvfts — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.nonstationary.cvfts — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.cvfts
@@ -56,14 +44,14 @@
Source code for pyFTS.models.nonstationary.cvfts
import numpy as np
-from pyFTS.models import hofts
-from pyFTS.models.nonstationary import common , nsfts
-from pyFTS.common import FLR , flrg , tree
+from pyFTS.models import hofts
+from pyFTS.models.nonstationary import common , nsfts
+from pyFTS.common import FLR , flrg , tree
[docs] class HighOrderNonstationaryFLRG ( hofts . HighOrderFTS ):
"""Conventional High Order Fuzzy Logical Relationship Group"""
-
def __init__ ( self , order , ** kwargs ):
+
def __init__ ( self , order , ** kwargs ):
super ( HighOrderNonstationaryFLRG , self ) . __init__ ( order , ** kwargs )
self . LHS = []
self . RHS = {}
@@ -76,7 +64,7 @@
[docs] def append_lhs ( self , c ):
self . LHS . append ( c )
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = ""
for c in sorted ( self . RHS ):
if len ( tmp ) > 0 :
@@ -85,12 +73,12 @@
return self . get_key () + " -> " + tmp
-
def __len__ ( self ):
+
def __len__ ( self ):
return len ( self . RHS )
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/nonstationary/flrg.html b/docs/build/html/_modules/pyFTS/models/nonstationary/flrg.html
index 31f3dde..b145db6 100644
--- a/docs/build/html/_modules/pyFTS/models/nonstationary/flrg.html
+++ b/docs/build/html/_modules/pyFTS/models/nonstationary/flrg.html
@@ -5,31 +5,19 @@
-
- pyFTS.models.nonstationary.flrg — pyFTS 1.6 documentation
-
-
+
+ pyFTS.models.nonstationary.flrg — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.flrg
@@ -56,8 +44,8 @@
Source code for pyFTS.models.nonstationary.flrg
-from pyFTS.common import flrg
-from pyFTS.models.nonstationary import common
+from pyFTS.common import flrg
+from pyFTS.models.nonstationary import common
import numpy as np
@@ -75,7 +63,7 @@
return ( sets , t , w )
-
def __init__ ( self , LHS , ** kwargs ):
+
def __init__ ( self , LHS , ** kwargs ):
super ( NonStationaryFLRG , self ) . __init__ ( 1 , ** kwargs )
self . LHS = LHS
self . RHS = set ()
@@ -140,7 +128,7 @@
Quick search
@@ -159,14 +147,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.flrg
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/nonstationary/honsfts.html b/docs/build/html/_modules/pyFTS/models/nonstationary/honsfts.html
index a07c2d8..45d9306 100644
--- a/docs/build/html/_modules/pyFTS/models/nonstationary/honsfts.html
+++ b/docs/build/html/_modules/pyFTS/models/nonstationary/honsfts.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.nonstationary.honsfts — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.nonstationary.honsfts — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.honsfts
@@ -56,15 +44,15 @@
Source code for pyFTS.models.nonstationary.honsfts
import numpy as np
-from pyFTS.common import FuzzySet , FLR , fts
-from pyFTS.models import hofts
-from pyFTS.models.nonstationary import common , flrg , nsfts
-from itertools import product
+from pyFTS.common import FuzzySet , FLR , fts
+from pyFTS.models import hofts
+from pyFTS.models.nonstationary import common , flrg , nsfts
+from itertools import product
[docs] class HighOrderNonStationaryFLRG ( flrg . NonStationaryFLRG ):
"""First Order NonStationary Fuzzy Logical Relationship Group"""
-
def __init__ ( self , order , ** kwargs ):
+
def __init__ ( self , order , ** kwargs ):
super ( HighOrderNonStationaryFLRG , self ) . __init__ ( order , ** kwargs )
self . LHS = []
self . RHS = {}
@@ -103,7 +91,7 @@
upper = up . dot ( self . weights ())
return upper
- def __str__ ( self ):
+ def __str__ ( self ):
_str = ""
for k in self . RHS . keys ():
_str += ", " if len ( _str ) > 0 else ""
@@ -111,13 +99,13 @@
return self . get_key () + " -> " + _str
- def __len__ ( self ):
+ def __len__ ( self ):
return len ( self . RHS )
[docs] class HighOrderNonStationaryFTS ( nsfts . NonStationaryFTS ):
"""NonStationaryFTS Fuzzy Time Series"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( HighOrderNonStationaryFTS , self ) . __init__ ( ** kwargs )
self . name = "High Order Non Stationary FTS"
self . shortname = "HONSFTS"
@@ -308,7 +296,7 @@
return ret
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = self . name + ": \n "
for r in self . flrgs :
tmp = " {0}{1} \n " . format ( tmp , str ( self . flrgs [ r ]))
@@ -325,7 +313,7 @@
Quick search
@@ -344,14 +332,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.honsfts
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/nonstationary/nsfts.html b/docs/build/html/_modules/pyFTS/models/nonstationary/nsfts.html
index a09da74..3befff3 100644
--- a/docs/build/html/_modules/pyFTS/models/nonstationary/nsfts.html
+++ b/docs/build/html/_modules/pyFTS/models/nonstationary/nsfts.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.nonstationary.nsfts — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.nonstationary.nsfts — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.nsfts
@@ -56,14 +44,14 @@
Source code for pyFTS.models.nonstationary.nsfts
import numpy as np
-from pyFTS.common import FLR , fts
-from pyFTS.models.nonstationary import common , flrg
+from pyFTS.common import FLR , fts
+from pyFTS.models.nonstationary import common , flrg
[docs] class ConventionalNonStationaryFLRG ( flrg . NonStationaryFLRG ):
"""First Order NonStationary Fuzzy Logical Relationship Group"""
-
def __init__ ( self , LHS , ** kwargs ):
+
def __init__ ( self , LHS , ** kwargs ):
super ( ConventionalNonStationaryFLRG , self ) . __init__ ( 1 , ** kwargs )
self . LHS = LHS
self . RHS = set ()
@@ -74,7 +62,7 @@
[docs] def append_rhs ( self , c , ** kwargs ):
self . RHS . add ( c )
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = self . LHS + " -> "
tmp2 = ""
for c in sorted ( self . RHS ):
@@ -87,7 +75,7 @@
[docs] class WeightedNonStationaryFLRG ( flrg . NonStationaryFLRG ):
"""First Order NonStationary Fuzzy Logical Relationship Group"""
-
def __init__ ( self , LHS , ** kwargs ):
+
def __init__ ( self , LHS , ** kwargs ):
super ( WeightedNonStationaryFLRG , self ) . __init__ ( 1 , ** kwargs )
self . LHS = LHS
self . RHS = {}
@@ -115,7 +103,7 @@
midpoint = mp . dot ( self . weights ())
return midpoint
-
def __str__ ( self ):
+
def __str__ ( self ):
_str = ""
for k in self . RHS . keys ():
_str += ", " if len ( _str ) > 0 else ""
@@ -126,7 +114,7 @@
[docs] class NonStationaryFTS ( fts . FTS ):
"""NonStationaryFTS Fuzzy Time Series"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( NonStationaryFTS , self ) . __init__ ( ** kwargs )
self . name = "Non Stationary FTS"
self . shortname = "NSFTS"
@@ -367,7 +355,7 @@
return ret
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = self . name + ": \n "
for r in self . flrgs :
tmp = " {0}{1} \n " . format ( tmp , str ( self . flrgs [ r ]))
@@ -376,7 +364,7 @@
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/nonstationary/partitioners.html b/docs/build/html/_modules/pyFTS/models/nonstationary/partitioners.html
index 5cb7d66..18008e3 100644
--- a/docs/build/html/_modules/pyFTS/models/nonstationary/partitioners.html
+++ b/docs/build/html/_modules/pyFTS/models/nonstationary/partitioners.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.nonstationary.partitioners — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.nonstationary.partitioners — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.partitioners
@@ -56,9 +44,9 @@
Source code for pyFTS.models.nonstationary.partitioners
import numpy as np
-from pyFTS.partitioners import partitioner
-from pyFTS.models.nonstationary import common , perturbation
-from pyFTS.common import FuzzySet as stationary_fs
+from pyFTS.partitioners import partitioner
+from pyFTS.models.nonstationary import common , perturbation
+from pyFTS.common import FuzzySet as stationary_fs
[docs] class PolynomialNonStationaryPartitioner ( partitioner . Partitioner ):
@@ -66,7 +54,7 @@
Non Stationary Universe of Discourse Partitioner
"""
-
def __init__ ( self , data , part , ** kwargs ):
+
def __init__ ( self , data , part , ** kwargs ):
""""""
super ( PolynomialNonStationaryPartitioner , self ) . __init__ ( name = part . name , data = data , npart = part . partitions ,
func = part . membership_function , names = part . setnames ,
@@ -171,7 +159,7 @@
Non Stationary Universe of Discourse Partitioner
"""
-
def __init__ ( self , data , part , ** kwargs ):
+
def __init__ ( self , data , part , ** kwargs ):
""""""
super ( SimpleNonStationaryPartitioner , self ) . __init__ ( name = part . name , data = data , npart = part . partitions ,
func = part . membership_function , names = part . setnames ,
@@ -193,8 +181,8 @@
[docs] def simplenonstationary_gridpartitioner_builder ( data , npart , transformation ):
-
from pyFTS.partitioners import Grid
-
from pyFTS.models.nonstationary import perturbation , partitioners
+
from pyFTS.partitioners import Grid
+
from pyFTS.models.nonstationary import perturbation , partitioners
tmp_fs = Grid . GridPartitioner ( data = data , npart = npart , transformation = transformation )
fs = partitioners . SimpleNonStationaryPartitioner ( data , tmp_fs ,
@@ -217,7 +205,7 @@
Quick search
@@ -236,14 +224,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.partitioners
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/nonstationary/perturbation.html b/docs/build/html/_modules/pyFTS/models/nonstationary/perturbation.html
index 4f71aaf..7a81bec 100644
--- a/docs/build/html/_modules/pyFTS/models/nonstationary/perturbation.html
+++ b/docs/build/html/_modules/pyFTS/models/nonstationary/perturbation.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.nonstationary.perturbation — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.nonstationary.perturbation — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.perturbation
@@ -60,8 +48,8 @@
"""
import numpy as np
-
from pyFTS import *
-
from pyFTS.common import FuzzySet , Membership
+
from pyFTS import *
+
from pyFTS.common import FuzzySet , Membership
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/nonstationary/util.html b/docs/build/html/_modules/pyFTS/models/nonstationary/util.html
index 873cbe3..2e88677 100644
--- a/docs/build/html/_modules/pyFTS/models/nonstationary/util.html
+++ b/docs/build/html/_modules/pyFTS/models/nonstationary/util.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.nonstationary.util — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.nonstationary.util — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.util
@@ -60,7 +48,7 @@
import matplotlib as plt
import matplotlib.colors as pltcolors
import matplotlib.pyplot as plt
-
from pyFTS.common import Membership , Util
+
from pyFTS.common import Membership , Util
[docs] def plot_sets ( partitioner , start = 0 , end = 10 , step = 1 , tam = [ 5 , 5 ], colors = None ,
@@ -162,7 +150,7 @@
Quick search
@@ -181,14 +169,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.nonstationary.util
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/pwfts.html b/docs/build/html/_modules/pyFTS/models/pwfts.html
index f4772b9..f5776d0 100644
--- a/docs/build/html/_modules/pyFTS/models/pwfts.html
+++ b/docs/build/html/_modules/pyFTS/models/pwfts.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.pwfts — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.pwfts — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.pwfts
@@ -61,16 +49,16 @@
import numpy as np
import pandas as pd
import math
-
from operator import itemgetter
-
from pyFTS.common import FLR , FuzzySet
-
from pyFTS.models import hofts , ifts
-
from pyFTS.probabilistic import ProbabilityDistribution
-
from itertools import product
+
from operator import itemgetter
+
from pyFTS.common import FLR , FuzzySet
+
from pyFTS.models import hofts , ifts
+
from pyFTS.probabilistic import ProbabilityDistribution
+
from itertools import product
[docs] class ProbabilisticWeightedFLRG ( hofts . HighOrderFLRG ):
"""High Order Probabilistic Weighted Fuzzy Logical Relationship Group"""
-
def __init__ ( self , order ):
+
def __init__ ( self , order ):
super ( ProbabilisticWeightedFLRG , self ) . __init__ ( order )
self . RHS = {}
self . frequency_count = 0.0
@@ -149,7 +137,7 @@
return self . lower
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp2 = ""
for c in sorted ( self . RHS . keys ()):
if len ( tmp2 ) > 0 :
@@ -160,7 +148,7 @@
[docs] class ProbabilisticWeightedFTS ( ifts . IntervalFTS ):
"""High Order Probabilistic Weighted Fuzzy Time Series"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( ProbabilisticWeightedFTS , self ) . __init__ ( ** kwargs )
self . shortname = "PWFTS"
self . name = "Probabilistic FTS"
@@ -194,8 +182,9 @@
self . generate_flrg_fuzzyfied ( fuzz )
[docs] def generate_flrg_fuzzyfied ( self , data ):
+
_tmp_steps = self . standard_horizon - 1
l = len ( data )
-
for k in np . arange ( self . max_lag , l ):
+
for k in np . arange ( self . max_lag , l - _tmp_steps ):
sample = data [ k - self . max_lag : k ]
set_sample = []
for instance in sample :
@@ -211,8 +200,8 @@
lhs_mv = self . pwflrg_lhs_memberhip_fuzzyfied ( flrg , sample )
mvs = []
-
inst = data [ k ]
-
for set , mv in inst :
+
rhs = data [ k + _tmp_steps ]
+
for set , mv in rhs :
self . flrgs [ flrg . get_key ()] . append_rhs ( set , count = lhs_mv * mv )
mvs . append ( mv )
@@ -260,8 +249,9 @@
return flrgs
[docs] def generate_flrg ( self , data ):
+
_tmp_steps = self . standard_horizon - 1
l = len ( data )
-
for k in np . arange ( self . max_lag , l ):
+
for k in np . arange ( self . max_lag , l - _tmp_steps ):
if self . dump : print ( "FLR: " + str ( k ))
sample = data [ k - self . max_lag : k ]
@@ -275,7 +265,7 @@
if flrg . get_key () not in self . flrgs :
self . flrgs [ flrg . get_key ()] = flrg ;
-
fuzzyfied = self . partitioner . fuzzyfy ( data [ k ], mode = 'both' , method = 'fuzzy' ,
+
fuzzyfied = self . partitioner . fuzzyfy ( data [ k + _tmp_steps ], mode = 'both' , method = 'fuzzy' ,
alpha_cut = self . alpha_cut )
mvs = []
@@ -708,7 +698,7 @@
return dist
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = self . name + ": \n "
for r in sorted ( self . flrgs . keys ()):
p = round ( self . flrgs [ r ] . frequency_count / self . global_frequency_count , 3 )
@@ -716,22 +706,29 @@
return tmp
-[docs] def visualize_distributions ( model , ** kwargs ):
-
import matplotlib.pyplot as plt
-
from matplotlib import gridspec
-
import seaborn as sns
-
+
[docs] def highorder_fuzzy_markov_chain ( model ):
ordered_sets = model . partitioner . ordered_sets
+
ftpg_keys = sorted ( model . flrgs . keys (), key = lambda x : model . flrgs [ x ] . get_midpoint ( model . sets ))
-
-
lhs_probs = [ model . flrg_lhs_unconditional_probability ( model . flrgs [ k ])
-
for k in ftpg_keys ]
+
+
lhs_probs = np . array ([ model . flrg_lhs_unconditional_probability ( model . flrgs [ k ])
+
for k in ftpg_keys ])
mat = np . zeros (( len ( ftpg_keys ), len ( ordered_sets )))
for row , w in enumerate ( ftpg_keys ):
for col , k in enumerate ( ordered_sets ):
if k in model . flrgs [ w ] . RHS :
mat [ row , col ] = model . flrgs [ w ] . rhs_unconditional_probability ( k )
+
+
return ftpg_keys , ordered_sets , lhs_probs , mat
+
+
+
[docs] def visualize_distributions ( model , ** kwargs ):
+
import matplotlib.pyplot as plt
+
from matplotlib import gridspec
+
import seaborn as sns
+
+
ftpg_keys , ordered_sets , lhs_probs , mat = highorder_fuzzy_markov_chain ( model )
size = kwargs . get ( 'size' , ( 5 , 10 ))
@@ -750,6 +747,8 @@
ax . set_xticklabels ( ordered_sets )
ax . grid ( True )
ax . xaxis . set_tick_params ( rotation = 90 )
+
+
@@ -762,7 +761,7 @@
Quick search
@@ -781,14 +780,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.pwfts
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/sadaei.html b/docs/build/html/_modules/pyFTS/models/sadaei.html
index 29210a1..a5653ec 100644
--- a/docs/build/html/_modules/pyFTS/models/sadaei.html
+++ b/docs/build/html/_modules/pyFTS/models/sadaei.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.sadaei — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.sadaei — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.sadaei
@@ -63,14 +51,14 @@
"""
import numpy as np
-
from pyFTS.common import FuzzySet , FLR , fts , flrg
+
from pyFTS.common import FuzzySet , FLR , fts , flrg
default_c = 1.1
[docs] class ExponentialyWeightedFLRG ( flrg . FLRG ):
"""First Order Exponentialy Weighted Fuzzy Logical Relationship Group"""
-
def __init__ ( self , LHS , ** kwargs ):
+
def __init__ ( self , LHS , ** kwargs ):
super ( ExponentialyWeightedFLRG , self ) . __init__ ( 1 , ** kwargs )
self . LHS = LHS
self . RHS = []
@@ -90,7 +78,7 @@
self . w = np . array ([ k / tot for k in wei ])
return self . w
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = self . LHS + " -> "
tmp2 = ""
cc = 0
@@ -103,13 +91,13 @@
cc = cc + 1
return tmp + tmp2
-
def __len__ ( self ):
+
def __len__ ( self ):
return len ( self . RHS )
[docs] class ExponentialyWeightedFTS ( fts . FTS ):
"""First Order Exponentialy Weighted Fuzzy Time Series"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( ExponentialyWeightedFTS , self ) . __init__ ( order = 1 , name = "EWFTS" , ** kwargs )
self . name = "Exponentialy Weighted FTS"
self . detail = "Sadaei"
@@ -183,7 +171,7 @@
Quick search
@@ -202,14 +190,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.sadaei
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/seasonal/SeasonalIndexer.html b/docs/build/html/_modules/pyFTS/models/seasonal/SeasonalIndexer.html
index f1b8e21..0aaa3d8 100644
--- a/docs/build/html/_modules/pyFTS/models/seasonal/SeasonalIndexer.html
+++ b/docs/build/html/_modules/pyFTS/models/seasonal/SeasonalIndexer.html
@@ -5,31 +5,19 @@
-
- pyFTS.models.seasonal.SeasonalIndexer — pyFTS 1.6 documentation
-
-
+
+ pyFTS.models.seasonal.SeasonalIndexer — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.seasonal.SeasonalIndexer
@@ -57,14 +45,14 @@
Source code for pyFTS.models.seasonal.SeasonalIndexer
import numpy as np
import pandas as pd
-from pyFTS.models.seasonal import common
+from pyFTS.models.seasonal import common
[docs] class SeasonalIndexer ( object ):
"""
Seasonal Indexer. Responsible to find the seasonal index of a data point inside its data set
"""
-
def __init__ ( self , num_seasons , ** kwargs ):
+
def __init__ ( self , num_seasons , ** kwargs ):
self . num_seasons = num_seasons
self . name = kwargs . get ( "name" , "" )
@@ -89,7 +77,7 @@
[docs] class LinearSeasonalIndexer ( SeasonalIndexer ):
"""Use the data array/list position to index the seasonality """
-
def __init__ ( self , seasons , units , ignore = None , ** kwargs ):
+
def __init__ ( self , seasons , units , ignore = None , ** kwargs ):
"""
Indexer for array/list position
:param seasons: A list with the season group (i.e: 7 for week, 30 for month, etc)
@@ -147,7 +135,7 @@
[docs] class DataFrameSeasonalIndexer ( SeasonalIndexer ):
"""Use the Pandas.DataFrame index position to index the seasonality """
-
def __init__ ( self , index_fields , index_seasons , data_field , ** kwargs ):
+
def __init__ ( self , index_fields , index_seasons , data_field , ** kwargs ):
"""
:param index_fields: DataFrame field to use as index
@@ -199,7 +187,7 @@
[docs] class DateTimeSeasonalIndexer ( SeasonalIndexer ):
"""Use a Pandas.DataFrame date field to index the seasonality """
-
def __init__ ( self , date_field , index_fields , index_seasons , data_field , ** kwargs ):
+
def __init__ ( self , date_field , index_fields , index_seasons , data_field , ** kwargs ):
"""
:param date_field: DataFrame field that contains the datetime field used on index
@@ -269,7 +257,7 @@
Quick search
@@ -288,14 +276,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.seasonal.SeasonalIndexer
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/seasonal/cmsfts.html b/docs/build/html/_modules/pyFTS/models/seasonal/cmsfts.html
index e03a8e8..c9037ed 100644
--- a/docs/build/html/_modules/pyFTS/models/seasonal/cmsfts.html
+++ b/docs/build/html/_modules/pyFTS/models/seasonal/cmsfts.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.seasonal.cmsfts — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.seasonal.cmsfts — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.seasonal.cmsfts
@@ -56,16 +44,16 @@
Source code for pyFTS.models.seasonal.cmsfts
import numpy as np
-from pyFTS.common import FuzzySet , FLR
-from pyFTS.models.seasonal import sfts
-from pyFTS.models import chen
+from pyFTS.common import FuzzySet , FLR
+from pyFTS.models.seasonal import sfts
+from pyFTS.models import chen
[docs] class ContextualSeasonalFLRG ( sfts . SeasonalFLRG ):
"""
Contextual Seasonal Fuzzy Logical Relationship Group
"""
-
def __init__ ( self , seasonality ):
+
def __init__ ( self , seasonality ):
super ( ContextualSeasonalFLRG , self ) . __init__ ( seasonality )
self . RHS = {}
@@ -76,7 +64,7 @@
self . RHS [ flr . LHS ] = chen . ConventionalFLRG ( flr . LHS )
self . RHS [ flr . LHS ] . append_rhs ( flr . RHS )
- def __str__ ( self ):
+ def __str__ ( self ):
tmp = str ( self . LHS ) + ": \n "
tmp2 = " \t "
for r in sorted ( self . RHS ):
@@ -88,7 +76,7 @@
"""
Contextual Multi-Seasonal Fuzzy Time Series
"""
- def __init__ ( self , ** kwargs ):
+ def __init__ ( self , ** kwargs ):
super ( ContextualMultiSeasonalFTS , self ) . __init__ ( ** kwargs )
self . name = "Contextual Multi Seasonal FTS"
self . shortname = "CMSFTS "
@@ -177,7 +165,7 @@
Quick search
@@ -196,14 +184,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.seasonal.cmsfts
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/seasonal/common.html b/docs/build/html/_modules/pyFTS/models/seasonal/common.html
index 58575bb..ef0ad88 100644
--- a/docs/build/html/_modules/pyFTS/models/seasonal/common.html
+++ b/docs/build/html/_modules/pyFTS/models/seasonal/common.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.seasonal.common — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.seasonal.common — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.seasonal.common
@@ -57,10 +45,10 @@
Source code for pyFTS.models.seasonal.common
import numpy as np
import pandas as pd
-from enum import Enum
-from pyFTS.common import FuzzySet , Membership
-from pyFTS.partitioners import partitioner , Grid
-from datetime import date as dt , datetime as dtm
+from enum import Enum
+from pyFTS.common import FuzzySet , Membership
+from pyFTS.partitioners import partitioner , Grid
+from datetime import date as dt , datetime as dtm
[docs] class DateTime ( Enum ):
@@ -156,7 +144,7 @@
Temporal/Seasonal Fuzzy Set
"""
-
def __init__ ( self , datepart , name , mf , parameters , centroid , alpha = 1.0 , ** kwargs ):
+
def __init__ ( self , datepart , name , mf , parameters , centroid , alpha = 1.0 , ** kwargs ):
super ( FuzzySet , self ) . __init__ ( name , mf , parameters , centroid , alpha ,
** kwargs )
self . datepart = datepart
@@ -181,7 +169,7 @@
Quick search
@@ -200,14 +188,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.seasonal.common
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/seasonal/msfts.html b/docs/build/html/_modules/pyFTS/models/seasonal/msfts.html
index c5f8f46..6ae073d 100644
--- a/docs/build/html/_modules/pyFTS/models/seasonal/msfts.html
+++ b/docs/build/html/_modules/pyFTS/models/seasonal/msfts.html
@@ -5,31 +5,19 @@
-
- pyFTS.models.seasonal.msfts — pyFTS 1.6 documentation
-
-
+
+ pyFTS.models.seasonal.msfts — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.seasonal.msfts
@@ -56,15 +44,15 @@
Source code for pyFTS.models.seasonal.msfts
import numpy as np
-from pyFTS.common import FLR
-from pyFTS.models.seasonal import sfts
+from pyFTS.common import FLR
+from pyFTS.models.seasonal import sfts
[docs] class MultiSeasonalFTS ( sfts . SeasonalFTS ):
"""
Multi-Seasonal Fuzzy Time Series
"""
-
def __init__ ( self , name , indexer , ** kwargs ):
+
def __init__ ( self , name , indexer , ** kwargs ):
super ( MultiSeasonalFTS , self ) . __init__ ( "MSFTS" )
self . name = "Multi Seasonal FTS"
self . shortname = "MSFTS " + name
@@ -133,7 +121,7 @@
Quick search
@@ -152,14 +140,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.seasonal.msfts
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/seasonal/partitioner.html b/docs/build/html/_modules/pyFTS/models/seasonal/partitioner.html
index f565da2..f808cde 100644
--- a/docs/build/html/_modules/pyFTS/models/seasonal/partitioner.html
+++ b/docs/build/html/_modules/pyFTS/models/seasonal/partitioner.html
@@ -5,31 +5,19 @@
-
- pyFTS.models.seasonal.partitioner — pyFTS 1.6 documentation
-
-
+
+ pyFTS.models.seasonal.partitioner — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.seasonal.partitioner
@@ -55,19 +43,19 @@
Source code for pyFTS.models.seasonal.partitioner
-from pyFTS.common import Membership , FuzzySet as FS
-from pyFTS.common.Composite import FuzzySet as Composite
-from pyFTS.partitioners import partitioner , Grid
-from pyFTS.models.seasonal.common import DateTime , FuzzySet , strip_datepart
+from pyFTS.common import Membership , FuzzySet as FS
+from pyFTS.common.Composite import FuzzySet as Composite
+from pyFTS.partitioners import partitioner , Grid
+from pyFTS.models.seasonal.common import DateTime , FuzzySet , strip_datepart
import numpy as np
import matplotlib.pylab as plt
-from scipy.spatial import KDTree
+from scipy.spatial import KDTree
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/seasonal/sfts.html b/docs/build/html/_modules/pyFTS/models/seasonal/sfts.html
index 798e701..8bbbbe4 100644
--- a/docs/build/html/_modules/pyFTS/models/seasonal/sfts.html
+++ b/docs/build/html/_modules/pyFTS/models/seasonal/sfts.html
@@ -5,31 +5,19 @@
-
- pyFTS.models.seasonal.sfts — pyFTS 1.6 documentation
-
-
+
+ pyFTS.models.seasonal.sfts — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.seasonal.sfts
@@ -64,12 +52,12 @@
"""
import numpy as np
-
from pyFTS.common import FuzzySet , FLR , flrg , fts
+
from pyFTS.common import FuzzySet , FLR , flrg , fts
[docs] class SeasonalFLRG ( flrg . FLRG ):
"""First Order Seasonal Fuzzy Logical Relationship Group"""
-
def __init__ ( self , seasonality ):
+
def __init__ ( self , seasonality ):
super ( SeasonalFLRG , self ) . __init__ ( 1 )
self . LHS = seasonality
self . RHS = []
@@ -80,7 +68,7 @@
[docs] def append_rhs ( self , c , ** kwargs ):
self . RHS . append ( c )
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = str ( self . LHS ) + " -> "
tmp2 = ""
for c in sorted ( self . RHS , key = lambda s : str ( s )):
@@ -89,13 +77,13 @@
tmp2 = tmp2 + str ( c )
return tmp + tmp2
-
def __len__ ( self ):
+
def __len__ ( self ):
return len ( self . RHS )
[docs] class SeasonalFTS ( fts . FTS ):
"""First Order Seasonal Fuzzy Time Series"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( SeasonalFTS , self ) . __init__ ( ** kwargs )
self . name = "Seasonal FTS"
self . shortname = "SFTS"
@@ -149,7 +137,7 @@
return ret
-
def __str__ ( self ):
+
def __str__ ( self ):
"""String representation of the model"""
tmp = self . name + ": \n "
@@ -168,7 +156,7 @@
Quick search
@@ -187,14 +175,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.seasonal.sfts
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/song.html b/docs/build/html/_modules/pyFTS/models/song.html
index 6f4b440..53ea9e3 100644
--- a/docs/build/html/_modules/pyFTS/models/song.html
+++ b/docs/build/html/_modules/pyFTS/models/song.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.song — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.song — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.song
@@ -62,29 +50,27 @@
"""
import numpy as np
-
from pyFTS.common import FuzzySet , FLR , fts
+
from pyFTS.common import FuzzySet , FLR , fts
[docs] class ConventionalFTS ( fts . FTS ):
"""Traditional Fuzzy Time Series"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( ConventionalFTS , self ) . __init__ ( order = 1 , name = "FTS" , ** kwargs )
self . name = "Traditional FTS"
self . detail = "Song & Chissom"
-
if self . sets is not None and self . partitioner is not None :
-
self . sets = self . partitioner . sets
self . R = None
-
if self . sets is not None :
-
l = len ( self . sets )
+
if self . partitioner . sets is not None :
+
l = len ( self . partitioner . sets )
self . R = np . zeros (( l , l ))
[docs] def flr_membership_matrix ( self , flr ):
-
ordered_set = FuzzySet . set_ordered ( self . sets )
-
centroids = [ self . sets [ k ] . centroid for k in ordered_set ]
-
lm = [ self . sets [ flr . LHS ] . membership ( k ) for k in centroids ]
-
rm = [ self . sets [ flr . RHS ] . membership ( k ) for k in centroids ]
+
ordered_set = FuzzySet . set_ordered ( self . partitioner . sets )
+
centroids = [ self . partitioner . sets [ k ] . centroid for k in ordered_set ]
+
lm = [ self . partitioner . sets [ flr . LHS ] . membership ( k ) for k in centroids ]
+
rm = [ self . partitioner . sets [ flr . RHS ] . membership ( k ) for k in centroids ]
l = len ( ordered_set )
r = np . zeros (( l , l ))
@@ -95,7 +81,7 @@
return r
[docs] def operation_matrix ( self , flrs ):
-
l = len ( self . sets )
+
l = len ( self . partitioner )
if self . R is None or len ( self . R ) == 0 :
self . R = np . zeros (( l , l ))
for k in flrs :
@@ -116,30 +102,30 @@
if self . partitioner is not None :
ordered_sets = self . partitioner . ordered_sets
else :
-
ordered_sets = FuzzySet . set_ordered ( self . sets )
+
ordered_sets = FuzzySet . set_ordered ( self . partitioner . sets )
l = len ( ndata )
-
npart = len ( self . sets )
+
npart = len ( self . partitioner )
ret = []
for k in np . arange ( 0 , l ):
-
mv = FuzzySet . fuzzyfy_instance ( ndata [ k ], self . sets )
+
mv = FuzzySet . fuzzyfy_instance ( ndata [ k ], self . partitioner . sets )
r = [ max ([ min ( self . R [ i ][ j ], mv [ j ]) for j in np . arange ( 0 , npart ) ]) for i in np . arange ( 0 , npart )]
fs = np . ravel ( np . argwhere ( r == max ( r )))
if len ( fs ) == 1 :
-
ret . append ( self . sets [ ordered_sets [ fs [ 0 ]]] . centroid )
+
ret . append ( self . partitioner . sets [ ordered_sets [ fs [ 0 ]]] . centroid )
else :
-
mp = [ self . sets [ ordered_sets [ s ]] . centroid for s in fs ]
+
mp = [ self . partitioner . sets [ ordered_sets [ s ]] . centroid for s in fs ]
ret . append ( sum ( mp ) / len ( mp ))
return ret
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = self . name + ": \n "
return tmp + str ( self . R )
@@ -154,7 +140,7 @@
Quick search
@@ -173,14 +159,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.song
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/models/yu.html b/docs/build/html/_modules/pyFTS/models/yu.html
index fbc1a53..1a8ad8d 100644
--- a/docs/build/html/_modules/pyFTS/models/yu.html
+++ b/docs/build/html/_modules/pyFTS/models/yu.html
@@ -5,31 +5,19 @@
-
-
pyFTS.models.yu — pyFTS 1.6 documentation
-
-
+
+
pyFTS.models.yu — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.models.yu
@@ -63,13 +51,13 @@
"""
import numpy as np
-
from pyFTS.common import FuzzySet , FLR , fts , flrg
-
from pyFTS.models import chen
+
from pyFTS.common import FuzzySet , FLR , fts , flrg
+
from pyFTS.models import chen
[docs] class WeightedFLRG ( flrg . FLRG ):
"""First Order Weighted Fuzzy Logical Relationship Group"""
-
def __init__ ( self , LHS , ** kwargs ):
+
def __init__ ( self , LHS , ** kwargs ):
super ( WeightedFLRG , self ) . __init__ ( 1 , ** kwargs )
self . LHS = LHS
self . RHS = []
@@ -87,7 +75,7 @@
self . w = np . array ([ k / tot for k in np . arange ( 1.0 , self . count , 1.0 )])
return self . w
-
def __str__ ( self ):
+
def __str__ ( self ):
tmp = self . LHS + " -> "
tmp2 = ""
cc = 1.0
@@ -102,7 +90,7 @@
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/partitioners/CMeans.html b/docs/build/html/_modules/pyFTS/partitioners/CMeans.html
index 03854ce..1a1fa58 100644
--- a/docs/build/html/_modules/pyFTS/partitioners/CMeans.html
+++ b/docs/build/html/_modules/pyFTS/partitioners/CMeans.html
@@ -5,31 +5,19 @@
-
-
pyFTS.partitioners.CMeans — pyFTS 1.6 documentation
-
-
+
+
pyFTS.partitioners.CMeans — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.CMeans
@@ -59,8 +47,8 @@
import math
import random as rnd
import functools , operator
-
from pyFTS.common import FuzzySet , Membership
-
from pyFTS.partitioners import partitioner
+
from pyFTS.common import FuzzySet , Membership
+
from pyFTS.partitioners import partitioner
[docs] def distance ( x , y ):
@@ -135,7 +123,7 @@
[docs] class CMeansPartitioner ( partitioner . Partitioner ):
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( CMeansPartitioner , self ) . __init__ ( name = "CMeans" , ** kwargs )
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/partitioners/Entropy.html b/docs/build/html/_modules/pyFTS/partitioners/Entropy.html
index 4a93039..47bcf58 100644
--- a/docs/build/html/_modules/pyFTS/partitioners/Entropy.html
+++ b/docs/build/html/_modules/pyFTS/partitioners/Entropy.html
@@ -5,31 +5,19 @@
-
-
pyFTS.partitioners.Entropy — pyFTS 1.6 documentation
-
-
+
+
pyFTS.partitioners.Entropy — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.Entropy
@@ -64,8 +52,8 @@
import math
import random as rnd
import functools , operator
-
from pyFTS.common import FuzzySet , Membership
-
from pyFTS.partitioners import partitioner
+
from pyFTS.common import FuzzySet , Membership
+
from pyFTS.partitioners import partitioner
[docs] def splitBelow ( data , threshold ):
@@ -138,7 +126,7 @@
[docs] class EntropyPartitioner ( partitioner . Partitioner ):
"""Huarng Entropy Partitioner"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( EntropyPartitioner , self ) . __init__ ( name = "Entropy" , ** kwargs )
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/partitioners/FCM.html b/docs/build/html/_modules/pyFTS/partitioners/FCM.html
index 636e119..246f605 100644
--- a/docs/build/html/_modules/pyFTS/partitioners/FCM.html
+++ b/docs/build/html/_modules/pyFTS/partitioners/FCM.html
@@ -5,31 +5,19 @@
-
-
pyFTS.partitioners.FCM — pyFTS 1.6 documentation
-
-
+
+
pyFTS.partitioners.FCM — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.FCM
@@ -64,8 +52,8 @@
import math
import random as rnd
import functools , operator
-
from pyFTS.common import FuzzySet , Membership
-
from pyFTS.partitioners import partitioner
+
from pyFTS.common import FuzzySet , Membership
+
from pyFTS.partitioners import partitioner
[docs] def fuzzy_distance ( x , y ):
@@ -152,7 +140,7 @@
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( FCMPartitioner , self ) . __init__ ( name = "FCM" , ** kwargs )
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/partitioners/Grid.html b/docs/build/html/_modules/pyFTS/partitioners/Grid.html
index fd7b705..53c1aaa 100644
--- a/docs/build/html/_modules/pyFTS/partitioners/Grid.html
+++ b/docs/build/html/_modules/pyFTS/partitioners/Grid.html
@@ -5,31 +5,19 @@
-
-
pyFTS.partitioners.Grid — pyFTS 1.6 documentation
-
-
+
+
pyFTS.partitioners.Grid — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.Grid
@@ -61,14 +49,14 @@
import math
import random as rnd
import functools , operator
-
from pyFTS.common import FuzzySet , Membership
-
from pyFTS.partitioners import partitioner
+
from pyFTS.common import FuzzySet , Membership
+
from pyFTS.partitioners import partitioner
[docs] class GridPartitioner ( partitioner . Partitioner ):
"""Even Length Grid Partitioner"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
"""
Even Length Grid Partitioner
"""
@@ -102,7 +90,7 @@
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/partitioners/Huarng.html b/docs/build/html/_modules/pyFTS/partitioners/Huarng.html
index acf2a78..775f10e 100644
--- a/docs/build/html/_modules/pyFTS/partitioners/Huarng.html
+++ b/docs/build/html/_modules/pyFTS/partitioners/Huarng.html
@@ -5,31 +5,19 @@
-
-
pyFTS.partitioners.Huarng — pyFTS 1.6 documentation
-
-
+
+
pyFTS.partitioners.Huarng — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.Huarng
@@ -64,13 +52,13 @@
import math
import random as rnd
import functools , operator
-
from pyFTS.common import FuzzySet , Membership , Transformations
+
from pyFTS.common import FuzzySet , Membership , Transformations
-
from pyFTS.partitioners import partitioner
+
from pyFTS.partitioners import partitioner
[docs] class HuarngPartitioner ( partitioner . Partitioner ):
"""Huarng Empirical Partitioner"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
super ( HuarngPartitioner , self ) . __init__ ( name = "Huarng" , ** kwargs )
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/partitioners/Simple.html b/docs/build/html/_modules/pyFTS/partitioners/Simple.html
index 931ddae..851ec21 100644
--- a/docs/build/html/_modules/pyFTS/partitioners/Simple.html
+++ b/docs/build/html/_modules/pyFTS/partitioners/Simple.html
@@ -5,31 +5,19 @@
-
-
pyFTS.partitioners.Simple — pyFTS 1.6 documentation
-
-
+
+
pyFTS.partitioners.Simple — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.Simple
@@ -61,14 +49,14 @@
import math
import random as rnd
import functools , operator
-
from pyFTS.common import FuzzySet , Membership
-
from pyFTS.partitioners import partitioner
+
from pyFTS.common import FuzzySet , Membership
+
from pyFTS.partitioners import partitioner
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/partitioners/Singleton.html b/docs/build/html/_modules/pyFTS/partitioners/Singleton.html
index 0975ff4..2189f6f 100644
--- a/docs/build/html/_modules/pyFTS/partitioners/Singleton.html
+++ b/docs/build/html/_modules/pyFTS/partitioners/Singleton.html
@@ -5,31 +5,19 @@
-
-
pyFTS.partitioners.Singleton — pyFTS 1.6 documentation
-
-
+
+
pyFTS.partitioners.Singleton — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.Singleton
@@ -61,25 +49,25 @@
import math
import random as rnd
import functools , operator
-
from pyFTS.common import FuzzySet , Membership
-
from pyFTS.partitioners import partitioner
+
from pyFTS.common import FuzzySet , Membership
+
from pyFTS.partitioners import partitioner
[docs] class SingletonPartitioner ( partitioner . Partitioner ):
-
"""Singleton Partitioner"""
+
"""Singleton Partitioner: Create singleton fuzzy sets for each distinct value in UoD"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
"""
Singleton Partitioner
"""
super ( SingletonPartitioner , self ) . __init__ ( name = "Singleton" , ** kwargs )
-
[docs] def build ( self , data ):
+
[docs] def build ( self , data : list ):
sets = {}
kwargs = { 'type' : self . type , 'variable' : self . variable }
-
for count , instance in enumerate ( data ):
+
for count , instance in enumerate ( set ( data )):
_name = self . get_name ( count )
sets [ _name ] = FuzzySet . FuzzySet ( _name , Membership . singleton , [ instance ], instance , ** kwargs )
@@ -96,7 +84,7 @@
Quick search
@@ -115,14 +103,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.Singleton
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/partitioners/SubClust.html b/docs/build/html/_modules/pyFTS/partitioners/SubClust.html
index b9266a9..7e61a44 100644
--- a/docs/build/html/_modules/pyFTS/partitioners/SubClust.html
+++ b/docs/build/html/_modules/pyFTS/partitioners/SubClust.html
@@ -5,31 +5,19 @@
-
-
pyFTS.partitioners.SubClust — pyFTS 1.6 documentation
-
-
+
+
pyFTS.partitioners.SubClust — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.SubClust
@@ -63,8 +51,8 @@
import math
import random as rnd
import functools , operator
-
from pyFTS.common import FuzzySet , Membership
-
from pyFTS.partitioners import partitioner
+
from pyFTS.common import FuzzySet , Membership
+
from pyFTS.partitioners import partitioner
[docs] def imax ( vec ):
@@ -118,7 +106,7 @@
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/partitioners/Util.html b/docs/build/html/_modules/pyFTS/partitioners/Util.html
index c3855c7..ef2403f 100644
--- a/docs/build/html/_modules/pyFTS/partitioners/Util.html
+++ b/docs/build/html/_modules/pyFTS/partitioners/Util.html
@@ -5,31 +5,19 @@
-
-
pyFTS.partitioners.Util — pyFTS 1.6 documentation
-
-
+
+
pyFTS.partitioners.Util — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.Util
@@ -66,16 +54,20 @@
import matplotlib.pyplot as plt
#from mpl_toolkits.mplot3d import Axes3D
-
from pyFTS.benchmarks import Measures
-
from pyFTS.common import Membership , Util
-
from pyFTS.partitioners import Grid , Huarng , FCM , Entropy
+
from pyFTS.benchmarks import Measures
+
from pyFTS.common import Membership , Util
+
from pyFTS.partitioners import Grid , Huarng , FCM , Entropy
all_methods = [ Grid . GridPartitioner , Entropy . EntropyPartitioner , FCM . FCMPartitioner , Huarng . HuarngPartitioner ]
mfs = [ Membership . trimf , Membership . gaussmf , Membership . trapmf ]
-
[docs] def plot_sets ( data , sets , titles , size = [ 12 , 10 ], save = False , file = None , axis = None ):
+
[docs] def plot_sets ( data , sets : dict , titles : list , size = [ 12 , 10 ], save = False , file = None , axis = None ):
+
"""
+
Plot all fuzzy sets in a Partitioner
+
+
"""
num = len ( sets )
if axis is None :
@@ -110,7 +102,7 @@
[docs] def plot_partitioners ( data , objs , tam = [ 12 , 10 ], save = False , file = None , axis = None ):
sets = [ k . sets for k in objs ]
titles = [ k . name for k in objs ]
-
plot_sets ( data , sets , titles , tam , save , file , axis )
+
plot_sets ( sets , titles , tam , save , file , axis )
[docs] def explore_partitioners ( data , npart , methods = None , mf = None , transformation = None ,
@@ -141,7 +133,7 @@
obj . name = obj . name + " - " + obj . membership_function . __name__
objs . append ( obj )
-
plot_partitioners ( data , objs , size , save , file )
+
plot_partitioners ( objs , size , save , file )
return objs
@@ -156,7 +148,7 @@
Quick search
@@ -175,14 +167,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.Util
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/partitioners/parallel_util.html b/docs/build/html/_modules/pyFTS/partitioners/parallel_util.html
index 71e4683..92f3d1e 100644
--- a/docs/build/html/_modules/pyFTS/partitioners/parallel_util.html
+++ b/docs/build/html/_modules/pyFTS/partitioners/parallel_util.html
@@ -5,31 +5,19 @@
-
-
pyFTS.partitioners.parallel_util — pyFTS 1.6 documentation
-
-
+
+
pyFTS.partitioners.parallel_util — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.parallel_util
@@ -55,14 +43,14 @@
Source code for pyFTS.partitioners.parallel_util
-from copy import deepcopy
-from joblib import Parallel , delayed
+from copy import deepcopy
+from joblib import Parallel , delayed
import multiprocessing
import numpy as np
-from pyFTS.common import Membership , Util
-from pyFTS.partitioners import Grid , Huarng , FCM , Entropy
-from pyFTS.partitioners import Util
+from pyFTS.common import Membership , Util
+from pyFTS.partitioners import Grid , Huarng , FCM , Entropy
+from pyFTS.partitioners import Util
[docs] def explore_partitioners ( data , npart , methods = None , mf = None , tam = [ 12 , 10 ], save = False , file = None ):
@@ -85,7 +73,7 @@
objs = np . ravel ( objs ) . tolist ()
-
Util . plot_partitioners ( data , objs , tam , save , file )
+ Util . plot_partitioners ( objs , tam , save , file )
@@ -99,7 +87,7 @@
Quick search
@@ -118,14 +106,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.parallel_util
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/partitioners/partitioner.html b/docs/build/html/_modules/pyFTS/partitioners/partitioner.html
index f50c1d7..9be5dd1 100644
--- a/docs/build/html/_modules/pyFTS/partitioners/partitioner.html
+++ b/docs/build/html/_modules/pyFTS/partitioners/partitioner.html
@@ -5,31 +5,19 @@
-
-
pyFTS.partitioners.partitioner — pyFTS 1.6 documentation
-
-
+
+
pyFTS.partitioners.partitioner — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.partitioner
@@ -55,11 +43,9 @@
Source code for pyFTS.partitioners.partitioner
-from pyFTS.common import FuzzySet , Membership
+from pyFTS.common import FuzzySet , Membership
import numpy as np
-from scipy.spatial import KDTree
-import matplotlib.pylab as plt
-import logging
+from scipy.spatial import KDTree
[docs] class Partitioner ( object ):
@@ -67,37 +53,38 @@
Universe of Discourse partitioner. Split data on several fuzzy sets
"""
-
def __init__ ( self , ** kwargs ):
+
def __init__ ( self , ** kwargs ):
"""
Universe of Discourse partitioner scheme. Split data on several fuzzy sets
"""
-
self . name = kwargs . get ( 'name' , "" )
+
self . name : str = kwargs . get ( 'name' , "" )
"""partitioner name"""
-
self . partitions = kwargs . get ( 'npart' , 10 )
+
self . partitions : int = kwargs . get ( 'npart' , 10 )
"""The number of universe of discourse partitions, i.e., the number of fuzzy sets that will be created"""
-
self . sets = {}
+
self . sets : dict = {}
+
"""The fuzzy sets dictionary"""
self . membership_function = kwargs . get ( 'func' , Membership . trimf )
"""Fuzzy membership function (pyFTS.common.Membership)"""
-
self . setnames = kwargs . get ( 'names' , None )
+
self . setnames : list = kwargs . get ( 'names' , None )
"""list of partitions names. If None is given the partitions will be auto named with prefix"""
-
self . prefix = kwargs . get ( 'prefix' , 'A' )
+
self . prefix : str = kwargs . get ( 'prefix' , 'A' )
"""prefix of auto generated partition names"""
self . transformation = kwargs . get ( 'transformation' , None )
"""data transformation to be applied on data"""
self . indexer = kwargs . get ( 'indexer' , None )
self . variable = kwargs . get ( 'variable' , None )
"""In a multivariate context, the variable that contains this partitioner"""
-
self . type = kwargs . get ( 'type' , 'common' )
+
self . type : str = kwargs . get ( 'type' , 'common' )
"""The type of fuzzy sets that are generated by this partitioner"""
-
self . ordered_sets = None
+
self . ordered_sets : list = None
"""A ordered list of the fuzzy sets names, sorted by their middle point"""
-
self . kdtree = None
+
self . kdtree : KDTree = None
"""A spatial index to help in fuzzyfication"""
-
self . margin = kwargs . get ( "margin" , 0.1 )
+
self . margin : float = kwargs . get ( "margin" , 0.1 )
"""The upper and lower exceeding margins for the known UoD. The default value is .1"""
-
self . lower_margin = kwargs . get ( "lower_margin" , self . margin )
+
self . lower_margin : float = kwargs . get ( "lower_margin" , self . margin )
"""Specific lower exceeding margins for the known UoD. The default value is the self.margin parameter"""
-
self . upper_margin = kwargs . get ( "lower_margin" , self . margin )
+
self . upper_margin : float = kwargs . get ( "lower_margin" , self . margin )
"""Specific upper exceeding margins for the known UoD. The default value is the self.margin parameter"""
if kwargs . get ( 'preprocess' , True ):
@@ -354,7 +341,7 @@
elif s . mf == Membership . singleton :
ax . plot ([ s . parameters [ 0 ], s . parameters [ 0 ]], [ 0 , s . alpha ])
- def __str__ ( self ):
+ def __str__ ( self ):
"""
Return a string representation of the partitioner, the list of fuzzy sets and their parameters
@@ -365,7 +352,7 @@
tmp += str ( self . sets [ key ]) + " \n "
return tmp
- def __len__ ( self ):
+ def __len__ ( self ):
"""
Return the number of partitions
@@ -373,7 +360,7 @@
"""
return self . partitions
- def __getitem__ ( self , item ):
+ def __getitem__ ( self , item ):
"""
Return a fuzzy set by its order or its name.
@@ -393,7 +380,7 @@
raise ValueError ( "The parameter 'item' must be an integer or a string and the value informed was {} of type {} !" . format ( item , type ( item )))
- def __iter__ ( self ):
+ def __iter__ ( self ):
"""
Iterate over the fuzzy sets, ordered by its midpoints.
@@ -414,7 +401,7 @@
Quick search
@@ -433,14 +420,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.partitioners.partitioner
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/probabilistic/ProbabilityDistribution.html b/docs/build/html/_modules/pyFTS/probabilistic/ProbabilityDistribution.html
index 0e65d07..9280c12 100644
--- a/docs/build/html/_modules/pyFTS/probabilistic/ProbabilityDistribution.html
+++ b/docs/build/html/_modules/pyFTS/probabilistic/ProbabilityDistribution.html
@@ -5,31 +5,19 @@
-
-
pyFTS.probabilistic.ProbabilityDistribution — pyFTS 1.6 documentation
-
-
+
+
pyFTS.probabilistic.ProbabilityDistribution — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.probabilistic.ProbabilityDistribution
@@ -58,8 +46,8 @@
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
-
from pyFTS.common import FuzzySet , SortedCollection , tree
-
from pyFTS.probabilistic import kde
+
from pyFTS.common import FuzzySet , SortedCollection , tree
+
from pyFTS.probabilistic import kde
[docs] def from_point ( x , ** kwargs ):
@@ -81,7 +69,7 @@
If type is histogram, the PDF is discrete
If type is KDE the PDF is continuous
"""
-
def __init__ ( self , type = "KDE" , ** kwargs ):
+
def __init__ ( self , type = "KDE" , ** kwargs ):
self . uod = kwargs . get ( "uod" , None )
"""Universe of discourse"""
@@ -406,7 +394,7 @@
axis . set_xlabel ( 'Universe of Discourse' )
axis . set_ylabel ( 'Probability' )
-
def __str__ ( self ):
+
def __str__ ( self ):
ret = ""
for k in sorted ( self . bins ):
ret += str ( round ( k , 2 )) + ': \t '
@@ -430,7 +418,7 @@
Quick search
@@ -449,14 +437,14 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.probabilistic.ProbabilityDistribution
\ No newline at end of file
diff --git a/docs/build/html/_modules/pyFTS/probabilistic/kde.html b/docs/build/html/_modules/pyFTS/probabilistic/kde.html
index d8971b3..dee879e 100644
--- a/docs/build/html/_modules/pyFTS/probabilistic/kde.html
+++ b/docs/build/html/_modules/pyFTS/probabilistic/kde.html
@@ -5,31 +5,19 @@
-
-
pyFTS.probabilistic.kde — pyFTS 1.6 documentation
-
-
+
+
pyFTS.probabilistic.kde — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
-
pyFTS 1.6 documentation »
+
pyFTS 1.7 documentation »
Module code »
pyFTS.probabilistic.kde
@@ -61,13 +49,13 @@
Kernel Density Estimation
"""
-
from pyFTS.common import Transformations
+
from pyFTS.common import Transformations
import numpy as np
\ No newline at end of file
diff --git a/docs/build/html/_static/basic.css b/docs/build/html/_static/basic.css
index 295d6da..bd473cd 100644
--- a/docs/build/html/_static/basic.css
+++ b/docs/build/html/_static/basic.css
@@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
- * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -130,7 +130,7 @@ ul.search li a {
font-weight: bold;
}
-ul.search li div.context {
+ul.search li p.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
@@ -277,25 +277,25 @@ p.rubric {
font-weight: bold;
}
-img.align-left, .figure.align-left, object.align-left {
+img.align-left, figure.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
-img.align-right, .figure.align-right, object.align-right {
+img.align-right, figure.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
-img.align-center, .figure.align-center, object.align-center {
+img.align-center, figure.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
-img.align-default, .figure.align-default {
+img.align-default, figure.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
@@ -319,7 +319,8 @@ img.align-default, .figure.align-default {
/* -- sidebars -------------------------------------------------------------- */
-div.sidebar {
+div.sidebar,
+aside.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px;
@@ -377,12 +378,14 @@ div.body p.centered {
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
+aside.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
+aside.sidebar::after,
div.topic::after,
div.admonition::after,
blockquote::after {
@@ -455,20 +458,22 @@ td > :last-child {
/* -- figures --------------------------------------------------------------- */
-div.figure {
+div.figure, figure {
margin: 0.5em;
padding: 0.5em;
}
-div.figure p.caption {
+div.figure p.caption, figcaption {
padding: 0.3em;
}
-div.figure p.caption span.caption-number {
+div.figure p.caption span.caption-number,
+figcaption span.caption-number {
font-style: italic;
}
-div.figure p.caption span.caption-text {
+div.figure p.caption span.caption-text,
+figcaption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
@@ -503,6 +508,63 @@ table.hlist td {
vertical-align: top;
}
+/* -- object description styles --------------------------------------------- */
+
+.sig {
+ font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+}
+
+.sig-name, code.descname {
+ background-color: transparent;
+ font-weight: bold;
+}
+
+.sig-name {
+ font-size: 1.1em;
+}
+
+code.descname {
+ font-size: 1.2em;
+}
+
+.sig-prename, code.descclassname {
+ background-color: transparent;
+}
+
+.optional {
+ font-size: 1.3em;
+}
+
+.sig-paren {
+ font-size: larger;
+}
+
+.sig-param.n {
+ font-style: italic;
+}
+
+/* C++ specific styling */
+
+.sig-inline.c-texpr,
+.sig-inline.cpp-texpr {
+ font-family: unset;
+}
+
+.sig.c .k, .sig.c .kt,
+.sig.cpp .k, .sig.cpp .kt {
+ color: #0033B3;
+}
+
+.sig.c .m,
+.sig.cpp .m {
+ color: #1750EB;
+}
+
+.sig.c .s, .sig.c .sc,
+.sig.cpp .s, .sig.cpp .sc {
+ color: #067D17;
+}
+
/* -- other body styles ----------------------------------------------------- */
@@ -629,14 +691,6 @@ dl.glossary dt {
font-size: 1.1em;
}
-.optional {
- font-size: 1.3em;
-}
-
-.sig-paren {
- font-size: larger;
-}
-
.versionmodified {
font-style: italic;
}
@@ -677,8 +731,9 @@ dl.glossary dt {
.classifier:before {
font-style: normal;
- margin: 0.5em;
+ margin: 0 0.5em;
content: ":";
+ display: inline-block;
}
abbr, acronym {
@@ -693,7 +748,7 @@ pre {
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
-pre, div[class|="highlight"] {
+pre, div[class*="highlight-"] {
clear: both;
}
@@ -702,9 +757,10 @@ span.pre {
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
+ white-space: nowrap;
}
-div[class^="highlight-"] {
+div[class*="highlight-"] {
margin: 1em 0;
}
@@ -764,8 +820,13 @@ div.code-block-caption code {
}
table.highlighttable td.linenos,
-div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
- user-select: none;
+span.linenos,
+div.highlight span.gp { /* gp: Generic.Prompt */
+ user-select: none;
+ -webkit-user-select: text; /* Safari fallback only */
+ -webkit-user-select: none; /* Chrome/Safari */
+ -moz-user-select: none; /* Firefox */
+ -ms-user-select: none; /* IE10+ */
}
div.code-block-caption span.caption-number {
@@ -780,16 +841,6 @@ div.literal-block-wrapper {
margin: 1em 0;
}
-code.descname {
- background-color: transparent;
- font-weight: bold;
- font-size: 1.2em;
-}
-
-code.descclassname {
- background-color: transparent;
-}
-
code.xref, a code {
background-color: transparent;
font-weight: bold;
diff --git a/docs/build/html/_static/bizstyle.js b/docs/build/html/_static/bizstyle.js
index d2ec5ee..cce10fb 100644
--- a/docs/build/html/_static/bizstyle.js
+++ b/docs/build/html/_static/bizstyle.js
@@ -36,6 +36,6 @@ $(window).resize(function(){
$("li.nav-item-0 a").text("Top");
}
else {
- $("li.nav-item-0 a").text("pyFTS 1.6 documentation");
+ $("li.nav-item-0 a").text("pyFTS 1.7 documentation");
}
});
\ No newline at end of file
diff --git a/docs/build/html/_static/css3-mediaqueries_src.js b/docs/build/html/_static/css3-mediaqueries_src.js
index f21dd49..7878620 100644
--- a/docs/build/html/_static/css3-mediaqueries_src.js
+++ b/docs/build/html/_static/css3-mediaqueries_src.js
@@ -1035,7 +1035,7 @@ domReady(function enableCssMediaQueries() {
var vpw = cssHelper.getViewportWidth();
var vph = cssHelper.getViewportHeight();
// check whether vp size has really changed, because IE also triggers resize event when body size changes
- // 20px allowance to accomodate short appearance of scrollbars in IE in some cases
+ // 20px allowance to accommodate short appearance of scrollbars in IE in some cases
if (Math.abs(vpw - cvpw) > scrollbarWidth || Math.abs(vph - cvph) > scrollbarWidth) {
cvpw = vpw;
cvph = vph;
diff --git a/docs/build/html/_static/doctools.js b/docs/build/html/_static/doctools.js
index daccd20..e1bfd70 100644
--- a/docs/build/html/_static/doctools.js
+++ b/docs/build/html/_static/doctools.js
@@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
- * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -29,9 +29,14 @@ if (!window.console || !console.firebug) {
/**
* small helper function to urldecode strings
+ *
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
- return decodeURIComponent(x).replace(/\+/g, ' ');
+ if (!x) {
+ return x
+ }
+ return decodeURIComponent(x.replace(/\+/g, ' '));
};
/**
@@ -149,9 +154,7 @@ var Documentation = {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
- if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
- this.initOnKeyListeners();
- }
+ this.initOnKeyListeners();
},
/**
@@ -259,6 +262,16 @@ var Documentation = {
hideSearchWords : function() {
$('#searchbox .highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
+ var url = new URL(window.location);
+ url.searchParams.delete('highlight');
+ window.history.replaceState({}, '', url);
+ },
+
+ /**
+ * helper function to focus on search bar
+ */
+ focusSearchBar : function() {
+ $('input[name=q]').first().focus();
},
/**
@@ -283,24 +296,54 @@ var Documentation = {
},
initOnKeyListeners: function() {
+ // only install a listener if it is really needed
+ if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
+ !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
+ return;
+
$(document).keydown(function(event) {
var activeElementType = document.activeElement.tagName;
- // don't navigate when in search box or textarea
+ // don't navigate when in search box, textarea, dropdown or button
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');
- if (prevHref) {
- window.location.href = prevHref;
- return false;
- }
- case 39: // right
- var nextHref = $('link[rel="next"]').prop('href');
- if (nextHref) {
- window.location.href = nextHref;
- return false;
- }
+ && activeElementType !== 'BUTTON') {
+ if (event.altKey || event.ctrlKey || event.metaKey)
+ return;
+
+ if (!event.shiftKey) {
+ switch (event.key) {
+ case 'ArrowLeft':
+ if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
+ break;
+ var prevHref = $('link[rel="prev"]').prop('href');
+ if (prevHref) {
+ window.location.href = prevHref;
+ return false;
+ }
+ break;
+ case 'ArrowRight':
+ if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
+ break;
+ var nextHref = $('link[rel="next"]').prop('href');
+ if (nextHref) {
+ window.location.href = nextHref;
+ return false;
+ }
+ break;
+ case 'Escape':
+ if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
+ break;
+ Documentation.hideSearchWords();
+ return false;
+ }
+ }
+
+ // some keyboard layouts may need Shift to get /
+ switch (event.key) {
+ case '/':
+ if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
+ break;
+ Documentation.focusSearchBar();
+ return false;
}
}
});
diff --git a/docs/build/html/_static/documentation_options.js b/docs/build/html/_static/documentation_options.js
index 4ce91d0..3d8bc76 100644
--- a/docs/build/html/_static/documentation_options.js
+++ b/docs/build/html/_static/documentation_options.js
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
- VERSION: '1.6',
+ VERSION: '1.7',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',
@@ -8,5 +8,7 @@ var DOCUMENTATION_OPTIONS = {
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
- NAVIGATION_WITH_KEYS: false
+ NAVIGATION_WITH_KEYS: false,
+ SHOW_SEARCH_SUMMARY: true,
+ ENABLE_SEARCH_SHORTCUTS: true,
};
\ No newline at end of file
diff --git a/docs/build/html/_static/language_data.js b/docs/build/html/_static/language_data.js
index d2b4ee9..ebe2f03 100644
--- a/docs/build/html/_static/language_data.js
+++ b/docs/build/html/_static/language_data.js
@@ -5,7 +5,7 @@
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
- * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -13,7 +13,8 @@
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"];
-/* Non-minified version JS is _stemmer.js if file is provided */
+/* Non-minified version is copied as a separate JS file, is available */
+
/**
* Porter Stemmer
*/
@@ -199,7 +200,6 @@ var Stemmer = function() {
-
var splitChars = (function() {
var result = {};
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
diff --git a/docs/build/html/_static/searchtools.js b/docs/build/html/_static/searchtools.js
index ab56499..0a44e85 100644
--- a/docs/build/html/_static/searchtools.js
+++ b/docs/build/html/_static/searchtools.js
@@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
- * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
+ * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@@ -59,10 +59,10 @@ var Search = {
_pulse_status : -1,
htmlToText : function(htmlString) {
- var htmlElement = document.createElement('span');
- htmlElement.innerHTML = htmlString;
- $(htmlElement).find('.headerlink').remove();
- docContent = $(htmlElement).find('[role=main]')[0];
+ var virtualDocument = document.implementation.createHTMLDocument('virtual');
+ var htmlElement = $(htmlString, virtualDocument);
+ 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.");
@@ -166,17 +166,12 @@ var Search = {
objectterms.push(tmp[i].toLowerCase());
}
- if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
- tmp[i] === "") {
+ if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === "") {
// skip this "word"
continue;
}
// stem the word
var word = stemmer.stemWord(tmp[i].toLowerCase());
- // prevent stemmer from cutting word smaller than two chars
- if(word.length < 3 && tmp[i].length >= 3) {
- word = tmp[i];
- }
var toAppend;
// select the correct list
if (word[0] == '-') {
@@ -249,7 +244,7 @@ var Search = {
// results left, load the summary and display it
if (results.length) {
var item = results.pop();
- var listItem = $('
');
+ var listItem = $('
');
var requestUrl = "";
var linkUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
@@ -274,28 +269,31 @@ var Search = {
if (item[3]) {
listItem.append($('
(' + item[3] + ') '));
Search.output.append(listItem);
- listItem.slideDown(5, function() {
+ setTimeout(function() {
displayNextItem();
- });
- } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
+ }, 5);
+ } else if (DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY) {
$.ajax({url: requestUrl,
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
if (data !== '' && data !== undefined) {
- listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
+ var summary = Search.makeSearchSummary(data, searchterms, hlterms);
+ if (summary) {
+ listItem.append(summary);
+ }
}
Search.output.append(listItem);
- listItem.slideDown(5, function() {
+ setTimeout(function() {
displayNextItem();
- });
+ }, 5);
}});
} else {
- // no source available, just display title
+ // just display title
Search.output.append(listItem);
- listItem.slideDown(5, function() {
+ setTimeout(function() {
displayNextItem();
- });
+ }, 5);
}
}
// search finished, update title and status message
@@ -326,7 +324,9 @@ var Search = {
var results = [];
for (var prefix in objects) {
- for (var name in objects[prefix]) {
+ for (var iMatch = 0; iMatch != objects[prefix].length; ++iMatch) {
+ var match = objects[prefix][iMatch];
+ var name = match[4];
var fullname = (prefix ? prefix + '.' : '') + name;
var fullnameLower = fullname.toLowerCase()
if (fullnameLower.indexOf(object) > -1) {
@@ -340,7 +340,6 @@ var Search = {
} else if (parts[parts.length - 1].indexOf(object) > -1) {
score += Scorer.objPartialMatch;
}
- var match = objects[prefix][name];
var objname = objnames[match[1]][2];
var title = titles[match[0]];
// If more than one term searched for, we require other words to be
@@ -380,6 +379,13 @@ var Search = {
return results;
},
+ /**
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
+ */
+ escapeRegExp : function(string) {
+ return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
+ },
+
/**
* search for full-text terms in the index
*/
@@ -403,13 +409,14 @@ var Search = {
];
// add support for partial matches
if (word.length > 2) {
+ var word_regex = this.escapeRegExp(word);
for (var w in terms) {
- if (w.match(word) && !terms[word]) {
+ if (w.match(word_regex) && !terms[word]) {
_o.push({files: terms[w], score: Scorer.partialTerm})
}
}
for (var w in titleterms) {
- if (w.match(word) && !titleterms[word]) {
+ if (w.match(word_regex) && !titleterms[word]) {
_o.push({files: titleterms[w], score: Scorer.partialTitle})
}
}
@@ -491,6 +498,9 @@ var Search = {
*/
makeSearchSummary : function(htmlText, keywords, hlwords) {
var text = Search.htmlToText(htmlText);
+ if (text == "") {
+ return null;
+ }
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
@@ -502,7 +512,7 @@ var Search = {
var excerpt = ((start > 0) ? '...' : '') +
$.trim(text.substr(start, 240)) +
((start + 240 - text.length) ? '...' : '');
- var rv = $('
').text(excerpt);
+ var rv = $('
').text(excerpt);
$.each(hlwords, function() {
rv = rv.highlightText(this, 'highlighted');
});
diff --git a/docs/build/html/_static/underscore.js b/docs/build/html/_static/underscore.js
index 5b55f32..cf177d4 100644
--- a/docs/build/html/_static/underscore.js
+++ b/docs/build/html/_static/underscore.js
@@ -1,31 +1,6 @@
-// Underscore.js 1.3.1
-// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
-// Underscore is freely distributable under the MIT license.
-// Portions of Underscore are inspired or borrowed from Prototype,
-// Oliver Steele's Functional, and John Resig's Micro-Templating.
-// For all details and documentation:
-// http://documentcloud.github.com/underscore
-(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
-c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
-h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
-b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e
2;a==
-null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
-function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
-e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
-function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;bd?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
-c,d){d||(d=b.identity);for(var e=0,f=a.length;e>1;d(a[g])=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e=0;d--)b=[a[d].apply(this,b)];return b[0]}};
-b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
-1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
-b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
-b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e /g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a),
-function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
-u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
-function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
-true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);
+!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){
+// Underscore.js 1.13.1
+// https://underscorejs.org
+// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
+var n="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e":">",'"':""","'":"'","`":"`"},Cn=Ln($n),Kn=Ln(_n($n)),Jn=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=/^\s*(\w|\$)+\s*$/;var Zn=0;function nr(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var rr=j((function(n,r){var t=rr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a1)ur(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var lr=rr(cr,2);function sr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o0?0:u-1;o>=0&&o0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),$))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a=3;return r(n,Fn(t,u,4),e,o)}}var Ar=wr(1),xr=wr(-1);function Sr(n,r,t){var e=[];return r=qn(r,t),jr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Or(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o=0}var Br=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),_r(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Nr(n,r){return _r(n,Rn(r))}function Ir(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;ao&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Tr(n,r,t){if(null==r||t)return er(n)||(n=jn(n)),n[Wn(n.length-1)];var e=er(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i1&&(e=Fn(e,r[1])),r=an(n)):(e=qr,r=ur(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u1&&(t=r[1])):(r=_r(ur(r,!1,!1),String),e=function(n,t){return!Er(r,t)}),Ur(n,e,t)}));function zr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Lr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:zr(n,n.length-r)}function $r(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=ur(r,!0,!0),Sr(n,(function(n){return!Er(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);ir?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o,i,a,f=function(){var c=zn()-u;r>c?e=setTimeout(f,r-c):(e=null,t||(i=n.apply(a,o)),e||(o=a=null))},c=j((function(c){return a=this,o=c,u=zn(),e||(e=setTimeout(f,r),t&&(i=n.apply(a,o))),i}));return c.cancel=function(){clearTimeout(e),e=o=a=null},c},wrap:function(n,r){return rr(r,n)},negate:fr,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:cr,once:lr,findKey:sr,findIndex:vr,findLastIndex:hr,sortedIndex:yr,indexOf:gr,lastIndexOf:br,find:mr,detect:mr,findWhere:function(n,r){return mr(n,Dn(r))},each:jr,forEach:jr,map:_r,collect:_r,reduce:Ar,foldl:Ar,inject:Ar,reduceRight:xr,foldr:xr,filter:Sr,select:Sr,reject:function(n,r,t){return Sr(n,fr(qn(r)),t)},every:Or,all:Or,some:Mr,any:Mr,contains:Er,includes:Er,include:Er,invoke:Br,pluck:Nr,where:function(n,r){return Sr(n,Dn(r))},max:Ir,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;ae||void 0===t)return 1;if(t
-
- Index — pyFTS 1.6 documentation
-
-
+
+ Index — pyFTS 1.7 documentation
+
+
-
+
-
-
+
@@ -43,7 +31,7 @@
modules |
- pyFTS 1.6 documentation »
+ pyFTS 1.7 documentation »
Index
@@ -98,12 +86,78 @@
alpha_cut (pyFTS.common.fts.FTS attribute)
analytic_tabular_dataframe() (in module pyFTS.benchmarks.Util)
@@ -202,8 +256,12 @@
(pyFTS.common.transformations.roi.ROI method)
(pyFTS.common.transformations.scale.Scale method)
+
+
(pyFTS.common.transformations.smoothing.AveragePooling method)
(pyFTS.common.transformations.smoothing.ExponentialSmoothing method)
+
+
(pyFTS.common.transformations.smoothing.MaxPooling method)
(pyFTS.common.transformations.smoothing.MovingAverage method)
@@ -241,10 +299,70 @@
auto_update (pyFTS.common.fts.FTS attribute)
averageloglikelihood() (pyFTS.probabilistic.ProbabilityDistribution.ProbabilityDistribution method)
+
+
AveragePooling (class in pyFTS.common.transformations.smoothing)
@@ -263,7 +381,71 @@
bellmf() (in module pyFTS.common.Membership)
benchmark_only (pyFTS.common.fts.FTS attribute)
+
+
+
+
-
-
-
-
+
@@ -603,7 +911,69 @@
flrg_rhs_conditional_probability() (pyFTS.models.pwfts.ProbabilisticWeightedFTS method)
flrgs (pyFTS.common.fts.FTS attribute)
+
+
FLRGTree (class in pyFTS.common.tree)
FLRGTreeNode (class in pyFTS.common.tree)
@@ -678,6 +1048,8 @@
(pyFTS.models.seasonal.msfts.MultiSeasonalFTS method)
+
+
-
get_dataframe_from_bd() (in module pyFTS.benchmarks.Util)
-
- get_distribution_ahead_statistics() (in module pyFTS.benchmarks.Measures)
+
-
-
-
is_clustered (pyFTS.common.fts.FTS attribute)
+
+
is_high_order (pyFTS.common.fts.FTS attribute)
+
+
+
+
K
@@ -1898,15 +3426,19 @@
parameters (pyFTS.common.FuzzySet.FuzzySet attribute)
-
parameters() (pyFTS.common.transformations.boxcox.BoxCox property)
-
-
partition_function() (pyFTS.common.FuzzySet.FuzzySet method)
@@ -1920,9 +3452,67 @@
partitioner (pyFTS.common.fts.FTS attribute)
partitioner_method (pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS attribute)
@@ -1942,7 +3532,25 @@
partitions (pyFTS.models.ensemble.ensemble.SimpleEnsembleFTS attribute)
paths() (pyFTS.common.tree.FLRGTreeNode method)
@@ -2053,8 +3661,28 @@
predict() (pyFTS.common.fts.FTS method)
-
prefix (pyFTS.partitioners.partitioner.Partitioner attribute)
+ prefix (pyFTS.partitioners.CMeans.CMeansPartitioner attribute)
+
+
PreFixedGridPartitioner (class in pyFTS.partitioners.Grid)
print_distribution_statistics() (in module pyFTS.benchmarks.benchmarks)
@@ -2275,6 +3903,8 @@
module
+
+
pyFTS.common.transformations.roi
@@ -2366,8 +3996,6 @@
module
-
-
-
+ sets (pyFTS.partitioners.CMeans.CMeansPartitioner attribute)
+
+
sharpness() (in module pyFTS.benchmarks.Measures)
shortname (pyFTS.common.fts.FTS attribute)
+
+
+
+
-
-
transformations (pyFTS.common.fts.FTS attribute)
+
+
+
+
-
+