## 3 Methodology and Overall Framework
### Predictive Maintenance on a Conveyor Belt
#### 3.3.1 Anomaly Detection with One-Class SVM  
One-class support vector machine (OCSVM) is a popular domain-based novelty detection algorithm, based on support vector machine (SVM) classification. OCSVM acquires a decision boundary on a labeled data and predicts if a new data point belongs to the class defined by the boundary or not. Instead of maximizing the margin between two groups of data points, the algorithm tries to maximize the margin between the data points and the origin using a hyperplane. In OCSVM, the parameters \(\
u\) (hyperparameter of the OCSVM algorithm) and \(\gamma\) (hyperparameter of the kernel function, which is radial basis function, i.e., RBF, in our case) largely affect the performance of the OCSVM algorithm. The parameter \(\
u\) defines the upper bound of the fraction of outliers and a lower bound of the number of samples that are used as the support vector. It controls the upper bound of the target data that are excluded, which is usually tuned to reject the noise. The parameter \(\gamma\), on the other hand, controls the smoothness of the decision boundary; the bigger \(\gamma\) is, the more jagged the boundary is [33]. Parameter estimation, in general, is done using grid search with cross validation. It helps figuring out how the algorithm performs when there is new data and also prevents the trained model from over-fitting. However, in anomaly detection, the \"abnormal data\" is usually not available or lacking in terms of data amount and diversity. A typical way to solve this problem is to generate artificial outlier data [12]. \(k\)-NN-based edge pattern detection (EPD) is a method to identify several data points that define the edge pattern of the trained models [34]. Based on the EPD algorithm, the \"negative shifting\" method is proposed to generate high quality outliers [33]. For this purpose, the identified edge pattern is shifted away from the target data by a short distance. Towards higher qualities, the shifting direction should target data density's negative gradient, where the density of target data drops at the fastest rate. Similarly, \"positive shifting\" is proposed this time to generate pseudo target data as a validation set to avoid time-consuming cross validation. The pseudo target data can be generated by shifting every target data point along the direction where target data density grows at its fastest rate, which is exactly the opposite  
Figure 2: The _fingerprint_, i.e., nominal power-speed characteristics, of the system under various torque (load) conditions. direction of the negative shifting. Moreover, the shifting distance should be the minimum projection distance of the k-nearest neighbors of the data point on the shifting direction. For the fine tuning of all three unsupervised algorithms (Sections 3.3.1-3.3.3) we apply negative shifting and positive shifting on our training dataset so that we obtain artificial outliers using the former and pseudo target data using the latter (as shown in Figure 3). The two hyperparameters of OCSVM, \(\
u\) and \(\gamma\), is tuned with the calculated overall error rate using a grid search over the generated dataset. The best parameters in our case are \(\
u=0.02\) and \(\gamma=10\), and the corresponding trained model with the parameters is demonstrated in Figure 3(a). From the graph, we can see that the decision boundary tightly surrounds the training data, the generated artificial outliers are predicted as abnormal and the pseudo target data are classified as normal. However, with this parameter setting, OCSVM is prone to the accuracy of the training data (real data collected under normal conditions). Due to the fluctuations of this data, some jagged edges already occur on the decision boundary. If the training data are contaminated with abnormal behaviors, the accuracy of the model would decrease.