# Detecting Plasma Detachment in the Wendelstein 7-X Stellarator Using Machine Learning
## 4 Summary and Outlook  
We presented our first step to a machine learning toolkit for fusion diagnostics developed by our research group. We found that power detachment in the Wendelstein 7-X stellarator can be detected using the combination of ML algorithms and video diagnostics, making the capabilities of such diagnostics more versatile. To decrease the amount of data that has to be processed we came up with a solution to only use specific, intensity profiles along predefined lines from the images as the inputs. Out of the three supervised classical algorithms used, the logistic regression had the best performance. To make sure the algorithm's \"definition\" was independent from the magnetic configurations, we ran it on several discharges with multiple magnetic configurations and no detachment: the  
Figure 8: Examples of “small plasmas” observed in the W7-X during discharge 20171207.021 with the location of the intensity profile (i.e., the part of the image where data processing takes place).  
Figure 7: Predictions on FTM, KJM and EIM magnetic configurations.  
results were promising with only insignificant amount of false positive predictions. Since the detached states we are interested in detecting are the stable detachment scenarios, where the radiation belt stays close to the separatrix, we also had to see if our model would not get tricked by the so called \"small plasmas\", an obstacle that it overcame.  
Future work includes reconfiguring the model to detect other detached states or only attachment. Our ultimate goal would be to have such algorithms operate real time during discharges on the soon-to-be finished real time framework of the EDICAM camera system, which will provide a higher level of data processing capabilities. As presented in this paper, machine- and deep learning applications hold a promising future for fusion plasma physics, for complicated use cases the utilization of more complex models, such as neural networks and its variants, is vital and is subject of investigations at the moment.  
Conceptualization, M.S. and T.S.; methodology, M.S.; software, M.S.; validation, M.S. and T.S.; formal analysis, M.S.; investigation, M.S.; resources, M.S., T.S., G.C., G.K., C.B., M.J., R.K., M.K., V.P., A.P.S.; data curation, M.S., T.S., M.J., V.P.; writing--original draft preparation, M.S.; writing--review and editing, M.S., T.S., G.K.; visualization, M.S.; supervision, T.S.; project administration, T.S.; funding acquisition, T.S. All authors have read and agreed to the published version of the manuscript.  
This work has been carried out within the framework of the EUROfusion Consortium and has received funding from the Euratom research and training programme 2014-2018 and 2019-2020 under grant agreement No 633053. The views and opinions expressed herein do not necessarily reflect those of the European Commission.  
The datasets used in this article are property of the Max-Planck Institute for Plasma Physics, the Wendelstein 7-X project and the EUROfusion Consortium. Access to the datasets can be provided for non-commercial purposes upon request.  
For the Wendelstein 7-X Team, see the author list in [14].  
The authors declare no conflict of interest.