com.github.servicenow.ds.stats.stl
Class SeasonalTrendLoess
- java.lang.Object
-
- com.github.servicenow.ds.stats.stl.SeasonalTrendLoess
-
public class SeasonalTrendLoess extends java.lang.ObjectJava implementation of the Seasonal-Trend-Loess algorithm for evenly spaced data. This is basically a direct port of the RATFOR from the netlib stl package.Created by Jim Crotinger on 18-Apr-2016.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classSeasonalTrendLoess.BuilderBuilder class for SeasonalTrendLoess decompositionstatic classSeasonalTrendLoess.DecompositionSimple class to hold the results of the STL decomposition.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description SeasonalTrendLoess.Decompositiondecompose()Decompose the input data into the seasonal, trend and residual components.static SeasonalTrendLoess.DecompositionperformPeriodicDecomposition(double[] data, int periodicity)Factory method to perform a non-robust STL decomposition enforcing strict periodicity.static SeasonalTrendLoess.DecompositionperformRobustPeriodicDecomposition(double[] data, int periodicity)Factory method to perform a (somewhat) robust STL decomposition enforcing strict periodicity.java.lang.StringtoString()
-
-
-
Method Detail
-
performPeriodicDecomposition
public static SeasonalTrendLoess.Decomposition performPeriodicDecomposition(double[] data, int periodicity)
Factory method to perform a non-robust STL decomposition enforcing strict periodicity.Meant for diagnostic purposes only.
- Parameters:
data- the data to analyzeperiodicity- the (suspected) periodicity of the data- Returns:
- SeasonalTrendLoess object with the decomposition already performed.
-
performRobustPeriodicDecomposition
public static SeasonalTrendLoess.Decomposition performRobustPeriodicDecomposition(double[] data, int periodicity)
Factory method to perform a (somewhat) robust STL decomposition enforcing strict periodicity.Meant for diagnostic purposes only.
- Parameters:
data- the data to analyzeperiodicity- the (suspected) periodicity of the data- Returns:
- SeasonalTrendLoess object with the decomposition already performed.
-
decompose
public SeasonalTrendLoess.Decomposition decompose()
Decompose the input data into the seasonal, trend and residual components.- Returns:
- the STL decomposition
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG