diff --git a/src/main/java/ru/ulstu/method/Method.java b/src/main/java/ru/ulstu/method/Method.java index 9a43772..4451eb1 100644 --- a/src/main/java/ru/ulstu/method/Method.java +++ b/src/main/java/ru/ulstu/method/Method.java @@ -7,8 +7,7 @@ package ru.ulstu.method; import com.fasterxml.jackson.annotation.JsonIgnore; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import com.fasterxml.jackson.annotation.JsonProperty; import ru.ulstu.TimeSeriesUtils; import ru.ulstu.datamodel.Model; import ru.ulstu.datamodel.exception.ForecastValidateException; @@ -24,8 +23,6 @@ import java.util.List; * Наиболее общая логика моделировании и прогнозирования временных рядов */ public abstract class Method { - private static final Logger LOGGER = LoggerFactory.getLogger(Method.class); - @JsonIgnore public abstract List getAvailableParameters(); @@ -135,6 +132,7 @@ public abstract class Method { } @Override + @JsonProperty("name") public String toString() { return getClass().getSimpleName(); } diff --git a/src/main/java/ru/ulstu/score/Smape.java b/src/main/java/ru/ulstu/score/Smape.java index 1b1655d..4b5af9e 100644 --- a/src/main/java/ru/ulstu/score/Smape.java +++ b/src/main/java/ru/ulstu/score/Smape.java @@ -32,7 +32,7 @@ public class Smape extends ScoreMethod { sum += abs(modelValue.getValue() - actualValue) / ((abs(actualValue) + abs(modelValue.getValue())) / 2); } - sum = Math.round(sum * 100) / 100; + sum = (double) Math.round(sum * 100) / 100; return sum * 100 / model.getLength(); } } \ No newline at end of file diff --git a/src/main/java/ru/ulstu/service/TimeSeriesService.java b/src/main/java/ru/ulstu/service/TimeSeriesService.java index e1fff5d..f548bf0 100644 --- a/src/main/java/ru/ulstu/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/service/TimeSeriesService.java @@ -6,8 +6,6 @@ package ru.ulstu.service; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import ru.ulstu.datamodel.ModelingResult; import ru.ulstu.datamodel.exception.ModelingException; @@ -19,7 +17,6 @@ import java.util.concurrent.ExecutionException; @Service public class TimeSeriesService { - private static final Logger LOGGER = LoggerFactory.getLogger(TimeSeriesService.class); private final MethodParamBruteForce methodParamBruteForce; public TimeSeriesService(MethodParamBruteForce methodParamBruteForce) {