CNN Approaches for Time Series Classification DOI: http://dx.doi.org/10.5772/intechopen.81170

wrist) but rather signals of the torso sensor, resulting in input samples with 3 channels instead of 9. So, with torso measurements only, the only stereotypical movements that could be captured are the rock and flap-rock SMMs (and no flap SMMs). Accordingly, only rock and flap-rock SMM instances will be used as inputs

Pre-processing. The pre-processing phase is the same as in Section 3.2.2.

instances are randomly selected from the overall training set for training.

frequency domains for each study i within each study j:

This process results in a pre-trained CNN model.

in every study j.

4.3.3 Results

72

Accordingly, input instances will have 3 channels instead of 12.

Time Series Analysis - Data, Methods, and Applications

When using the PUC dataset for the source learning task, only the waist accelerometer (waist being next to torso) is taken into account since the other accelerometers (located at the thigh, ankle and arm) will not be relevant to the SMM recognition task during transfer learning. We consider the waist location to be equivalent to the torso location so that the CNN pre-trained on the source learning dataset can further be transferred to the target learning task (SMM recognition).

Experimental setup. In experiments below, the architecture of the CNN model in time domain and frequency domain as well as training parameters are similar to the ones in Section 3.2.2. In addition, the target learning task consists of SMM recognition of a target subject i of study j where i ∈½ � 1; 6 and j∈½ � 1; 2 . Accordingly, one "transfer learning with SVM" framework will be run per domain (time or frequency domain) per subject per study. The training and testing sets of subject i (study j) are selected using the same k-fold cross-validation used in Section 3.2.2. However only a subset of the training set (10,000–30,000 instances) is used, where 2000 SMM

In order to perform SMM recognition on a target subject using transfer knowledge from SMMs of other subjects, the following steps are performed in time and

• Step 1: we train a randomly initialized CNN in both time and frequency domains, for 5–15 epochs, using: (i) SMM instances of all 6 atypical subjects within study j except subject i for "TL SVM similar domains" framework, and (ii) basic human activities' instances for "TL SVM across domains" framework.

• Step 2: we reuse all layers of this CNN except the last layer (which is a fully connected layer) which is removed and replaced by the SVM classifier. The SVM of the transfer learning framework is trained using a small subset of subject i's training data (i.e., 2000 SMM samples), which results in learned high-level features. Then, the remaining SMMs of subject i are implemented for testing the framework. Knowing that the input consists of only a subset of the original training dataset of subject i, we choose to run the SVM for 5 runs,

with 2000 randomly selected samples in each run. In such a way, by aggregating F1-scores of the 5 runs, we provide more realistic results. This procedure is applied on every domain (time and frequency) on every subject i

"TL SVM similar domains". As depicted in Table 3, this framework (combining part of the pre-trained CNN with an SVM) is able to identify SMMs at a mean F1-score of 74.50 and 91.81% for time and frequency domains respectively. As opposed to the technique of directly applying the pre-trained CNN for classification which fails to recognize SMMs, "TL SVM similar domains" framework is able to capture relevant features for the recognition of SMMs across subjects. Thus, we can

in this experiment.

infer that low and mid-level SMM features share the same information from one subject to another and that "TL SVM similar domains" can be used as a global framework to identify SMMs of any new atypical subject. Furthermore, low- and mid-level features captured from a source learning task can be employed as lowand mid-level features of a target learning task close to the source task.

"TL SVM across domains". Training this framework produces satisfying results with a mean score of 72.29 and 79.78% in time and frequency domains respectively (Table 3). So, fixing low and mid-level features to features of basic movements and adjusting only the high-level features by an SVM seems to give satisfying classification results, which confirms that our framework has engaged feature detectors for finding stereotypical movements in signals. These results, especially the frequencydomains results, indicate that: (i) connecting low- and mid-level features of basic movements to an SVM classifier then feeding in 2000 instances for training the SVM generates a global framework which holds relevant and general representation that adapts to SMMs of any new atypical subject i, and (ii) both human and stereotypical movements may share low and mid-level features in common, suggesting that low- and mid-level information learned from a source target task by a CNN model can be directly applied as low- and mid-level features for a target learning task different but related to the source learning task, especially when there is a lack of labeled data within the target learning task.

Moreover, both our techniques are compared against the following methods:


Results and properties of the three techniques are depicted in Tables 3 and 4 respectively. From these results and properties, the following observations can be made:

• "TL SVM similar domains" framework performs higher than the three frameworks "CNN few data", "TL full fine-tuning" and "TL limited fine-tuning" in both time- and frequency-domain. This can be explained by the nature of the training process of the three frameworks, which relies on updating


Table 3. ResultsofCNNapproachesusedinthis

 experiment

 per domain (time or frequency)

 per subject, per study. Highest rates are in bold.

parameters using backpropagation. And, knowing that backpropagation requires abundant data for proper training, a lack of training data (2000 SMM
