# Random Subspace Ensembles of Fully Convolutional Network for Time Series Classification
## 2 FCN Ensemble Built by Random Subspace Method  
FCN has proven to be an effective vehicle for TSC problems. Ensemble learning is able to make further improvement from the accuracy level of single classifier. Furthermore, RSM prepares diverse individuals for ensemble by offering various combination of inputs. Meanwhile, classification model trained on the low-dimensional key features via screening, usually has good performance. This work proposes a Random Subspace Ensemble of FCN (RSE-FCN), combining the strength of above all, in order to yield promising TSC results. It converts raw continuous time series into discriminative subsequences, then deploys Random Subspace Method on these subsequences with FCN classifier. The overview of RSE-FCN is shown in Figure 1. In this section, we will first introduce the computationally less expensive converting method established by simulating Shapelet discovery, and then give a description of the precise working of proposed RSE-FCN. The procedure of Shapelet discovery can be summarized in four stages: enumerate candidate subsequences, evaluate candidates and form the Shapelet binary tuple, screen and re-rank. The converting operation adopted in our method generally follows the logic of Shapelet discovery. However, we rather to roughly eliminate part of irrelevant and redundant subsequences than to accurately search out K most representative primitives as Shapelet. As shown in Algorithm 1, first, N equally-divided intervals of time series are viewed as N candidate subsequences. Then, with classification accuracy as score, each subsequence is evaluated by a simple feature-based classifier. Here, roughly trained FCN are leveraged as the evaluator. Finally, K subsequences who have the highest score will be retained for Random Subspace Method. Figure 1: The overall structure of RSE-FCN. ```
1:Input: Training set \(D\) and its label set \(Y_{d}\), Test set \(T\) and its label set \(Y_{t}\), Subsequences amount \(N\); Number of optimal subsequences \(K\)
2:Output:\(kBestID\),\(D_{S}\),\(T_{S}\)
3:L = X._demision // The time step (attribute dimension) of the instances_
4:SL = \(\lfloor L/N\rfloor\) // Rounding down, the end of the series will be discarded. 5:SubsequencesID = \(\emptyset\)
6:for\(i\) in range(\(I\),\(K\)) do
7:start = SL*(\(i-1\)), end = SL*\(i\)
8:\(D_{i}\) = D [start:end], \(T_{i}\) = T [start:end]
9:model._train_(\(D_{i}\), \(Y_{d}\))
10:\(Score\) = model._test_(\(T_{i}\), \(Y_{t}\))
11:SubsequencesID._append_(\(i\), Score) // Record every part and its score
12:endfor
13:SubsequencesID._sortByScore_()
14:\(kBestID\)= SubsequencesID._topK_() // The set of ordinal numbers of top \(K\) test accuracy
15:\(D_{s}\) = {\(D_{1}\),\(D_{2}\),\(D_{3}\),...,\(D_{N}\)} // \(N\) intervals of train set after it is divided. 16:\(T_{s}\) = {\(T_{1}\),\(T_{2}\),\(T_{3}\),...,\(T_{N}\)}// \(N\) intervals of test set after it is divided. 17:return\(kBestID\),\(D_{s}\),\(T_{s}\)
```  
**Algorithm 1** GetTopKBestSubsequences ( \(D\), \(T\), \(Y_{d}\), \(Y_{t}\), \(N\), \(K\)). This ensemble framework requires four structural hyperparameters, they are: number of intervals to be divided N, number of optimal subsequences K, subsequences number M received by classifier and number of basic classifiers E. They directly correspond to the performance of proposed method. Figure 2 gives an example with hyperparameter value. A big N will lead each subsequence too short to be learned. The diversity of subsequence selections is positively related to N and the amount of individual classifiers E is also positively related to that diversity, so we think N and E within 10 is enough. Furthermore, obviously, M should be less than or equal to K. Moreover, M/N > 1/2 should be guaranteed, since above discovery process of key discriminative subsequence is rough, on the basis, retaining too little proportion as inputs may miss some beneficial features which hides in the discard ones.