fix forecast
This commit is contained in:
parent
0021899382
commit
f7666b085e
@ -68,9 +68,13 @@ public class MethodParamBruteForce {
|
|||||||
ModelingResult bestResult = results2.stream()
|
ModelingResult bestResult = results2.stream()
|
||||||
.min(Comparator.comparing(modelingResult -> modelingResult.getScore().getDoubleValue()))
|
.min(Comparator.comparing(modelingResult -> modelingResult.getScore().getDoubleValue()))
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
return new ModelingResult(bestResult.getTimeSeriesMethod().getForecast(timeSeries,
|
|
||||||
|
TimeSeries forecast = bestResult.getTimeSeriesMethod().getForecast(timeSeries,
|
||||||
bestResult.getParamValues(),
|
bestResult.getParamValues(),
|
||||||
countPoints),
|
countPoints);
|
||||||
|
forecast.getValue(0).setValue(timeSeries.getNumericValue(timeSeries.getLength() - 1));
|
||||||
|
|
||||||
|
return new ModelingResult(forecast,
|
||||||
bestResult.getParamValues(),
|
bestResult.getParamValues(),
|
||||||
bestResult.getScore(),
|
bestResult.getScore(),
|
||||||
bestResult.getTimeSeriesMethod());
|
bestResult.getTimeSeriesMethod());
|
||||||
|
Loading…
Reference in New Issue
Block a user