public class TimeSeriesBagOfFeaturesClassifier extends ASimplifiedTSClassifier<java.lang.Integer>
classMapper, trained| Constructor and Description |
|---|
TimeSeriesBagOfFeaturesClassifier(int seed)
Standard constructor using the default parameters (numBins = 10, numFolds =
10, zProp = 0.1, minIntervalLength = 5) for the TSBF classifier.
|
TimeSeriesBagOfFeaturesClassifier(int seed,
int numBins,
int numFolds,
double zProp,
int minIntervalLength)
Constructor specifying parameters (cf.
|
TimeSeriesBagOfFeaturesClassifier(int seed,
int numBins,
int numFolds,
double zProp,
int minIntervalLength,
boolean useZNormalization)
Constructor specifying parameters (cf.
|
| Modifier and Type | Method and Description |
|---|---|
TimeSeriesBagOfFeaturesLearningAlgorithm.ITimeSeriesBagOfFeaturesConfig |
getConfig() |
weka.classifiers.trees.RandomForest |
getFinalClf() |
int[][][] |
getIntervals() |
TimeSeriesBagOfFeaturesLearningAlgorithm |
getLearningAlgorithm(TimeSeriesDataset dataset) |
int |
getNumBins() |
int |
getNumClasses() |
int[][] |
getSubsequences() |
weka.classifiers.trees.RandomForest |
getSubseriesClf() |
java.lang.Integer |
predict(double[] univInstance)
Method predicting the class of the given
univInstance. |
java.lang.Integer |
predict(java.util.List<double[]> multivInstance)
Performs a prediction based on the given multivariate list of double[]
instance representation and returns the result.
|
java.util.List<java.lang.Integer> |
predict(TimeSeriesDataset dataset)
Performs predictions based on the given instances in the given dataset.
|
void |
setFinalClf(weka.classifiers.trees.RandomForest finalClf) |
void |
setIntervals(int[][][] intervals) |
void |
setNumBins(int numBins) |
void |
setNumClasses(int numClasses) |
void |
setSubsequences(int[][] subsequences) |
void |
setSubseriesClf(weka.classifiers.trees.RandomForest subseriesClf) |
checkWhetherPredictionIsPossible, getClassMapper, isTrained, setClassMapper, trainpublic TimeSeriesBagOfFeaturesClassifier(int seed)
seed - Seed used for randomized operationspublic TimeSeriesBagOfFeaturesClassifier(int seed,
int numBins,
int numFolds,
double zProp,
int minIntervalLength)
TimeSeriesBagOfFeaturesClassifier(int)).seed - Seed used for randomized operationsnumBins - See TimeSeriesBagOfFeaturesClassifier#numBinsnumFolds - Number of folds for the internal OOB probability CV estimationzProp - Proportion of the total time series length to be used for the
subseries generationminIntervalLength - The minimal interval length used for the interval generationpublic TimeSeriesBagOfFeaturesClassifier(int seed,
int numBins,
int numFolds,
double zProp,
int minIntervalLength,
boolean useZNormalization)
TimeSeriesBagOfFeaturesClassifier(int)).seed - Seed used for randomized operationsnumBins - See TimeSeriesBagOfFeaturesClassifier#numBinsnumFolds - Number of folds for the internal OOB probability CV estimationzProp - Proportion of the total time series length to be used for the
subseries generationminIntervalLength - The minimal interval length used for the interval generationuseZNormalization - Indicator whether the Z normalization should be usedpublic java.lang.Integer predict(double[] univInstance)
throws PredictionException
univInstance. At first,
an internal feature representation using a bag of features is generated by
the previously trained subsequences
and intervals. These internal
instances are used to get an internal class probability estimation for each
subsequence and interval for each instance using a Random Forest classifier.
These probabilities are aggregated to a histogram which is then fed to a
final Random Forest classifier predicting the instance's target class.predict in class ASimplifiedTSClassifier<java.lang.Integer>univInstance - Univariate instance given by a double vector of time
series values used for the predictionPredictionException - If something fails during the prediction process.public java.lang.Integer predict(java.util.List<double[]> multivInstance)
throws PredictionException
predict in class ASimplifiedTSClassifier<java.lang.Integer>multivInstance - Multivariate instance given by a list of multiple
double[] time series used for the predictionPredictionException - If something fails during the prediction process.public java.util.List<java.lang.Integer> predict(TimeSeriesDataset dataset) throws PredictionException
predict in class ASimplifiedTSClassifier<java.lang.Integer>dataset - The TimeSeriesDataset for which predictions should be
made.PredictionException - If something fails during the prediction processpublic weka.classifiers.trees.RandomForest getSubseriesClf()
public void setSubseriesClf(weka.classifiers.trees.RandomForest subseriesClf)
subseriesClf - the subseriesClf to setpublic weka.classifiers.trees.RandomForest getFinalClf()
public void setFinalClf(weka.classifiers.trees.RandomForest finalClf)
finalClf - the finalClf to setpublic int getNumBins()
public void setNumBins(int numBins)
numBins - the numBins to setpublic int getNumClasses()
public void setNumClasses(int numClasses)
numClasses - the numClasses to setpublic int[][][] getIntervals()
public void setIntervals(int[][][] intervals)
intervals - the intervals to setpublic int[][] getSubsequences()
public void setSubsequences(int[][] subsequences)
subsequences - the subsequences to setpublic TimeSeriesBagOfFeaturesLearningAlgorithm getLearningAlgorithm(TimeSeriesDataset dataset)
getLearningAlgorithm in class ASimplifiedTSClassifier<java.lang.Integer>public TimeSeriesBagOfFeaturesLearningAlgorithm.ITimeSeriesBagOfFeaturesConfig getConfig()