Reviewed-on: #9
This commit is contained in:
commit
35d88d4aa6
@ -99,11 +99,10 @@ public class IndexController {
|
||||
}
|
||||
|
||||
private List<String> getDatesForChart(TimeSeries timeSeries, TimeSeries forecast) {
|
||||
return Stream.concat(timeSeries.getValues().stream(), forecast.getValues().stream())
|
||||
return Stream.concat(timeSeries.getValues().stream(), forecast.getValues().stream().skip(1))
|
||||
.map(TimeSeriesValue::getDate)
|
||||
.sorted()
|
||||
.map(date -> date.format(DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT)))
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ import java.lang.reflect.InvocationTargetException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
@ -51,7 +52,8 @@ class MethodParamBruteForce {
|
||||
}
|
||||
|
||||
Map<LocalDateTime, Double> tsValues = timeSeries.getValues().stream()
|
||||
.collect(Collectors.toMap(TimeSeriesValue::getDate, TimeSeriesValue::getValue));
|
||||
.collect(Collectors.toMap(TimeSeriesValue::getDate, TimeSeriesValue::getValue,
|
||||
(oldValue, newValue) -> oldValue, LinkedHashMap::new));
|
||||
|
||||
for (Method method : methods) {
|
||||
List<List<MethodParamValue>> availableParametersValues = getAvailableParametersValues(timeSeries, method.getAvailableParameters());
|
||||
@ -134,7 +136,8 @@ class MethodParamBruteForce {
|
||||
List<ModelingResult> results2 = new CopyOnWriteArrayList<>();
|
||||
|
||||
Map<LocalDateTime, Double> tsValues = timeSeries.getValues().stream()
|
||||
.collect(Collectors.toMap(TimeSeriesValue::getDate, TimeSeriesValue::getValue));
|
||||
.collect(Collectors.toMap(TimeSeriesValue::getDate, TimeSeriesValue::getValue,
|
||||
(oldValue, newValue) -> oldValue, LinkedHashMap::new));
|
||||
|
||||
for (Method method : methods) {
|
||||
List<List<MethodParamValue>> availableParametersValues = getAvailableParametersValues(timeSeries, method.getAvailableParameters());
|
||||
|
Loading…
Reference in New Issue
Block a user