public abstract class ASimplifiedTSClassifier<T>
extends java.lang.Object
algorithm to train the model
parameters (if necessary).| Modifier and Type | Field and Description |
|---|---|
protected ClassMapper |
classMapper
Class mapper object used to encode and decode predicted values if String
values are used as classes.
|
protected boolean |
trained
Variable indicating whether the classifier has been trained.
|
| Constructor and Description |
|---|
ASimplifiedTSClassifier() |
| Modifier and Type | Method and Description |
|---|---|
protected double[][] |
checkWhetherPredictionIsPossible(TimeSeriesDataset dataset) |
ClassMapper |
getClassMapper()
Getter for the property
classMapper. |
abstract <U extends ASimplifiedTSClassifier<T>> |
getLearningAlgorithm(TimeSeriesDataset dataset) |
boolean |
isTrained() |
abstract T |
predict(double[] univInstance)
Performs a prediction based on the given univariate double[] instance
representation and returns the result.
|
T |
predict(java.util.List<double[]> multivInstance)
Performs a prediction based on the given multivariate list of double[]
instance representation and returns the result.
|
abstract java.util.List<T> |
predict(TimeSeriesDataset dataset)
Performs predictions based on the given instances in the given dataset.
|
void |
setClassMapper(ClassMapper classMapper)
Setter for the property
classMapper. |
void |
train(TimeSeriesDataset dataset)
Trains the simplified time series classifier model using the given
TimeSeriesDataset. |
protected ClassMapper classMapper
protected boolean trained
public abstract T predict(double[] univInstance) throws PredictionException
univInstance - Univariate instance given by a double vector of time
series values used for the predictionPredictionException - If something fails during the prediction process.public T predict(java.util.List<double[]> multivInstance) throws PredictionException
multivInstance - Multivariate instance given by a list of multiple
double[] time series used for the predictionPredictionException - If something fails during the prediction process.public abstract java.util.List<T> predict(TimeSeriesDataset dataset) throws PredictionException
dataset - The TimeSeriesDataset for which predictions should be
made.PredictionException - If something fails during the prediction processpublic abstract <U extends ASimplifiedTSClassifier<T>> ASimplifiedTSCLearningAlgorithm<T,U> getLearningAlgorithm(TimeSeriesDataset dataset)
public final void train(TimeSeriesDataset dataset) throws TrainingException
TimeSeriesDataset.dataset - The TimeSeriesDataset which should be used for the
training.TrainingException - If something fails during the training process.public ClassMapper getClassMapper()
classMapper.public void setClassMapper(ClassMapper classMapper)
classMapper.classMapper - The class mapper to be setpublic boolean isTrained()
protected double[][] checkWhetherPredictionIsPossible(TimeSeriesDataset dataset) throws PredictionException
PredictionException