bugfixes for seasonal FTS
This commit is contained in:
parent
88d22a4482
commit
9ef5fa6cdc
@ -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))
|
||||
|
@ -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]
|
||||
|
||||
|
@ -35,3 +35,7 @@ model.fit(data)
|
||||
print(model)
|
||||
|
||||
print(model.predict(data))
|
||||
|
||||
from pyFTS.benchmarks import Measures
|
||||
|
||||
Measures.get_point_statistics(data, model)
|
Loading…
Reference in New Issue
Block a user