/* * Copyright (C) 2021 Anton Romanov - All Rights Reserved * You may use, distribute and modify this code, please write to: romanov73@gmail.com. * */ package ru.ulstu.method.exponential.notrendnoseason; import ru.ulstu.datamodel.ts.TimeSeries; import ru.ulstu.method.MethodParamValue; import ru.ulstu.method.MethodParameter; import ru.ulstu.method.exponential.parameter.Alpha; import ru.ulstu.method.exponential.parameter.ExponentialMethodParamValue; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class NoTrendNoSeasonModel extends ru.ulstu.datamodel.Model { private final ExponentialMethodParamValue alpha = new ExponentialMethodParamValue<>(Alpha.getInstance(), 0.5); private final List smoothedComponent = new ArrayList<>(); public NoTrendNoSeasonModel(TimeSeries ts, List parameters) { super(ts); for (MethodParamValue parameter : parameters) { if (parameter.getParameter() instanceof Alpha) { alpha.setValue(parameter.getValue()); } } } public List getSmoothedComponent() { return smoothedComponent; } public ExponentialMethodParamValue getAlpha() { return alpha; } public static List getAvailableParameters() { return Collections.singletonList(Alpha.getInstance()); } }