public class TimeSeriesUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TimeSeriesUtil.Gap |
static class |
TimeSeriesUtil.Outlier |
Constructor and Description |
---|
TimeSeriesUtil() |
Modifier and Type | Method and Description |
---|---|
static StatsIndex |
diff(StatsIndex series1,
StatsIndex series2) |
static double |
getAverageMonth(StatsIndex series,
String startMonth,
String endMonth,
boolean allShouldBeThere,
int inputRouding) |
static StatsIndex |
getMovingAverageMonth(StatsIndex seriesM,
int w) |
static StatsIndex |
getMovingStdMonth(StatsIndex seriesM,
int w) |
static double |
getStdMonth(StatsIndex series,
String startMonth,
String endMonth,
boolean allShouldBeThere) |
static ArrayList<String> |
getTimeList(StatsIndex series) |
static boolean |
isEmpty(StatsIndex series,
int year) |
static void |
multiplyYearValues(StatsIndex series,
int year,
double factor) |
static ArrayList<TimeSeriesUtil.Gap> |
performGapAnalysis(StatsIndex series,
String label) |
static ArrayList<TimeSeriesUtil.Outlier> |
performOutlierDetection(StatsIndex series,
int w,
double thNbStd,
double diffTh,
String label) |
static ArrayList<TimeSeriesUtil.Outlier> |
performOutlierDetection(StatsIndex series,
int w,
String label) |
static void |
printSeries(Collection<Stat> series) |
static void |
printSeries(StatsIndex series) |
static ArrayList<Stat> |
sort(Collection<Stat> series) |
public static void printSeries(StatsIndex series)
public static void printSeries(Collection<Stat> series)
public static ArrayList<Stat> sort(Collection<Stat> series)
public static double getAverageMonth(StatsIndex series, String startMonth, String endMonth, boolean allShouldBeThere, int inputRouding)
public static double getStdMonth(StatsIndex series, String startMonth, String endMonth, boolean allShouldBeThere)
public static ArrayList<String> getTimeList(StatsIndex series)
public static StatsIndex getMovingAverageMonth(StatsIndex seriesM, int w)
public static StatsIndex diff(StatsIndex series1, StatsIndex series2)
public static StatsIndex getMovingStdMonth(StatsIndex seriesM, int w)
public static ArrayList<TimeSeriesUtil.Gap> performGapAnalysis(StatsIndex series, String label)
series
- The time series.label
- A label to identify the time series.public static ArrayList<TimeSeriesUtil.Outlier> performOutlierDetection(StatsIndex series, int w, double thNbStd, double diffTh, String label)
series
- The time series.w
- The half-width of the smoothing window for the trend construction and the dispersion calculation. Advised value: 6 for monthly data.thNbStd
- The number of STD used to consider a value as possible outlier. Advised value: 3.diffTh
- The minimal difference to consider a value as possible outlier. Advised value: 0.label
- A label to identify the time series.public static ArrayList<TimeSeriesUtil.Outlier> performOutlierDetection(StatsIndex series, int w, String label)
public static boolean isEmpty(StatsIndex series, int year)
public static void multiplyYearValues(StatsIndex series, int year, double factor)
Copyright © 2020. All rights reserved.