add calculate diff
This commit is contained in:
parent
d236081a45
commit
f4b8089f29
@ -27,6 +27,8 @@ public class AnomalyDifferenceSmoothed extends Target {
|
|||||||
ModelingResult modelingResult = timeSeriesService.smoothTimeSeries(ts, "AddTrendAddSeason");
|
ModelingResult modelingResult = timeSeriesService.smoothTimeSeries(ts, "AddTrendAddSeason");
|
||||||
var tsResult = modelingResult.getTimeSeries();
|
var tsResult = modelingResult.getTimeSeries();
|
||||||
|
|
||||||
|
double diff = anomalyPoints.getMax().getValue()-anomalyPoints.getMin().getValue();
|
||||||
|
|
||||||
for (int i = 0; i < ts.getLength(); i++) {
|
for (int i = 0; i < ts.getLength(); i++) {
|
||||||
residual.addValue(new TimeSeriesValue(ts.getValue(i).getDate(), Math.abs(ts.getNumericValue(i) - tsResult.getNumericValue(i))));
|
residual.addValue(new TimeSeriesValue(ts.getValue(i).getDate(), Math.abs(ts.getNumericValue(i) - tsResult.getNumericValue(i))));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user