# pyFTS.models.multivariate package

## Module contents

Multivariate Fuzzy Time Series methods

## Submodules

## pyFTS.models.multivariate.FLR module

class `pyFTS.models.multivariate.FLR.``FLR`

  Bases: `object`

  Multivariate Fuzzy Logical Relationship

  `set_lhs`(var, set)
  `set_rhs`(set)

## pyFTS.models.multivariate.common module

class `pyFTS.models.multivariate.common.``MultivariateFuzzySet`(name, **kwargs)

  Bases: `pyFTS.common.Composite.FuzzySet`

  Multivariate Composite Fuzzy Set

  `append_set`(variable, set)

    Appends a new fuzzy set from a new variable

    Parameters: | variable – an multivariate.variable instance set – an common.FuzzySet instance

  `membership`(x)

    Calculate the membership value of a given input

    Parameters: | x – input value
    Returns: | membership value of x at this fuzzy set

  `set_target_variable`(variable)

`pyFTS.models.multivariate.common.``fuzzyfy_instance`(data_point, var)

`pyFTS.models.multivariate.common.``fuzzyfy_instance_clustered`(data_point, cluster, **kwargs)

## pyFTS.models.multivariate.variable module

class `pyFTS.models.multivariate.variable.``Variable`(name, **kwargs)

  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)
  `apply_transformations`(data, **kwargs)
  `build`(**kwargs)

    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.flrg module

class `pyFTS.models.multivariate.flrg.``FLRG`(**kwargs)

  Bases: `pyFTS.common.flrg.FLRG`

  Multivariate Fuzzy Logical Rule Group

  `append_rhs`(fset, **kwargs)
  `get_membership`(data, variables)

    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)

## pyFTS.models.multivariate.mvfts module

class `pyFTS.models.multivariate.mvfts.``MVFTS`(**kwargs)

  Bases: `pyFTS.common.fts.FTS`

  Multivariate extension of Chen’s ConventionalFTS method

  `append_variable`(var)

    Append a new endogenous variable to the model

    Parameters: | var – variable object
    Returns: |

  `apply_transformations`(data, params=None, updateUoD=False, **kwargs)

    Apply the data transformations for data preprocessing

    Parameters: | data – input data params – transformation parameters updateUoD – kwargs –
    Returns: | preprocessed data

  `clone_parameters`(model)

    Import the parameters values from other model

    Parameters: | model –

  `forecast`(data, **kwargs)

    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

  `forecast_ahead`(data, steps, **kwargs)

    Point forecast n steps ahead

    Parameters: | data – time series data with the minimal length equal to the max_lag of the model steps – the number of steps ahead to forecast start – in the multi step forecasting, the index of the data where to start forecasting
    Returns: | a list with the forecasted values

  `format_data`(data)
  `generate_flrg`(flrs)
  `generate_flrs`(data)
  `generate_lhs_flrs`(data)
  `train`(data, **kwargs)

    Method specific parameter fitting

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

## pyFTS.models.multivariate.wmvfts module

class `pyFTS.models.multivariate.wmvfts.``WeightedFLRG`(**kwargs)

  Bases: `pyFTS.models.multivariate.flrg.FLRG`

  Weighted Multivariate Fuzzy Logical Rule Group

  `append_rhs`(fset, **kwargs)
  `get_midpoint`(sets)

    Returns the midpoint value for the RHS fuzzy sets

    Parameters: | sets – fuzzy sets
    Returns: | the midpoint value

  `weights`()

class `pyFTS.models.multivariate.wmvfts.``WeightedMVFTS`(**kwargs)

  Bases: `pyFTS.models.multivariate.mvfts.MVFTS`

  Weighted Multivariate FTS

  `generate_flrg`(flrs)

## pyFTS.models.multivariate.cmvfts module

class `pyFTS.models.multivariate.cmvfts.``ClusteredMVFTS`(**kwargs)

  Bases: `pyFTS.models.multivariate.mvfts.MVFTS`

  Meta model for multivariate, high order, clustered multivariate FTS

  `check_data`(data)
  `cluster` = None

    The trained clusterer

  `cluster_method` = None

    The cluster method to be called when a new model is build

  `cluster_params` = None

    The cluster method parameters

  `forecast`(ndata, **kwargs)

    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

  `forecast_multivariate`(data, **kwargs)

    Multivariate forecast one step ahead

    Parameters: | data – Pandas dataframe with one column for each variable and with the minimal length equal to the max_lag of the model kwargs – model specific parameters
    Returns: | a Pandas Dataframe object representing the forecasted values for each variable

  `fts_method` = None

    The FTS method to be called when a new model is build

  `fts_params` = None

    The FTS method specific parameters

  `fuzzyfy`(data)
  `model` = None

    The most recent trained model

  `train`(data, **kwargs)

    Method specific parameter fitting

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