Class LearnShapeletsClassifier
- java.lang.Object
-
- ai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSClassifier<java.lang.Integer>
-
- ai.libs.jaicore.ml.weka.classification.singlelabel.timeseries.learner.shapelets.LearnShapeletsClassifier
-
public class LearnShapeletsClassifier extends ai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSClassifier<java.lang.Integer>LearnShapeletsClassifierpublished in "J. Grabocka, N. Schilling, M. Wistuba, L. Schmidt-Thieme: Learning Time-Series Shapelets" (https://www.ismll.uni-hildesheim.de/pub/pdfs/grabocka2014e-kdd.pdf). This classifier only supports univariate time series prediction.
-
-
Constructor Summary
Constructors Constructor Description LearnShapeletsClassifier(int K, double learningRate, double regularization, int scaleR, double minShapeLengthPercentage, int maxIter, double gamma, int seed)Constructor of theLearnShapeletsClassifier.LearnShapeletsClassifier(int K, double learningRate, double regularization, int scaleR, double minShapeLengthPercentage, int maxIter, int seed)Constructor of theLearnShapeletsClassifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LearnShapeletsLearningAlgorithmgetLearningAlgorithm(ai.libs.jaicore.ml.classification.singlelabel.timeseries.dataset.TimeSeriesDataset2 dataset)double[][][]getS()double[][][]getW()double[]getW0()java.lang.Integerpredict(double[] univInstance)java.util.List<java.lang.Integer>predict(ai.libs.jaicore.ml.classification.singlelabel.timeseries.dataset.TimeSeriesDataset2 dataset)java.lang.Integerpredict(java.util.List<double[]> multivInstance)voidsetC(int c)Setter forcvoidsetEstimateK(boolean estimateK)Enables / disabled the parameter estimation of K within the training algorithm.voidsetMinShapeLength(int minShapeLength)Setter forLearnShapeletsClassifier#minShapeLengthvoidsetS(double[][][] s)Setter forsvoidsetW(double[][][] w)Setter forwvoidsetW0(double[] w0)Setter forw0
-
-
-
Constructor Detail
-
LearnShapeletsClassifier
public LearnShapeletsClassifier(int K, double learningRate, double regularization, int scaleR, double minShapeLengthPercentage, int maxIter, int seed)Constructor of theLearnShapeletsClassifier.- Parameters:
K- SeeLearnShapeletsLearningAlgorithm#KlearningRate- SeeLearnShapeletsLearningAlgorithm#learningRateregularization- SeeLearnShapeletsLearningAlgorithm#regularizationscaleR- SeeLearnShapeletsLearningAlgorithm#scaleRminShapeLengthPercentage- SeeLearnShapeletsLearningAlgorithm#minShapeLengthPercentagemaxIter- SeeLearnShapeletsLearningAlgorithm#maxIterseed- SeeLearnShapeletsLearningAlgorithm#seedseed- SeeLearnShapeletsLearningAlgorithm.timeout
-
LearnShapeletsClassifier
public LearnShapeletsClassifier(int K, double learningRate, double regularization, int scaleR, double minShapeLengthPercentage, int maxIter, double gamma, int seed)Constructor of theLearnShapeletsClassifier.- Parameters:
K- SeeLearnShapeletsLearningAlgorithm#KlearningRate- SeeLearnShapeletsLearningAlgorithm#learningRateregularization- SeeLearnShapeletsLearningAlgorithm#regularizationscaleR- SeeLearnShapeletsLearningAlgorithm#scaleRminShapeLengthPercentage- SeeLearnShapeletsLearningAlgorithm#minShapeLengthPercentagemaxIter- SeeLearnShapeletsLearningAlgorithm#maxIterseed- SeeLearnShapeletsLearningAlgorithm#seedgamma- SeeLearnShapeletsLearningAlgorithm#gamma
-
-
Method Detail
-
setEstimateK
public void setEstimateK(boolean estimateK)
Enables / disabled the parameter estimation of K within the training algorithm.- Parameters:
estimateK- Value to be set
-
getS
public double[][][] getS()
- Returns:
s.
-
setS
public void setS(double[][][] s)
Setter fors- Parameters:
s- New value to be set
-
getW
public double[][][] getW()
- Returns:
w.
-
setW
public void setW(double[][][] w)
Setter forw- Parameters:
w- New value to be set
-
getW0
public double[] getW0()
- Returns:
w0.
-
setW0
public void setW0(double[] w0)
Setter forw0- Parameters:
w0- New value to be set
-
setC
public void setC(int c)
Setter forc- Parameters:
c- New value to be set
-
setMinShapeLength
public void setMinShapeLength(int minShapeLength)
Setter forLearnShapeletsClassifier#minShapeLength- Parameters:
minShapeLength- New value to be set
-
predict
public java.lang.Integer predict(double[] univInstance) throws org.api4.java.ai.ml.core.exception.PredictionException- Specified by:
predictin classai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSClassifier<java.lang.Integer>- 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:
predictin classai.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:
predictin classai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSClassifier<java.lang.Integer>- Throws:
org.api4.java.ai.ml.core.exception.PredictionException
-
getLearningAlgorithm
public LearnShapeletsLearningAlgorithm getLearningAlgorithm(ai.libs.jaicore.ml.classification.singlelabel.timeseries.dataset.TimeSeriesDataset2 dataset)
- Specified by:
getLearningAlgorithmin classai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSClassifier<java.lang.Integer>
-
-