bugfixes for seasonal FTS

This commit is contained in:
Petrônio Cândido 2018-06-23 10:02:07 -03:00
parent 88d22a4482
commit 9ef5fa6cdc
3 changed files with 7 additions and 6 deletions

View File

@ -323,10 +323,7 @@ def get_point_statistics(data, model, **kwargs):
if not isinstance(forecasts, (list, np.ndarray)):
forecasts = [forecasts]
if model.has_seasonality:
nforecasts = np.array(forecasts)
else:
nforecasts = np.array(forecasts[:-1])
nforecasts = np.array(forecasts[:-1])
ret.append(np.round(rmse(ndata[model.order:], nforecasts), 2))
ret.append(np.round(smape(ndata[model.order:], nforecasts), 2))

View File

@ -80,7 +80,7 @@ class SeasonalFTS(fts.FTS):
ret = []
for k in np.arange(1, l):
for k in np.arange(0, l):
season = self.indexer.get_season_by_index(k)[0]

View File

@ -34,4 +34,8 @@ model.fit(data)
print(model)
print(model.predict(data))
print(model.predict(data))
from pyFTS.benchmarks import Measures
Measures.get_point_statistics(data, model)