public class LearnShapeletsClassifier extends ASimplifiedTSClassifier<java.lang.Integer>
LearnShapeletsClassifier published 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.classMapper, trained| Constructor and Description |
|---|
LearnShapeletsClassifier(int K,
double learningRate,
double regularization,
int scaleR,
double minShapeLengthPercentage,
int maxIter,
double gamma,
int seed)
Constructor of the
LearnShapeletsClassifier. |
LearnShapeletsClassifier(int K,
double learningRate,
double regularization,
int scaleR,
double minShapeLengthPercentage,
int maxIter,
int seed)
Constructor of the
LearnShapeletsClassifier. |
| Modifier and Type | Method and Description |
|---|---|
LearnShapeletsLearningAlgorithm |
getLearningAlgorithm(TimeSeriesDataset dataset) |
double[][][] |
getS() |
double[][][] |
getW() |
double[] |
getW0() |
java.lang.Integer |
predict(double[] univInstance)
Performs a prediction based on the given univariate double[] instance
representation and returns the result.
|
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 |
setC(int c)
Setter for
c |
void |
setEstimateK(boolean estimateK)
Enables / disabled the parameter estimation of K within the training
algorithm.
|
void |
setMinShapeLength(int minShapeLength)
Setter for
LearnShapeletsClassifier#minShapeLength |
void |
setS(double[][][] s)
Setter for
s |
void |
setW(double[][][] w)
Setter for
w |
void |
setW0(double[] w0)
Setter for
w0 |
getClassMapper, isTrained, setClassMapper, trainpublic LearnShapeletsClassifier(int K,
double learningRate,
double regularization,
int scaleR,
double minShapeLengthPercentage,
int maxIter,
int seed)
LearnShapeletsClassifier.K - See LearnShapeletsLearningAlgorithm#KlearningRate - See LearnShapeletsLearningAlgorithm#learningRateregularization - See LearnShapeletsLearningAlgorithm#regularizationscaleR - See LearnShapeletsLearningAlgorithm#scaleRminShapeLengthPercentage - See LearnShapeletsLearningAlgorithm#minShapeLengthPercentagemaxIter - See LearnShapeletsLearningAlgorithm#maxIterseed - See LearnShapeletsLearningAlgorithm#seedseed - See LearnShapeletsLearningAlgorithm.timeoutpublic LearnShapeletsClassifier(int K,
double learningRate,
double regularization,
int scaleR,
double minShapeLengthPercentage,
int maxIter,
double gamma,
int seed)
LearnShapeletsClassifier.K - See LearnShapeletsLearningAlgorithm#KlearningRate - See LearnShapeletsLearningAlgorithm#learningRateregularization - See LearnShapeletsLearningAlgorithm#regularizationscaleR - See LearnShapeletsLearningAlgorithm#scaleRminShapeLengthPercentage - See LearnShapeletsLearningAlgorithm#minShapeLengthPercentagemaxIter - See LearnShapeletsLearningAlgorithm#maxIterseed - See LearnShapeletsLearningAlgorithm#seedgamma - See LearnShapeletsLearningAlgorithm#gammapublic void setEstimateK(boolean estimateK)
estimateK - Value to be setpublic double[][][] getS()
s.public void setS(double[][][] s)
ss - New value to be setpublic double[][][] getW()
w.public void setW(double[][][] w)
ww - New value to be setpublic double[] getW0()
w0.public void setW0(double[] w0)
w0w0 - New value to be setpublic void setC(int c)
cc - New value to be setpublic void setMinShapeLength(int minShapeLength)
LearnShapeletsClassifier#minShapeLengthminShapeLength - New value to be setpublic java.lang.Integer predict(double[] univInstance)
throws PredictionException
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 LearnShapeletsLearningAlgorithm getLearningAlgorithm(TimeSeriesDataset dataset)
getLearningAlgorithm in class ASimplifiedTSClassifier<java.lang.Integer>