diff --git a/pyFTS/models/multivariate/cmvfts.py b/pyFTS/models/multivariate/cmvfts.py index 1f5db04..173be22 100644 --- a/pyFTS/models/multivariate/cmvfts.py +++ b/pyFTS/models/multivariate/cmvfts.py @@ -8,7 +8,7 @@ from pyFTS.models.multivariate import mvfts, grid, common class ClusteredMVFTS(mvfts.MVFTS): """ - Meta model for multivariate, high order, clustered multivariate FTS + Meta model for high order, clustered multivariate FTS """ def __init__(self, **kwargs): super(ClusteredMVFTS, self).__init__(**kwargs) diff --git a/pyFTS/models/multivariate/granular.py b/pyFTS/models/multivariate/granular.py new file mode 100644 index 0000000..c9dbbdb --- /dev/null +++ b/pyFTS/models/multivariate/granular.py @@ -0,0 +1,26 @@ +from pyFTS.models.multivariate import cmvfts, grid +from pyFTS.models import hofts + + +class GranularWMVFTS(cmvfts.ClusteredMVFTS): + """ + Granular multivariate weighted high order FTS + """ + + def __init__(self, **kwargs): + super(GranularWMVFTS, self).__init__(**kwargs) + + self.fts_method = hofts.WeightedHighOrderFTS + self.model = None + """The most recent trained model""" + self.knn = kwargs.get('knn', 2) + self.order = kwargs.get("order", 2) + self.shortname = "GranularWMVFTS" + self.name = "Granular Weighted Multivariate FTS" + + def train(self, data, **kwargs): + self.partitioner = grid.IncrementalGridCluster( + explanatory_variables=self.explanatory_variables, + target_variable=self.target_variable) + super.train(data,**kwargs) +