public class GTSOutliersHelper
extends java.lang.Object
| Constructor and Description |
|---|
GTSOutliersHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
doubleCheck(GeoTimeSerie gts) |
static java.util.List<java.lang.Long> |
entropyHybridTest(GeoTimeSerie gts,
int buckets_per_period,
int periods_per_piece,
int k,
double alpha)
Applying Seasonal Entropy Hybrid ESD test
This test is based on piecewise decomposition where trend components are approximated by median and seasonal components are factored by the entropy of the cycle sub-series.
|
static java.util.List<java.lang.Long> |
ESDTest(GeoTimeSerie gts,
int k,
boolean useMedian) |
static java.util.List<java.lang.Long> |
ESDTest(GeoTimeSerie gts,
int k,
boolean useMedian,
double alpha)
Applying generalized extreme Studentized deviate test using mean/std or median/mad
|
static java.util.List<java.lang.Long> |
grubbsTest(GeoTimeSerie gts,
boolean useMedian) |
static java.util.List<java.lang.Long> |
grubbsTest(GeoTimeSerie gts,
boolean useMedian,
double alpha)
Applying Grubbs' test using mean/std or median/mad
|
static java.util.List<java.lang.Long> |
hybridTest(GeoTimeSerie gts,
int buckets_per_period,
int periods_per_piece,
int k,
double alpha,
java.util.Map<java.lang.String,java.lang.Object> params)
Applying Seasonal Hybrid ESD.
|
protected static double[] |
madsigma(GeoTimeSerie gts,
boolean useMedian)
Compute mu and sigma or median and mad, given useMedian is true or false
Mad is returned modified as an estimate of sigma
|
protected static double |
max(GeoTimeSerie gts) |
protected static double |
mean(GeoTimeSerie gts) |
protected static double |
median(GeoTimeSerie gts) |
protected static double |
medianAbsoluteDeviation(GeoTimeSerie gts,
double median) |
protected static double |
min(GeoTimeSerie gts) |
static java.util.List<java.lang.Long> |
STLESDTest(GeoTimeSerie gts,
int buckets_per_period,
int k,
double alpha,
java.util.Map<java.lang.String,java.lang.Object> params)
Applying STL-ESD test.
|
static java.util.List<java.lang.Long> |
thresholdTest(GeoTimeSerie gts,
double threshold) |
static java.util.List<java.lang.Long> |
thresholdTest(GeoTimeSerie gts,
double threshold,
boolean abs)
Applying a simple threshold test.
|
static GeoTimeSerie |
zScore(GeoTimeSerie gts,
boolean useMedian,
boolean inplace)
Compute Z-score or modified Z-score
|
static java.util.List<java.lang.Long> |
zScoreTest(GeoTimeSerie gts,
boolean useMedian,
double d)
Applying Z-score test
If useMedian is true, then use modified z-score.
|
protected static void doubleCheck(GeoTimeSerie gts) throws WarpScriptException
WarpScriptExceptionprotected static double mean(GeoTimeSerie gts) throws WarpScriptException
WarpScriptExceptionprotected static double median(GeoTimeSerie gts)
protected static double medianAbsoluteDeviation(GeoTimeSerie gts, double median)
protected static double max(GeoTimeSerie gts) throws WarpScriptException
WarpScriptExceptionprotected static double min(GeoTimeSerie gts) throws WarpScriptException
WarpScriptExceptionprotected static double[] madsigma(GeoTimeSerie gts, boolean useMedian)
public static GeoTimeSerie zScore(GeoTimeSerie gts, boolean useMedian, boolean inplace) throws WarpScriptException
gts - useMedian - Should we compute Z-score using median/mad rather than mean/stdinplace - Should the output gts be the input instance or a new oneWarpScriptExceptionpublic static java.util.List<java.lang.Long> thresholdTest(GeoTimeSerie gts, double threshold, boolean abs) throws WarpScriptException
gts - threshold - abs - Should we compare threshold with absolute valueWarpScriptExceptionpublic static java.util.List<java.lang.Long> thresholdTest(GeoTimeSerie gts, double threshold) throws WarpScriptException
WarpScriptExceptionpublic static java.util.List<java.lang.Long> zScoreTest(GeoTimeSerie gts, boolean useMedian, double d) throws WarpScriptException
gts - useMedian - Should we compute Z-score using median/mad rather than mean/stdd - Threshold. Default set at 3.5WarpScriptExceptionpublic static java.util.List<java.lang.Long> grubbsTest(GeoTimeSerie gts, boolean useMedian, double alpha) throws WarpScriptException
gts - useMedian - Should the test use median/mad instead of mean/stdalpha - Significance level with which to accept or reject anomalies. Default is 0.05WarpScriptExceptionpublic static java.util.List<java.lang.Long> grubbsTest(GeoTimeSerie gts, boolean useMedian) throws WarpScriptException
WarpScriptExceptionpublic static java.util.List<java.lang.Long> ESDTest(GeoTimeSerie gts, int k, boolean useMedian, double alpha) throws WarpScriptException
gts - k - Upper bound of suspected number of outliersuseMedian - Should the test use median/mad instead of mean/stdalpha - Significance level with which to accept or reject anomalies. Default is 0.05WarpScriptExceptionpublic static java.util.List<java.lang.Long> ESDTest(GeoTimeSerie gts, int k, boolean useMedian) throws WarpScriptException
WarpScriptExceptionpublic static java.util.List<java.lang.Long> STLESDTest(GeoTimeSerie gts, int buckets_per_period, int k, double alpha, java.util.Map<java.lang.String,java.lang.Object> params) throws WarpScriptException
gts - k - Upper bound of suspected number of outliersalpha - Significance level with which to accept or reject anomalies. Default is 0.05params - Optional map of parameters used for stl callsWarpScriptExceptionpublic static java.util.List<java.lang.Long> hybridTest(GeoTimeSerie gts, int buckets_per_period, int periods_per_piece, int k, double alpha, java.util.Map<java.lang.String,java.lang.Object> params) throws WarpScriptException
gts - k - Upper bound of suspected number of outliersalpha - Significance level with which to accept or reject anomalies. Default is 0.05params - Optional map of parameters used for stl callsWarpScriptExceptionpublic static java.util.List<java.lang.Long> entropyHybridTest(GeoTimeSerie gts, int buckets_per_period, int periods_per_piece, int k, double alpha) throws WarpScriptException
gts - k - Upper bound of suspected number of outliersalpha - Significance level with which to accept or reject anomalies. Default is 0.05WarpScriptException