com.github.servicenow.ds.stats.stl
Class StlFitStats
- java.lang.Object
-
- com.github.servicenow.ds.stats.stl.StlFitStats
-
public class StlFitStats extends java.lang.ObjectStlFitStats analyzes an STL decomposition, computing basic statistics for the original data and the decomposition. Created by Jim Crotinger on 1-Jun-2016
-
-
Constructor Summary
Constructors Constructor and Description StlFitStats(SeasonalTrendLoess.Decomposition stl)Analyze the STL decomposition, computing basic statistics for the original data and the decomposition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetDataMean()Get the mean of the data.doublegetDataStdDev()Get the standard deviation of the data.doublegetDataVariance()Get the variance of the data.doublegetDeSeasonalMean()Get the deseasonalized mean.doublegetDeSeasonalVariance()Get the deseasonalized variance.doublegetDeTrendMean()Get the deseasonalized mean.doublegetDeTrendVariance()Get the deseasonalized variance.doublegetEstimatedVarianceOfResidualSampleVariance()Get the estimated variance of the residual sample variance.doublegetResidualLogLikelihood()Get the residual log likelihood, evaluated when the variance is the MLE variance of the residual given that the expected residual mean is zero.doublegetResidualLogLikelihood(double sigma)Compute the residual log likelihood of the residual with the specified standard deviation.doublegetResidualMean()Get the mean of the residual.doublegetResidualStdDev()Get the standard deviation of the residual.doublegetResidualVariance()Get the variance of the residual.doublegetSeasonalMean()Get the mean of the seasonal component.doublegetSeasonalRange()Get the range (max - min) of the seasonal component.doublegetSeasonalStdDev()Get the standard deviation of the seasonal component.doublegetSeasonalVariance()Get the variance of the seasonal component.doublegetSeasonalZScore()Get a Z-Score for the residual variance with no seasonality relative to the statistics from the STL residual.doublegetTrendinessZScore()Get a Z-Score for the residual variance with no trend relative to the statistics from the STL residual.doublegetTrendMean()Get the mean of the trend.doublegetTrendRange()Get the range (max - min) of the trend.java.lang.StringtoString()
-
-
-
Constructor Detail
-
StlFitStats
public StlFitStats(SeasonalTrendLoess.Decomposition stl)
Analyze the STL decomposition, computing basic statistics for the original data and the decomposition.- Parameters:
stl- a SeasonalTrendLoess object after the decomposition is performed
-
-
Method Detail
-
getTrendMean
public double getTrendMean()
Get the mean of the trend.- Returns:
- the mean value of the trend
-
getTrendRange
public double getTrendRange()
Get the range (max - min) of the trend.- Returns:
- the range of the trend
-
getDataMean
public double getDataMean()
Get the mean of the data.- Returns:
- the mean value of the data
-
getDataVariance
public double getDataVariance()
Get the variance of the data.- Returns:
- the variance of the data
-
getDataStdDev
public double getDataStdDev()
Get the standard deviation of the data.- Returns:
- the standard deviation of the data
-
getSeasonalMean
public double getSeasonalMean()
Get the mean of the seasonal component. Should be near zero if the length is an even multiple of the period.- Returns:
- the mean value of the seasonal component
-
getSeasonalVariance
public double getSeasonalVariance()
Get the variance of the seasonal component.- Returns:
- the variance of the seasonal component
-
getSeasonalStdDev
public double getSeasonalStdDev()
Get the standard deviation of the seasonal component.- Returns:
- the standard deviation of the seasonal component
-
getSeasonalRange
public double getSeasonalRange()
Get the range (max - min) of the seasonal component.- Returns:
- the range of the seasonal component
-
getResidualMean
public double getResidualMean()
Get the mean of the residual. Should be near zero.- Returns:
- the mean of the residual
-
getResidualVariance
public double getResidualVariance()
Get the variance of the residual.- Returns:
- the variance of the residual
-
getResidualStdDev
public double getResidualStdDev()
Get the standard deviation of the residual.- Returns:
- the standard deviation of the residual
-
getDeSeasonalMean
public double getDeSeasonalMean()
Get the deseasonalized mean.- Returns:
- the mean of the data after the seasonal component is removed.
-
getDeSeasonalVariance
public double getDeSeasonalVariance()
Get the deseasonalized variance. This is the same as the trend-free variance since if the trend is constant it will drop out of the variance.- Returns:
- the variance of the data after the seasonal component is removed.
-
getDeTrendMean
public double getDeTrendMean()
Get the deseasonalized mean.- Returns:
- the mean of the data after the seasonal component is removed.
-
getDeTrendVariance
public double getDeTrendVariance()
Get the deseasonalized variance. This is the same as the trend-free variance since if the trend is constant it will drop out of the variance.- Returns:
- the variance of the data after the seasonal component is removed.
-
getEstimatedVarianceOfResidualSampleVariance
public double getEstimatedVarianceOfResidualSampleVariance()
Get the estimated variance of the residual sample variance. Based on the assumption that the residuals are normal.- Returns:
- the estimate of the variance of the residual sample variance.
-
getTrendinessZScore
public double getTrendinessZScore()
Get a Z-Score for the residual variance with no trend relative to the statistics from the STL residual.- Returns:
- the 'trend Z-Score'
-
getSeasonalZScore
public double getSeasonalZScore()
Get a Z-Score for the residual variance with no seasonality relative to the statistics from the STL residual.- Returns:
- the 'seasonal Z-Score'
-
getResidualLogLikelihood
public double getResidualLogLikelihood()
Get the residual log likelihood, evaluated when the variance is the MLE variance of the residual given that the expected residual mean is zero.- Returns:
- log-likelihood
-
getResidualLogLikelihood
public double getResidualLogLikelihood(double sigma)
Compute the residual log likelihood of the residual with the specified standard deviation.- Parameters:
sigma- standard deviation- Returns:
- residual log-likelihood
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG