## 2 Related Work  
Profile monitoring and anomaly detection of time series data are very similar in concept. The types of outlying profiles studied in previous studies were similar to various types of outliers in time series data. [PERSON] et al. [24] identified three types of outliers in time series data: point outliers, subsequence outliers, and outlier time series. A point outlier is a data point that acts abnormally at a particular instant in time in comparison with other points in the entire time series (called a global outlier) or its neighbors (called a local outlier). Subsequence outliers are consecutive points in time series whose collective behavior is abnormal even though each point alone is not always a point outlier. \"Outlier time series refers\" to an entire time series that is an outlier. In profile monitoring, the central segment shifts and local shifts identified in [13] are subsequence outliers, while the vertical shift in [13] is similar to an outlier time series. Anomaly detection in time series has been extensively studied [16; 19; 20; 21; 22; 24; 25; 26; 27; 28]. Therefore, we only review the application of machine learning algorithms to profile monitoring. Cluster analysis is one of the most commonly adopted machine learning algorithms in phase I profile monitoring. This algorithm is used to divide dataset observations into two groups: IC and OOC data. [PERSON] et al. [15] applied the EM-MIX (expectation-maximization mixture) clustering method [29] to the analysis of profile data. In [30], authors conducted a study to investigate the effect of phase I estimators on the performance of phase II control charts. They studied the detrimental effect of poor phase I estimators on the performance of phase II control charts in the field of profile monitoring. They found that poor estimators obtained in phase I may produce more false alarms in phase II and take longer to detect OOC profiles. A typical nonparametric procedure for monitoring profiles in phase I analysis involves constructing a baseline profile that can be compared with all other profiles. A reasonable baseline profile is the average estimated profile of all available profiles. A disadvantage of this approach is that the estimated baseline profile may be biased. This is because it uses all profiles, including any profiles from the OOC process, to obtain the fitted mean. Consequently, the estimated baseline profile shifts toward the profiles collected from the OOC processes, and the estimated baseline profile will be incorrect. In [31], hierarchical clustering with complete linkage was used to construct a main cluster in order to accurately estimate a baseline curve for later use. They selected the estimated parameter vectors as the input features for the clustering algorithm. Using the concept of a \(T^{2}\) control chart, this method detected OOC profiles by comparing the estimated parameters of each profile to the estimated parameters of a baseline profile. A similar method was introduced by [PERSON] et al. [32]. They applied a robust cluster-based method in phase I to reduce the impact of data contamination when estimating the generalized linear model parameters. In [33], the authors developed a nonparametric procedure on the basis of a modified Hausdorff distance and iterative clustering analysis (denoted as MHD-C). They applied the \(K\)-means clustering algorithm iteratively to detect the OOC profiles present in the collected dataset. Using a simulation study, they show that their method had the benefits of reducing type II errors and more accurately estimating the baseline profile. Most of the previous studies adopted the \(K\)-means clustering algorithm because it requires few parameters and is easy to use. For the application of SPC, we only need to divide the data into abnormal and normal categories, and its main parameter can be intuitively set to two. However, the \(K\)-means algorithm works best in the case of an even cluster size. This algorithm also tends to produce different groups with close numbers of data.