# Machine Learning in Manufacturing towards Industry 4.0: From For Now' to 'Four-Know'
## 4 Machine Learning Methods and Applications
### Unsupervised Learning Methods  
Unsupervised learning algorithms aim to identify patterns in data sets containing data points that are not labeled. Unsupervised learning eliminates the need for labeled data and manual feature engineering, allowing for more general, flexible, and automated ML methods. As a result, unsupervised learning methods draw patterns and highlight areas of interest, revealing critical insight into the production process and opportunities for improvement. This can allow manufacturers to make better production-focused decisions, driving their business forward. The primary goal of unsupervised learning is to identify hidden and interesting patterns in unlabeled data. In terms of principles, there are three types of unsupervised tasks: Dimension Reduction [118; 119], Clustering [120], and Association Rules [121]. Many aspects of unsupervised learning can be beneficial in manufacturing applications. First, clustering algorithms can be used to identify outliers in manufacturing data. Another aspect is to handle high dimensional data, e.g., for manufacturing cost estimation, quality improvement methodologies, production process optimization, better understanding of the customer's data, etc. Usually, a dimensional reduction support algorithm is required to handle data complexity and high dimensionality. Finally, it is challenging to perform root cause analysis in large-scale process execution due to the complexity of services in data centers. Association rule-based learning can be  
Figure 9: The scheme of an ANN, which normally consists of an input layer, hidden layer and output layer. employed to conduct root cause analysis and to identify correlations between variables in a dataset. _Dimensional reduction_ is the process of converting data from a high-dimensional space to a low-dimensional space while preserving important characteristics of the original data. _Principal component analysis_ (PCA) [118]: The main idea of PCA is to minimize the number of interrelated variables in a dataset while preserving as much of the dataset's inherent variance as possible. A new set of variables, called principal components (PCs), are generated; these are uncorrelated and sorted such that the first few variables retain the majority of the variance included in all of the original variables. A pictorial representation of PCA is shown in Figure 10.  
The five steps below can be used to condense the entire process of extracting principal components from a raw dataset. 1. Say we wish to condense \(d\) features in our data matrix \(X\) to \(k\) features. The first step is to standardize the input data: \[z=x-\mu/\sigma\] where \(\mu\) is the mean and \(\sigma\) is the standard deviation. 2. Next, it is necessary to find the covariance matrix of the standardized input data. The covariance of variables \(X\) and \(Y\) can be written as follows: \[\text{cov}(X,Y)=\frac{1}{n-1}\sum_{i=1}^{n}(Xi-\vec{x})(Yi-\vec{y}).\] (1)
3. The third steps is to find all of the eigenvalues and eigenvectors of the covariance matrix: \[A\vec{v}=\lambda\vec{v}\] (2) \[A\vec{v}-\lambda\vec{v}=0\] (3) \[\vec{v}(A-\lambda I)=0.\] (4)
4. Then, the eigenvector corresponding to the largest eigenvalue is the direction with the maximum variance, the eigenvector corresponding to second-largest eigenvalue is the direction with the second maximum variance, etc. 5. To obtain \(k\) features, it is necessary to multiply the original data matrix by the matrix of eigenvectors corresponding to the \(k\) largest eigenvalues. Figure 10: Principal Component Analysis. PCA is particularly useful for processing manufacturing data, which typically have a large number of variables, making it difficult to identify patterns and trends. A variety of applications of PCA in manufacturing are listed below:  
1. Quality improvement (Know-why, product level): by analyzing the variations of a product's features, PCA can be used to identify the causes of product defects [122]. 2.