Class TimeSeriesTreeClassifier


  • public class TimeSeriesTreeClassifier
    extends ai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSClassifier<java.lang.Integer>
    Time series tree as described in Deng, Houtao et al. "A Time Series Forest for Classification and Feature Extraction." Inf. Sci. 239 (2013): 142-153. This classifier only supports univariate time series prediction.
    • Field Summary

      • Fields inherited from class ai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSClassifier

        classMapper, trained
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ai.libs.jaicore.graph.TreeNode<ai.libs.jaicore.ml.weka.classification.singlelabel.timeseries.learner.trees.TimeSeriesTreeClassifier.TimeSeriesTreeNodeDecisionFunction> decide​(ai.libs.jaicore.graph.TreeNode<ai.libs.jaicore.ml.weka.classification.singlelabel.timeseries.learner.trees.TimeSeriesTreeClassifier.TimeSeriesTreeNodeDecisionFunction> treeNode, double[] instance)
      Function performing the decision on a treeNode given the instance based on the locally stored splitting criterion.
      TimeSeriesTreeLearningAlgorithm getLearningAlgorithm​(ai.libs.jaicore.ml.classification.singlelabel.timeseries.dataset.TimeSeriesDataset2 dataset)  
      ai.libs.jaicore.graph.TreeNode<ai.libs.jaicore.ml.weka.classification.singlelabel.timeseries.learner.trees.TimeSeriesTreeClassifier.TimeSeriesTreeNodeDecisionFunction> getRootNode()
      Getter for the root node.
      java.lang.Integer predict​(double[] univInstance)
      Predicts the class of the given univariate instance by iterating through the tree starting from the root node to a leaf node to induce a class prediction.
      java.util.List<java.lang.Integer> predict​(ai.libs.jaicore.ml.classification.singlelabel.timeseries.dataset.TimeSeriesDataset2 dataset)
      java.lang.Integer predict​(java.util.List<double[]> multivInstance)
      • Methods inherited from class ai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSClassifier

        checkWhetherPredictionIsPossible, getClassMapper, isTrained, setClassMapper, train
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getRootNode

        public ai.libs.jaicore.graph.TreeNode<ai.libs.jaicore.ml.weka.classification.singlelabel.timeseries.learner.trees.TimeSeriesTreeClassifier.TimeSeriesTreeNodeDecisionFunction> getRootNode()
        Getter for the root node.
        Returns:
        Returns the root node of the time series tree
      • predict

        public java.lang.Integer predict​(double[] univInstance)
                                  throws org.api4.java.ai.ml.core.exception.PredictionException
        Predicts the class of the given univariate instance by iterating through the tree starting from the root node to a leaf node to induce a class prediction.
        Specified by:
        predict in class ai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSClassifier<java.lang.Integer>
        Parameters:
        univInstance - Univariate instance to be predicted
        Throws:
        org.api4.java.ai.ml.core.exception.PredictionException
      • predict

        public java.lang.Integer predict​(java.util.List<double[]> multivInstance)
                                  throws org.api4.java.ai.ml.core.exception.PredictionException
        Overrides:
        predict in class ai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSClassifier<java.lang.Integer>
        Throws:
        org.api4.java.ai.ml.core.exception.PredictionException
      • predict

        public java.util.List<java.lang.Integer> predict​(ai.libs.jaicore.ml.classification.singlelabel.timeseries.dataset.TimeSeriesDataset2 dataset)
                                                  throws org.api4.java.ai.ml.core.exception.PredictionException
        Specified by:
        predict in class ai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSClassifier<java.lang.Integer>
        Throws:
        org.api4.java.ai.ml.core.exception.PredictionException
      • decide

        public static ai.libs.jaicore.graph.TreeNode<ai.libs.jaicore.ml.weka.classification.singlelabel.timeseries.learner.trees.TimeSeriesTreeClassifier.TimeSeriesTreeNodeDecisionFunction> decide​(ai.libs.jaicore.graph.TreeNode<ai.libs.jaicore.ml.weka.classification.singlelabel.timeseries.learner.trees.TimeSeriesTreeClassifier.TimeSeriesTreeNodeDecisionFunction> treeNode,
                                                                                                                                                                                                     double[] instance)
        Function performing the decision on a treeNode given the instance based on the locally stored splitting criterion.
        Parameters:
        treeNode - Tree node where the decision is taken place
        instance - Instance values
        Returns:
        Returns the child node where the next decision can be done, null if treeNode is a tree node
      • getLearningAlgorithm

        public TimeSeriesTreeLearningAlgorithm getLearningAlgorithm​(ai.libs.jaicore.ml.classification.singlelabel.timeseries.dataset.TimeSeriesDataset2 dataset)
        Specified by:
        getLearningAlgorithm in class ai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSClassifier<java.lang.Integer>