Package ai.libs.jaicore.ml.tsc.features
Class TimeSeriesFeature
- java.lang.Object
-
- ai.libs.jaicore.ml.tsc.features.TimeSeriesFeature
-
public class TimeSeriesFeature extends java.lang.ObjectClass calculating features (e. g. mean, stddev or slope) on given subsequences of time series. Used e. g. forTimeSeriesTreeClassifierclassifier.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTimeSeriesFeature.FeatureTypeFeature types used within the time series tree.
-
Field Summary
Fields Modifier and Type Field Description static intNUM_FEATURE_TYPESNumber of features used within the time series tree.
-
Constructor Summary
Constructors Constructor Description TimeSeriesFeature()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublecalculateFeature(TimeSeriesFeature.FeatureType fType, double[] vector, int t1, int t2, boolean useBiasCorrection)Function calculating the feature specified by the feature typefTypefor a given instancevectorof the interval [t1,t2].static double[]getFeatures(double[] vector, int t1, int t2, boolean useBiasCorrection)Function calculating all features occurring inTimeSeriesFeature.FeatureTypeat once using an online calculation approach for mean, standard deviation and the slope.
-
-
-
Method Detail
-
getFeatures
public static double[] getFeatures(double[] vector, int t1, int t2, boolean useBiasCorrection)Function calculating all features occurring inTimeSeriesFeature.FeatureTypeat once using an online calculation approach for mean, standard deviation and the slope.- Parameters:
vector- The instance's vector which is used to calculate the featurest1- Start of the intervalt2- End of the interval (inclusive)useBiasCorrection- Indicator whether the bias (Bessel's) correction should be used for the standard deviation calculation- Returns:
- Returns an double array of the size
TimeSeriesTreeLearningAlgorithm#NUM_FEATURE_TYPESstoring the generated feature values.
-
calculateFeature
public static double calculateFeature(TimeSeriesFeature.FeatureType fType, double[] vector, int t1, int t2, boolean useBiasCorrection)
Function calculating the feature specified by the feature typefTypefor a given instancevectorof the interval [t1,t2].- Parameters:
fType- The feature type to be calculatedinstance- The instance's vector which values are usedt1- Start of the intervalt2- End of the interval (inclusive)useBiasCorrection- Indicator whether the bias (Bessel's) correction should be used for the standard deviation calculation- Returns:
- Returns the calculated feature for the specific instance and interval
-
-