pyFTS.models.multivariate package

Module contents

Multivariate Fuzzy Time Series methods

Submodules

pyFTS.models.multivariate.FLR module

class pyFTS.models.multivariate.FLR.FLR[source]

Bases: object

Multivariate Fuzzy Logical Relationship

set_lhs(var, set)[source]
set_rhs(set)[source]

pyFTS.models.multivariate.common module

pyFTS.models.multivariate.common.fuzzyfy_instance(data_point, var)[source]

pyFTS.models.multivariate.flrg module

class pyFTS.models.multivariate.flrg.FLRG(**kwargs)[source]

Bases: pyFTS.common.flrg.FLRG

Multivariate Fuzzy Logical Rule Group

append_rhs(fset, **kwargs)[source]
get_membership(data, variables)[source]

Returns the membership value of the FLRG for the input data

Parameters:
  • data – input data
  • sets – fuzzy sets
Returns:

the membership value

set_lhs(var, fset)[source]

pyFTS.models.multivariate.mvfts module

class pyFTS.models.multivariate.mvfts.MVFTS(**kwargs)[source]

Bases: pyFTS.common.fts.FTS

Multivariate extension of Chen’s ConventionalFTS method

append_variable(var)[source]

Append a new endogenous variable to the model

Parameters:var – variable object
Returns:
apply_transformations(data, params=None, updateUoD=False, **kwargs)[source]

Apply the data transformations for data preprocessing

Parameters:
  • data – input data
  • params – transformation parameters
  • updateUoD
  • kwargs
Returns:

preprocessed data

clone_parameters(model)[source]

Import the parameters values from other model

Parameters:model
forecast(data, **kwargs)[source]

Point forecast one step ahead

Parameters:
  • data – time series data with the minimal length equal to the max_lag of the model
  • kwargs – model specific parameters
Returns:

a list with the forecasted values

format_data(data)[source]
generate_flrg(flrs)[source]
generate_flrs(data)[source]
generate_lhs_flrs(data)[source]
train(data, **kwargs)[source]

Method specific parameter fitting

Parameters:
  • data – training time series data
  • kwargs – Method specific parameters

pyFTS.models.multivariate.variable module

class pyFTS.models.multivariate.variable.Variable(name, **kwargs)[source]

Bases: object

A variable of a fuzzy time series multivariate model. Each variable contains its own transformations and partitioners.

alias = None

A string with the alias of the variable

apply_inverse_transformations(data, **kwargs)[source]
apply_transformations(data, **kwargs)[source]
build(**kwargs)[source]
Parameters:kwargs
Returns:
data_label = None

A string with the column name on DataFrame

name = None

A string with the name of the variable

pyFTS.models.multivariate.wmvfts module

class pyFTS.models.multivariate.mvfts.MVFTS(**kwargs)[source]

Bases: pyFTS.common.fts.FTS

Multivariate extension of Chen’s ConventionalFTS method

append_variable(var)[source]

Append a new endogenous variable to the model

Parameters:var – variable object
Returns:
apply_transformations(data, params=None, updateUoD=False, **kwargs)[source]

Apply the data transformations for data preprocessing

Parameters:
  • data – input data
  • params – transformation parameters
  • updateUoD
  • kwargs
Returns:

preprocessed data

clone_parameters(model)[source]

Import the parameters values from other model

Parameters:model
forecast(data, **kwargs)[source]

Point forecast one step ahead

Parameters:
  • data – time series data with the minimal length equal to the max_lag of the model
  • kwargs – model specific parameters
Returns:

a list with the forecasted values

format_data(data)[source]
generate_flrg(flrs)[source]
generate_flrs(data)[source]
generate_lhs_flrs(data)[source]
train(data, **kwargs)[source]

Method specific parameter fitting

Parameters:
  • data – training time series data
  • kwargs – Method specific parameters