GranularWMVFTS

This commit is contained in:
Petrônio Cândido 2019-04-12 11:48:19 -03:00
parent 4b07599c43
commit f63b582b30
2 changed files with 27 additions and 1 deletions

View File

@ -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)

View File

@ -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)