Bugfix in cmsfts

This commit is contained in:
Petrônio Cândido de Lima e Silva 2018-07-03 18:57:00 -03:00 committed by GitHub
parent 07bfceae78
commit 043c28d480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,14 +81,18 @@ class ContextualMultiSeasonalFTS(sfts.SeasonalFTS):
ndata = self.indexer.get_data(data) ndata = self.indexer.get_data(data)
for k in np.arange(0, len(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 return ret