diff --git a/pyFTS/benchmarks/Measures.py b/pyFTS/benchmarks/Measures.py index b4cce36..00f8e4e 100644 --- a/pyFTS/benchmarks/Measures.py +++ b/pyFTS/benchmarks/Measures.py @@ -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)) diff --git a/pyFTS/models/seasonal/sfts.py b/pyFTS/models/seasonal/sfts.py index 0747ae3..f93aa91 100644 --- a/pyFTS/models/seasonal/sfts.py +++ b/pyFTS/models/seasonal/sfts.py @@ -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] diff --git a/pyFTS/tests/sfts.py b/pyFTS/tests/sfts.py index 855e403..bc57cc4 100644 --- a/pyFTS/tests/sfts.py +++ b/pyFTS/tests/sfts.py @@ -34,4 +34,8 @@ model.fit(data) print(model) -print(model.predict(data)) \ No newline at end of file +print(model.predict(data)) + +from pyFTS.benchmarks import Measures + +Measures.get_point_statistics(data, model) \ No newline at end of file