## 3 Basics for Implementation of the Machine-Learning Algorithm  
A machine-learning (ML) approach based on artificial neural networks (ANNs) was used in this study for damage identification, and to solve the inverse problem of correlating some input features extracted from the observed signals with some damage parameters, including (i) a binary variable for damage detection, (ii) damage coordinates for localization, and (iii) damage extent for its assessment. In particular, the ANN used here was the Multilayer perceptron (MLP), consisting of a collection of connected nodes; namely, the input layer nodes, the hidden layer nodes, and the output nodes. In this work, the input nodes collected the input vector \(x\), including the frequency pattern of the FFT of the vibration signal, one hidden layer is used for computation, and the output vector \(y\) included either a binary variable (for damage detection) or continuous variables for damage localization and quantification.  
The general structure for the MLP is schematized in Figure 13. Each node i was connected to each node j in the preceding and the following layers through a connection of weights. Signals passed through each node as follows: in layer \(k\) (hidden layer), a weighted sum was performed at each node \(i\) of all the signals from the preceding layer, giving the excitation of the node; this was then passed through a nonlinear activation function \(f\) to emerge as the output node to the next layer; the activation function \(f\) in this case was restricted to \(f(x)=tanh(x)\). One node of the network, the bias node \(b\), was special in that it was connected to all other nodes in the hidden and output layers; the output of the bias node was held fixed throughout to allow constant offsets in the excitations of each node. The response of node i is reported in Equation (3):  
\[x_{i}^{k}=f\Big{(}z_{i}^{k}\Big{)}=f\Bigg{(}\sum_{j}w_{ij}^{k}*x_{j}^{k-1}+b_{ j}^{k-1}\Bigg{)} \tag{3}\]  
Finally, after combination of the outputs from each node in the hidden layer, the output-unit activation function generated the output values \(x_{1}^{O}\). Here, a sigmoidal activation function was used for damage detection, which was posed as a classification problem, and a linear activation function was considered for damage localization and quantification, which were posed as a regression problem in this work.  
The first stage of using a network to model an input-output system is to establish the appropriate values for the connection weights and biases. This is the training (or learning) phase. The type of training adopted here was a form of supervised learning and made use of a set of network inputs for which the desired network outputs were known. Note that in this specific application, the examples used for training were generated based on the simulation previously described. At each training step, a set of inputs was passed forward through the network, yielding trial outputs that could be compared with the desired outputs. If the comparison error was considered small enough, the weights were not adjusted. If, however, a significant error was obtained, the error was passed backwards through the net and a training algorithm used the error to adjust the connection weights. The networks used for this study were designed and trained using MATLAB code.  
However, to guarantee a sufficient capability of the algorithm trained on some examples to generalize well on new experimental signals was a non-trivial task. A procedure suitable for the optimization of the ANN structure and the evaluation of its performances in terms of damage diagnosis was used, including cross-validation techniques with an early-stopping criterion [15], thus avoiding data overfitting, even in presence of a limited number of examples. For cross-validation, the available dataset was split into three subsets; namely, for training, validation, and testing of the ANN structure, with proportions of 70%, 15%, and 15%, respectively, with the latter allowing us to verify the ANN prediction performance on new data.