Merge branch 'master' of https://github.com/petroniocandido/pyFTS
This commit is contained in:
commit
52544aca88
@ -19,6 +19,10 @@ class HighOrderFTS(fts.FTS):
|
||||
self.detail = "Hwang"
|
||||
|
||||
def forecast(self, ndata, **kwargs):
|
||||
|
||||
if 'order' in kwargs:
|
||||
self.order = kwargs.get('order',self.order)
|
||||
self.max_lag = self.order
|
||||
|
||||
if self.sets == None:
|
||||
self.sets = self.partitioner.sets
|
||||
@ -57,4 +61,4 @@ class HighOrderFTS(fts.FTS):
|
||||
return ret
|
||||
|
||||
def train(self, data, **kwargs):
|
||||
pass
|
||||
pass
|
||||
|
@ -81,14 +81,18 @@ class ContextualMultiSeasonalFTS(sfts.SeasonalFTS):
|
||||
ndata = self.indexer.get_data(data)
|
||||
|
||||
for k in np.arange(0, len(data)):
|
||||
|
||||
if str(index[k]) in self.flrgs:
|
||||
|
||||
flrg = self.flrgs[str(index[k])]
|
||||
flrg = self.flrgs[str(index[k])]
|
||||
|
||||
d = FuzzySet.get_fuzzysets(ndata[k], self.sets, ordered_sets, alpha_cut=self.alpha_cut)
|
||||
d = FuzzySet.get_fuzzysets(ndata[k], self.sets, ordered_sets, alpha_cut=self.alpha_cut)
|
||||
|
||||
mp = self.get_midpoints(flrg, d)
|
||||
mp = self.get_midpoints(flrg, d)
|
||||
|
||||
ret.append(sum(mp) / len(mp))
|
||||
ret.append(sum(mp) / len(mp))
|
||||
else:
|
||||
ret.append(np.nan)
|
||||
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user