return new CrostonForecaster(history, alpha); case CS: return new CSForecaster(ForecastMethod.getLastXofTS(history, 30), alpha); case ETS: return new ETSForecaster(history, alpha); case MEAN: return new MeanForecaster(ForecastMethod.getLastXofTS(history, 10), alpha); case MEANJAVA: return new MeanForecasterJava(ForecastMethod.getLastXofTS(history, 10)); // confidence level? #1346 case NAIVE: return new NaiveForecaster(history, alpha); return new SESRForecaster(history, alpha); default: throw new IllegalArgumentException("No forecaster defined for " + this.toString());
@Override public Configuration getCurrentConfiguration() { final Configuration configuration = new Configuration(); configuration.setProperty(CONFIG_PROPERTY_NAME_DELTA_TIME, Long.toString(this.deltat.get())); configuration.setProperty(CONFIG_PROPERTY_NAME_DELTA_UNIT, this.tunit.name()); configuration.setProperty(CONFIG_PROPERTY_NAME_FC_METHOD, this.forecastMethod.get().name()); configuration.setProperty(CONFIG_PROPERTY_NAME_TS_WINDOW_CAPACITY, Integer.toString(this.timeSeriesWindowCapacity.get())); configuration.setProperty(CONFIG_PROPERTY_NAME_FC_CONFIDENCE, Integer.toString(this.forecastConfidence.get())); return configuration; }
private void setFieldsByConfiguration(final Configuration config, final boolean update) { if (!update || this.isPropertyUpdateable(CONFIG_PROPERTY_NAME_DELTA_TIME)) { this.deltat = new AtomicLong(config.getLongProperty(CONFIG_PROPERTY_NAME_DELTA_TIME)); } if (!update || this.isPropertyUpdateable(CONFIG_PROPERTY_NAME_DELTA_UNIT)) { this.tunit = TimeUnit.valueOf(config.getStringProperty(CONFIG_PROPERTY_NAME_DELTA_UNIT)); } if (!update || this.isPropertyUpdateable(CONFIG_PROPERTY_NAME_FC_METHOD)) { this.forecastMethod.set(ForecastMethod.valueOf(config.getStringProperty(CONFIG_PROPERTY_NAME_FC_METHOD))); } if (!update || this.isPropertyUpdateable(CONFIG_PROPERTY_NAME_TS_WINDOW_CAPACITY)) { this.timeSeriesWindowCapacity = new AtomicInteger(config.getIntProperty(CONFIG_PROPERTY_NAME_TS_WINDOW_CAPACITY)); } if (!update || this.isPropertyUpdateable(CONFIG_PROPERTY_NAME_FC_CONFIDENCE)) { this.forecastConfidence = new AtomicInteger(config.getIntProperty(CONFIG_PROPERTY_NAME_FC_CONFIDENCE)); } }
return new SESRForecaster(history); default: throw new IllegalArgumentException("No forecaster defined for " + this.toString());
currentWindow.append(input.getValue()); final IForecaster<Double> forecaster = this.forecastMethod.get().getForecaster(currentWindow, this.forecastConfidence.get());
return new SESRForecaster(history); default: throw new IllegalArgumentException("No forecaster defined for " + this.toString());
currentWindow.append(input.getValue()); final IForecaster<Double> forecaster = this.forecastMethod.get().getForecaster(currentWindow, this.forecastConfidence.get());
return new CrostonForecaster(history, alpha); case CS: return new CSForecaster(ForecastMethod.getLastXofTS(history, 30), alpha); case ETS: return new ETSForecaster(history, alpha); case MEAN: return new MeanForecaster(ForecastMethod.getLastXofTS(history, 10), alpha); case MEANJAVA: return new MeanForecasterJava(ForecastMethod.getLastXofTS(history, 10)); // confidence level? #1346 case NAIVE: return new NaiveForecaster(history, alpha); return new SESRForecaster(history, alpha); default: throw new IllegalArgumentException("No forecaster defined for " + this.toString());
@Override public Configuration getCurrentConfiguration() { final Configuration configuration = new Configuration(); configuration.setProperty(CONFIG_PROPERTY_NAME_DELTA_TIME, Long.toString(this.deltat.get())); configuration.setProperty(CONFIG_PROPERTY_NAME_DELTA_UNIT, this.tunit.name()); configuration.setProperty(CONFIG_PROPERTY_NAME_FC_METHOD, this.forecastMethod.get().name()); configuration.setProperty(CONFIG_PROPERTY_NAME_TS_WINDOW_CAPACITY, Integer.toString(this.timeSeriesWindowCapacity.get())); configuration.setProperty(CONFIG_PROPERTY_NAME_FC_CONFIDENCE, Integer.toString(this.forecastConfidence.get())); return configuration; }
private void setFieldsByConfiguration(final Configuration config, final boolean update) { if (!update || this.isPropertyUpdateable(CONFIG_PROPERTY_NAME_DELTA_TIME)) { this.deltat = new AtomicLong(config.getLongProperty(CONFIG_PROPERTY_NAME_DELTA_TIME)); } if (!update || this.isPropertyUpdateable(CONFIG_PROPERTY_NAME_DELTA_UNIT)) { this.tunit = TimeUnit.valueOf(config.getStringProperty(CONFIG_PROPERTY_NAME_DELTA_UNIT)); } if (!update || this.isPropertyUpdateable(CONFIG_PROPERTY_NAME_FC_METHOD)) { this.forecastMethod.set(ForecastMethod.valueOf(config.getStringProperty(CONFIG_PROPERTY_NAME_FC_METHOD))); } if (!update || this.isPropertyUpdateable(CONFIG_PROPERTY_NAME_TS_WINDOW_CAPACITY)) { this.timeSeriesWindowCapacity = new AtomicInteger(config.getIntProperty(CONFIG_PROPERTY_NAME_TS_WINDOW_CAPACITY)); } if (!update || this.isPropertyUpdateable(CONFIG_PROPERTY_NAME_FC_CONFIDENCE)) { this.forecastConfidence = new AtomicInteger(config.getIntProperty(CONFIG_PROPERTY_NAME_FC_CONFIDENCE)); } }