## 3 Results and Discussion
### Optimization of Network Architecture and Parameters  
In this section, the parameters and the layer sizes of the ANN will be chosen systematically. First, the training function and the error measure will be varied for 10,000 samples to choose the best option. We tested multiple training functions, which are available in Matlab. The resulting success rates are presented in Table 5. The training function of the reference network, already offers the best success rate. Therefore, no change is necessary. Analogously, multiple error functions for the training with the train  
Figure 7: The success rate of the classification depends on the number of samples in the recording and therefore the recording length. tested (results in Table 6). The maximum success rate was achieved with the mean square error measure, which was already implemented in the reference network. Based on the sample numbers 10,000 and 30,000, the next parameter to be varied is the network size. All previous evaluations and optimizations were based on a four-layer feedforward network with a hidden layer neuron count of 100 and 60, respectively. In the course of the network size optimization, the number of neurons of the hidden layers is now changed. The number of neurons in the first hidden layer L\({}^{1}\) is varied systematically between 10 and 200 neurons. For the number of neurons of the second hidden layer L\({}^{2}\) the values L\({}^{2}\) = L\({}^{1}\) and L\({}^{2}\) = L\({}^{1}\)/2 are analyzed, respectively. The obtained success rates can be seen in Figure 8 as a function of network size. The focus in the following is on a sample number of 30,000, as the maximum success rate could be achieved. Additionally, the corresponding values for a sample number of 10,000 are also listed in brackets, if the application enforces a faster classification. Table 7 shows the network size and the most important training parameters for the optimized networks. The average success rate can be increased to 77%. Table 8 lists the achieved success rates for the classifications of each measurement date. Compared to the results of the reference network in Table 4 the classification is improved in all dates and for both network sizes. It is surprising that the success rate is decreasing with the number of neurons. Please note that we varied the number of layers with similar results. Increasing the number of layers and therefore the degrees of freedom of the ANN did not improve the success rate. With an average of 77% correct classifications a system can be built to automatically determine the general state of a print head. It is not sufficient to be sure whether a specific nozzle is functional or not, but it is sufficient to estimate if the print head needs maintenance. Therefore, a tool for predictive maintenance of piezo print heads can be built based on our results. An example of the confidence interval for an estimation of functional nozzles will be described in the next section. \begin{table}
\begin{tabular}{l c} \hline \hline
**Error Measure** & **Success Rate** \\ \hline mse (Mean squared error performance function) & 72.7\% \\ mae (Mean absolute error performance function) & 67.6\% \\ crossentropy (Cross-entropy performance) & 71.9\% \\ sae (Sum absolute error performance function) & 71.6\% \\ sse (Sum squared error performance function) & 72.5\% \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Success rate depending on the error measure in the training of the ANN.