Skip to content
César Soto Valero edited this page Mar 4, 2020 · 10 revisions

Here, we will rely on an example to illustrate how to use the timeSeriesClassification package to classify time series data.

Classification example

Download the ECG5000 dataset.

Load the train dataset ECG5000_TRAIN.arff in the Weka explorer.

Weka Explorer

In the explorer, go to Classify and add ECG5000_TEST.arff file as the test set.

Add Test Set

Then, configure the classifier by selecting Lazy > Ibk > Choose > DTWSearch

DTWSearch

Now you can run the classifier with the DTWDistance function, you should obtain the following result:

DTWSearch Results

BTW, the accuracy using 1NN with the Euclidean Distance instead of DTW for this dataset is 92.2444%.

Preprocess example

For using the NumerosityReduction filter. In the Weka explorer go to Choose > weka > filters > supervised > instance > NumerosityReduction and select the percentage of instances to be removed

Weka Preprocess

After applying the filter with percentageToRemove = 50, the dataset will contain half of the original instances, while preserving the representativeness of each one of the classes for classification

Weka Preprocess

Clone this wiki locally