show best method in json
This commit is contained in:
parent
0196a478da
commit
791aec855e
@ -133,4 +133,9 @@ public abstract class Method {
|
||||
protected void validateAdditionalParams(TimeSeries timeSeries, List<MethodParamValue> parameters) throws ModelingException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public class MethodParamBruteForce {
|
||||
}
|
||||
ModelingResult bestResult = results2.stream()
|
||||
.min(Comparator.comparing(modelingResult -> modelingResult.getScore().getDoubleValue()))
|
||||
.orElse(null);
|
||||
.orElseThrow(() -> new ModelingException("Лучший метод не найден"));
|
||||
|
||||
TimeSeries forecast = bestResult.getTimeSeriesMethod().getForecast(timeSeries,
|
||||
bestResult.getParamValues(),
|
||||
|
Loading…
Reference in New Issue
Block a user