# Time Series Classification with Shapelet and Canonical Features
## 1 Introduction  
Time series classification is an important research area in data mining and has received more and more extensive attention in recent years [1; 2]. The solutions of many practical applications are supported by time series classification technology, such as road condition prediction [3], disease diagnosis [4], remote sensing data analysis [5] and so on, which have greatly promoted the rapid development of time series classification research. However, the increasing scale of data [6; 7] and the constant introduction of complex classification tasks [7] make it still extremely challenging to achieve accurate and efficient time series classification. One of the key problems in time series classification research is how to define and find patterns that distinguish time series from different categories, which affects and even determines the performance of time series classification algorithms. [PERSON] et al. [8] first proposed the concept of Shapelet, defining it as a discriminating subsequence in a time series. Shapelet distinguishes different categories by the local shape of the time series, has strong predictive ability and interpretability, and has received widespread attention in the field of time series classification. However, Shapelet's brute force search algorithm requires iterating through all subsequences in the dataset with a time complexity of up to \(O(n^{2}\cdot 1^{4})\) (\(n\) is the number of time series in the dataset, \(l\) is the average length of the time series) [8]. The expensive computational cost strongly limits the usefulness of the time series classification algorithms based on Shapelet [9; 10]. To address the issue, researchers improved the search efficiency of Shapelet by reducing the search space of Shapelet [9; 10; 11; 12] or trading space for time [13] (see Section 2.1 for details). However, these methods usuallyare designed with the goal of bringing only a certain efficiency gain without significantly reducing accuracy. In addition to the efficiency problem, we realize that there is another flaw in the traditional Shapelet algorithm--that is, it can only describe the overall shape characteristics of the subsequence under the Euclidean distance metric. So, it is extremely susceptible to noise, and it is difficult to mine other types of features embedded in the subsequence. Consider the example in Figure 1 taken from the \"ShapeletSim\" dataset [7]. Figure 1a is a candidate Shapelet \(S\) chosen from the \"Triangle\" class, and Figure 1b,c present the subsequences most similar to candidate Shapelet \(S\) in each of the two categories found using sliding window technique. In fact, the characteristic that distinguishes the two categories of the \"ShapeletSim\" dataset is the artificially embedded triangular-shaped segment in the \"Triangle\" class (the area within the box in Figure 1a), and other data points in the two categories are all random noise. As can be seen from Figure 1, the candidate Shapelet \(S\) intuitively meets our expectations for Shapelet, as it has the triangular-shaped feature that the \"Noise\" class does not have. However, due to the influence of noise, it is impossible to correctly classify these two categories by sorting the Euclidean distances between the eight subsequences and the candidate Shapelet \(S\) (as shown in Figure 1d). In order to deal with the above problems, this paper proposes a new time series classification algorithm--Random Shapelet Forest Embedded with Canonical Time Series Features (RSFCF). RSFCF is a random, tree-based integrated classification algorithm designed to achieve high accuracy and efficient time series classification. RSFCF's time complexity is reduced by several orders of magnitude relative to the Shapelet brute force search by randomly selecting Shapelets. In addition, inspired by interval-based time series classification methods [3; 14], we believe that for most real-world datasets, the local offset of the time series on the timeline is generally within a limited range.