public class TimeSeriesForestClassifier extends ASimplifiedTSClassifier<java.lang.Integer>
TimeSeriesTreeClassifier classifier.
This classifier only supports univariate time series prediction.classMapper, trained| Constructor and Description |
|---|
TimeSeriesForestClassifier()
Constructing an untrained ensemble of time series trees.
|
TimeSeriesForestClassifier(TimeSeriesForestLearningAlgorithm.ITimeSeriesForestConfig config)
Constructing an untrained ensemble of time series trees.
|
| Modifier and Type | Method and Description |
|---|---|
TimeSeriesForestLearningAlgorithm |
getLearningAlgorithm(TimeSeriesDataset dataset) |
TimeSeriesTreeClassifier[] |
getTrees()
Getter for the time series trees.
|
java.lang.Integer |
predict(double[] univInstance)
Predicts the class of the given instance by taking the majority vote of all
trees.
|
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 |
setFeatureCaching(boolean enableFeatureCaching) |
void |
setMaxDepth(int maxDepth) |
void |
setNumberOfTrees(int numTrees) |
void |
setSeed(int seed) |
void |
setTrees(TimeSeriesTreeClassifier[] trees)
Setter for the time series trees.
|
checkWhetherPredictionIsPossible, getClassMapper, isTrained, setClassMapper, trainpublic TimeSeriesForestClassifier()
public TimeSeriesForestClassifier(TimeSeriesForestLearningAlgorithm.ITimeSeriesForestConfig config)
public void setNumberOfTrees(int numTrees)
public void setMaxDepth(int maxDepth)
public void setFeatureCaching(boolean enableFeatureCaching)
public void setSeed(int seed)
public java.lang.Integer predict(double[] univInstance)
throws PredictionException
predict in class ASimplifiedTSClassifier<java.lang.Integer>univInstance - Univariate instance to be predictedPredictionException - 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 TimeSeriesTreeClassifier[] getTrees()
public void setTrees(TimeSeriesTreeClassifier[] trees)
trees - Trees to be setpublic TimeSeriesForestLearningAlgorithm getLearningAlgorithm(TimeSeriesDataset dataset)
getLearningAlgorithm in class ASimplifiedTSClassifier<java.lang.Integer>