## 5 A Data-Driven Model for JET with the ILW  
To illustrate the potential of the proposed methodology, in this section the task of extracting a mathematical model directly from the data is assessed. The case discussed is an example, for which the \"a priori\" knowledge about the problem is kept to a minimum. For the sake of simplicity and linearity of explanation, only the probabilistic versions of SVM and CART ensembles are discussed but the same results and considerations are valid also for the other versions of the tools. The SVM and CART ensembles are applied to the database without any bias and, in particular, various possible input variables have been tested, to converge on the two providing the best results. The objective of this example is to show how the technique proposed can be used to obtain a practical, easily interpretable, and implementable formula in two dimensions. The issues related to building models of higher dimensionality, giving the data available, are discussed in the next section. JET campaigns C29-C30 with the ILW have been used to train the SVM and the CART ensembles. In the case of the disruptive discharges, the 12 ms interval before the beginning of the current quench are divided into four subintervals of 3 ms each, and the averages of these three subintervals are the features. For the safe discharges, an interval of 40 ms on the flat top is divided in four 10 ms ranges and the averages over those subintervals are the features. In the first exploratory phase, the SVM and the CART ensembles have been trained with a wide set of global quantities as inputs, to identify the two features providing the best performance. In agreement with previous investigations reported in the literature, the locked mode and the internal inductance amplitudes turn out to be the most informative signals. Indeed, the classifiers, using these inputs, achieve by far the best results. This fact confirms various past studies, which have shown quite convincingly that these two quantities are quite essential in predicting the occurrence of disruptions at least for mitigation purposes [5; 6; 7; 10; 11; 18; 19; 20; 21; 27; 28; 29]. Using the \(LM\) and \(l_{i}\) amplitudes, the posterior probabilities have then been calculated as indicated in Section 2. The outputs of the ML classifiers have been investigated for a whole range of threshold probabilities. It turns out that the probability value, which provides the best performance for both classifiers, is around 80% for both techniques; this has been confirmed by a systematic scan of the classifiers developed for the present study. Therefore, the model trained with this threshold is the one whose results have been reported in the paper. It is worth mentioning that, for the interval (50%, 80%) of threshold probability, all the models give very similar results [27]. So, the choice of the threshold is not too critical for the purpose of the present paper, the identification of a manageable formula to describe the boundary between safe and disruptive regions of the operational space. Figure 4: Overview of the database. Green triangles: disruptive examples. Black asterisks: safe discharges. The vertical line indicates the beginning of C31, the campaign used as test setT. The curve level plots of the posterior probability are reported in Figure 5 for the SVM and in Figure 6 for the CART ensemble. The safe and disruptive regions are well separated in the plane of the locked mode and internal inductance. This clear discrimination is confirmed by the results in terms of success rate and false alarms reported in the first two rows of Table 1, from which it is easy to appreciate the extremely good performance of both probabilistic classifiers. In this, as in all the other tables, the last two columns report the mean and standard deviation of the interval elapsing between the time of the alarm and the disruption, i.e., the beginning of the current quench.