# Performance Comparison of Machine Learning Disruption Predictors at JET
## 3 Models Implementation and Results
### MLP-NN Disruption Prediction Model  
In Table 3, the training parameters of a single hidden layer MLP-NN model are reported. The parameter \(\sigma\) determines the change in the weight for the second derivative approximation, and the parameter \(\lambda\) regulates the indefiniteness of the Hessian. In Figure 3a, the input features are shown for a test disrupted discharge (#94218) belonging to a JET campaign temporally far from those used in the model training. The disruptive likelihood is reported in Figure 3b. An alarm is triggered when the disruptive likelihood remains above the optimized threshold for at least a number of samples, corresponding to an assertion time obtained by multiplying this number of samples by the sampling time equal to 2 ms. The assertion time can be introduced to avoid wrong alarms due to spikes in the disruptive likelihood. As reported in Table 3, the MLP-NN does not need an assertion time, which is then equal to 0 ms. This means that optimizing the threshold of the model is sufficient to make the MLP-NN response robust in terms of detecting the presence of disruption precursors, while keeping the number of false alarms low. The vertical dashed line in Figure 3b identifies the alarm time \(t_{alarm}\), resulting in a warning time \(\Delta t_{warning}\) = 408 ms. In Table 4, the confusion matrix is reported (green: successful results; red: mistakes) together with the prediction performance indices. All the indices have very good values with an excellent balance between the correct predictions of the disrupted pulses and a very limited number of false alarms in the regularly terminated pulses. All these numbers overcome the results in the literature, e.g., ([PERSON] et al., 2016), where an MLP was trained with only 0-D signals without the introduction of information, even if synthesized, from plasma profiles. The use of plasma profiles information really introduces a big benefit on the predictor performance. Despite these very high-performance index values, and despite the extreme simplicity of the model architecture, the MLP-NNs suffer to be 'black boxes' models, which provide a good prediction but are very difficult to interpret. For this reason, other ML predictor architectures have been nominated in recent years to be those selected for future fusion devices. Once the GTM model has been trained and successively colored, it can be used to track the dynamics of a new discharge by projecting the temporal sequence of its samples on the map. In Figure 4, the trajectory of the discharge is represented with a dashed line, the color of which darkens during the time evolution up to the tip of the arrow representing the end point. \begin{table}
\begin{tabular}{l l} \hline
**Parameters** & **Value** \\ \hline Optimizer & Back Propagation and Scaled Conjugate \\  & Gradient algorithm ([PERSON] et al., 2016) \\ Number of input neurons & 7 \\ Number of hidden neurons & 10 \\ Number of output neurons & 1 \\ Weights initialization & Random \\ Learning rate (\(\sigma\), \(\lambda\)) & (\(5\cdot 10^{-5}\), \(5\cdot 10^{-7}\)) \\ Best epoch & 23 \\ Validation stop (consecutive evaluations) & 75 \\ Assertion Time (ms) & 0 \\ \hline \end{tabular}
\end{table} 
Table 3: MLP-NN training parameters. \begin{table}
\begin{tabular}{|c|c|c|c|} \hline \hline  & \multicolumn{2}{c|}{Predicted} \\ \cline{2-4}  & P + N = 257 & P = 133 & N = 124 \\ \hline \multirow{4}{*}{Train} & P = 108 & TP = 103 & FN = 5 \\ \cline{2-4}  & N = 149 & FP = 5 & TN = 144 \\ \hline \multirow{4}{*}{Train} & PRECISION = 0.954 & RECALL = 0.954 & SPECIFICITY = 0.966 \\ \cline{2-4}  & ACCURACY = 0.961 & F1 = 0.954 & F2 = 0.954 \\ \cline{1-1} \cline{2-4}  & SP\% = 100\% & MA\% = 0\% & FA\% = 1.85\% \\ \hline \multirow{2}{*}{Test} & SP\% = 95.37\% & MA\% = 2.78\% & FA\% = 3.36\% \\ \hline \end{tabular}
\end{table} 
Table 4: Confusion matrix and performance indices of the MLP-NN prediction model evaluated on the test set.