## 3 Methodology
### The Case of Bearing Fault Classification  
#### 3.2.1 Conventional Machine Learning Model  
As shown in Table 1, there are 12 different classes of damage. The goal is to build a model that can classify the measurements from the triaxial acceleration sensor and the microphone. To classify timeseries, the Long Short-Term Memory is a suitable algorithm. It is widely used for text and signal classification, as well as generation.  
An LSTM network contains a number of LSTM cells. As the name says, these cells have a long- and short-term memory. This means that each cell has knowledge about the history and the present of the signal. For classification, prediction or generation of signals and text, the history is crucial. For example, to understand a sentence, it is important to have the knowledge about the previous words and not just look at the latest word. For text and signals, the history is important to understand the present, and the LSTM is able to do that. More information about machine learning in general and the LSTM network can be found in _Hands-On Machine Learning_[17].  
The machine learning pipeline is set up as shown in Figure 9 with an LSTM network model. This method does not require a feature extraction step since this task is integrated in the algorithm. The raw data show no trend, have no outliers and no filter is applied. The dataset for the training is directly created from the raw data.  
During the engineering phase, two different LSTM models are developed to classify the timeseries. The first model, shown in Figure 10, contains a single hidden LSTM layer for the feature extraction out of the data. To reduce the risk of overfitting the model to the training data, a dropout layer is added after the LSTM. The extracted features are interpreted by a fully connected dense layer. At the end, a fully connected dense layer is used to make the decision and provide the output.  
The second model is very similar to the first one. Regarding the very little data and the variety of different classes, the extracted features are key for a good performance of the model. For more complex features, a second hidden LSTM layer is added. This additional layer makes the neural network deeper and can take the learnings form the previous layer and combine it to obtain features at a higher level of abstraction. The two hidden layers are followed by a dropout and two fully connected dense layers to interpret and make the decision as in the first model. The second model is shown in Figure 11.  
As input, there are the four following different measures available:  
* Recorded sound from the unidirectional microphone;
* Three axes of the acceleration sensor.  
The conventional machine learning model needs all four inputs to perform better than chance. This subject is treated in more detail in the chapter results. To classify the different cases, a class vector that represents all categories is needed. Every category is assigned to a  
Figure 9: Flowchart of the LSTM model.  
number, see Table 1. A neuronal network needs multi-class classification, the classification of more than two classes, a binary class matrix where each column represents a class and each row represents a measurement and a sample. The category of each sample is assigned to its category by a one in the class-related column. The rest of the row are zeros.  
Figure 11: Model with two LSTM-layer.  
Figure 10: Model with one LSTM-layer.