diff --git a/pyFTS/models/ensemble/ensemble.py b/pyFTS/models/ensemble/ensemble.py index 28ceb8c..be01293 100644 --- a/pyFTS/models/ensemble/ensemble.py +++ b/pyFTS/models/ensemble/ensemble.py @@ -276,13 +276,15 @@ class EnsembleFTS(fts.FTS): ''' lags = [] for i in np.arange(0, self.order): - lags.append(sample[k - self.order]) + lags.append(sample[i - self.order]) + + print(k, lags) # Trace the possible paths for path in product(*lags): forecasts.extend(self.get_models_forecasts(path)) - sample.append(sampler(forecasts, np.arange(0.1, 1, 0.1))) + sample.append(sampler(forecasts, np.arange(0.05, .99, 0.1))) if alpha is None: forecasts = np.ravel(forecasts).tolist() diff --git a/pyFTS/tests/ensemble.py b/pyFTS/tests/ensemble.py index 5edd239..8eb0e24 100644 --- a/pyFTS/tests/ensemble.py +++ b/pyFTS/tests/ensemble.py @@ -29,7 +29,7 @@ for k in [15, 25, 35]: model.append_model(tmp) -forecasts = model.predict(data, type='distribution', smooth='histogram', steps_ahead=10) +forecasts = model.predict(data, type='distribution', smooth='histogram', steps_ahead=5) from pyFTS.benchmarks import benchmarks as bchmk