<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Astron. Space Sci.</journal-id>
<journal-title>Frontiers in Astronomy and Space Sciences</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Astron. Space Sci.</abbrev-journal-title>
<issn pub-type="epub">2296-987X</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fspas.2020.00055</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Astronomy and Space Sciences</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Automatic Classification of Plasma Regions in Near-Earth Space With Supervised Machine Learning: Application to Magnetospheric Multi Scale 2016&#x02013;2019 Observations</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name><surname>Breuillard</surname> <given-names>Hugo</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x0002A;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/950982/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Dupuis</surname> <given-names>Romain</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/981407/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Retino</surname> <given-names>Alessandro</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/762320/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Le Contel</surname> <given-names>Olivier</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/1040372/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Amaya</surname> <given-names>Jorge</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/839361/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Lapenta</surname> <given-names>Giovanni</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/115727/overview"/>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Laboratoire de Physique des Plasmas (LPP)</institution>, <addr-line>Palaiseau</addr-line>, <country>France</country></aff>
<aff id="aff2"><sup>2</sup><institution>Center for Mathematical Plasma Astrophysics (CmPA), KU Leuven</institution>, <addr-line>Leuven</addr-line>, <country>Belgium</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Bala Poduval, University of New Hampshire, United States</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: Joseph Eric Borovsky, Space Science Institute, United States; Xiangning Chu, University of Colorado Boulder, United States</p></fn>
<corresp id="c001">&#x0002A;Correspondence: Hugo Breuillard <email>hbreuill&#x00040;gmail.com</email></corresp>
<fn fn-type="other" id="fn001"><p>This article was submitted to Space Physics, a section of the journal Frontiers in Astronomy and Space Sciences</p></fn></author-notes>
<pub-date pub-type="epub">
<day>03</day>
<month>09</month>
<year>2020</year>
</pub-date>
<pub-date pub-type="collection">
<year>2020</year>
</pub-date>
<volume>7</volume>
<elocation-id>55</elocation-id>
<history>
<date date-type="received">
<day>10</day>
<month>04</month>
<year>2020</year>
</date>
<date date-type="accepted">
<day>23</day>
<month>07</month>
<year>2020</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x000A9; 2020 Breuillard, Dupuis, Retino, Le Contel, Amaya and Lapenta.</copyright-statement>
<copyright-year>2020</copyright-year>
<copyright-holder>Breuillard, Dupuis, Retino, Le Contel, Amaya and Lapenta</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license>
</permissions>
<abstract><p>The proper classification of plasma regions in near-Earth space is crucial to perform unambiguous statistical studies of fundamental plasma processes such as shocks, magnetic reconnection, waves and turbulence, jets and their combinations. The majority of available studies have been performed by using human-driven methods, such as visual data selection or the application of predefined thresholds to different observable plasma quantities. While human-driven methods have allowed performing many statistical studies, these methods are often time-consuming and can introduce important biases. On the other hand, the recent availability of large, high-quality spacecraft databases, together with major advances in machine-learning algorithms, can now allow meaningful applications of machine learning to <italic>in-situ</italic> plasma data. In this study, we apply the fully convolutional neural network (FCN) deep machine-leaning algorithm to the recent Magnetospheric Multi Scale (MMS) mission data in order to classify 10 key plasma regions in near-Earth space for the period 2016-2019. For this purpose, we use available intervals of time series for each such plasma region, which were labeled by using human-driven selective downlink applied to MMS burst data. We discuss several quantitative parameters to assess the accuracy of both methods. Our results indicate that the FCN method is reliable to accurately classify labeled time series data since it takes into account the dynamical features of the plasma data in each region. We also present good accuracy of the FCN method when applied to unlabeled MMS data. Finally, we show how this method used on MMS data can be extended to data from the Cluster mission, indicating that such method can be successfully applied to any <italic>in situ</italic> spacecraft plasma database.</p></abstract>
<kwd-group>
<kwd>heliophysics</kwd>
<kwd>classification</kwd>
<kwd>near-Earth regions</kwd>
<kwd>magnetospheric multiscale mission</kwd>
<kwd>time series</kwd>
<kwd>machine learning</kwd>
</kwd-group>
<contract-sponsor id="cn001">H2020 European Institute of Innovation and Technology<named-content content-type="fundref-id">10.13039/100010686</named-content></contract-sponsor>
<counts>
<fig-count count="6"/>
<table-count count="5"/>
<equation-count count="4"/>
<ref-count count="32"/>
<page-count count="13"/>
<word-count count="8682"/>
</counts>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="s1">
<title>1. Introduction</title>
<p>Near-Earth space regions classification is a very challenging topic in space physics because of the strong plasma dynamics resulting from the interaction between the propagating solar wind and the standing Earth&#x00027;s magnetosphere. This obstacle forms a collisionless bow shock (Kivelson et al., <xref ref-type="bibr" rid="B15">1995</xref>) which can reflect and backpropagate energetic ions into the supersonic solar wind, forming the ion foreshock region upstream. However, most of the plasma is decelerated and heated downstream to a subsonic flow which forms a sheath around the Earth&#x00027;s magnetosphere called the magnetosheath. The boundary on which magnetosheath and magnetospheric pressures balance is called the magnetopause. The plasma flows along the magnetopause toward the magnetotail, driving the frozen-in magnetic field lines through the lobes, plasma sheet boundary layer and ultimately the plasma sheet, in which they eventually reconnect (Dungey, <xref ref-type="bibr" rid="B10">1963</xref>). This large-scale solar-terrestrial interaction process is dominated by the highly-variable solar wind conditions, but also by localized and intermittent small-scale processes in each region. As a result, the plasma throughout the near-Earth space is highly dynamic which make it impossible to classify the different regions using only spacecraft location along its orbit.</p>
<p>Yet, this classification is needed for statistical studies of the plasma properties of the different regions. These large-scale statistics are allowed by the ever-growing quantity of available <italic>in-situ</italic> data from space missions that cover most of the near-Earth space. A large amount of available data has been used to identify near-Earth space regions using human-driven (i.e., threshold-based) methods (e.g., Jel&#x000ED;nek et al., <xref ref-type="bibr" rid="B14">2012</xref>). However, finding the optimal set of thresholds which characterizes every region of the magnetosphere is time-consuming and presumably not flexible enough with regard to the large variability expected from the strong plasma dynamics. This may introduce important biases depending on the chosen thresholds, and may also result in many &#x0201C;unclassified&#x0201D; regions (i.e., a significant loss of information).</p>
<p>One way to bypass this issue and benefit from this large amount of data is to make use of supervised learning, the most common form of machine learning. The role of the supervised algorithms is to learn the relationship between data instances and an associated label for each data instance. For example, the text from an email may represent the data instance and the label is a binary encoding the presence or not of spam in order to detect and filter spams from emails. Supervised methods aim at expanding human knowledge automatically by identifying the intrinsic differences between labeled points in a dataset. This knowledge is then generalized to other unlabeled datasets. Such machine learning techniques show extremely promising (often state-of-the-art) results in various tasks, such as image and speech recognition, analyzing particle accelerator data, or natural language understanding (LeCun et al., <xref ref-type="bibr" rid="B16">2015</xref>). They have already been used specifically in heliophysics: to classify time series into several categories defined by the solar origin of the wind (Camporeale et al., <xref ref-type="bibr" rid="B9">2017</xref>), to detect magnetospheric ultra-low frequency waves (Balasis et al., <xref ref-type="bibr" rid="B5">2019</xref>), to forecast solar flares (Nishizuka et al., <xref ref-type="bibr" rid="B22">2017</xref>), or in particular to identify different regions of the near-Earth space (Nguyen et al., <xref ref-type="bibr" rid="B21">2019</xref>; Olshevsky et al., <xref ref-type="bibr" rid="B23">2019</xref>). Nevertheless, these models remain usually region- or mission-specific because the process of human-labeling is a time-consuming and tedious task and there is still a blatant lack of human labels to cover the whole near-Earth space.</p>
<p>However, the Magnetospheric Multi Scale mission (MMS) (Burch et al., <xref ref-type="bibr" rid="B8">2016</xref>), launched in 2015 and whose orbit covers most of near-Earth space, has enabled such a dataset to be built. This mission uses the so-called Scientist In The Loop (SITL) system (see the following section for more details) to human-label phenomena and regions of interest. The SITL process involves that an expert scientist is designated to select data of interest that will be transmitted to the ground as high-time resolution (burst) data. The selected intervals are tagged with timestamps and a comment, which are reported in the SITL reports. This system has been active since July 2015 and thus provides more than 4 years of commented data as of now. This makes it the biggest dataset of commented events and regions to our knowledge. We developed an automatic parser to convert all the comments, written by different scientists, in a unified list of labels that can be used by a machine learning algorithm.</p>
<p>All SITL comments are associated with a time interval, therefore the temporal variations of the measurements can be used to predict the label of the signals. Thus, each data instance can be interpreted as a time series and the near-Earth classification using SITL data can be seen as a time series classification (TSC), a very challenging problem in data mining and machine learning (Esling and Agon, <xref ref-type="bibr" rid="B11">2012</xref>; Fawaz et al., <xref ref-type="bibr" rid="B12">2019</xref>). The main difference with classical classification problems comes from the ordering of the data. The important features helping to discriminate the labels are mainly found in the ordering of the values while classical methods only consider the values at a given time. We employ two different techniques to solve this multivariate and multicategory classification task: the multilayer perceptron is applied naively on instantaneous data and is considered as a baseline for comparison and the convolutional neural network is applied on time series.</p>
<p>In this article, we use the magnetic field and particle measurements of the MMS mission to establish a vast and reproducible automatic detection of 8 plasma regions that cover almost the entire near-Earth space. First, we introduce the MMS and Cluster missions, and how we used the SITL reports to build a large labeled dataset of magnetic field, plasma moments and plasma distributions from the 2016-2019 period. Then, we present the two machine learning algorithms we used and their characteristics, as well as the metrics to measure their performances. Later, we present their respective results for the MMS mission and the adaptation to the Cluster mission. Finally, we discuss these results and show our conclusions.</p>
</sec>
<sec id="s2">
<title>2. Data</title>
<p>A fundamental and time-consuming step in any machine learning application is collecting, cleaning, and labeling data. This is a very important task as the quality of the data defines accuracy and the generalization capability of the model.</p>
<sec>
<title>2.1. The MMS and Cluster Missions</title>
<p>MMS is a NASA space mission, launched in 2015, designed to study the electron-scale physics in Earth&#x00027;s magnetosphere and in particular where magnetic reconnection occurs (Burch et al., <xref ref-type="bibr" rid="B8">2016</xref>). Its equatorial orbit is optimized to spend extended periods in locations where reconnection is known to occur and thus covers the majority of the near-Earth space key regions. The mission is composed of four identical spacecraft flying in an adjustable tetrahedral formation and its highly-elliptic orbit also covers almost all regions of near-Earth space. The direct-current (DC) magnetic field data are provided by the Fluxgate Magnetometer (FGM) from the FIELDS instrument suite (Russell et al., <xref ref-type="bibr" rid="B28">2016</xref>; Torbert et al., <xref ref-type="bibr" rid="B30">2016</xref>) with a temporal resolution of 0.1s in &#x0201C;survey&#x0201D; mode and the plasma parameters by the Fast Plasma Investigation (FPI) instrument Pollock et al. (<xref ref-type="bibr" rid="B26">2016</xref>) with a temporal resolution of 4.5 s in &#x0201C;fast&#x0201D; mode.</p>
<p>Cluster is an ESA space mission, launched in 2000, whose aim is to study the ion-scale physics of Earth&#x00027;s magnetic environment and its interaction with the solar wind. The mission is also composed of four identical spacecraft flying in a tetrahedral formation and its highly-elliptic polar orbit also covers almost all regions of near-Earth space. The magnetic field data are provided by the Fluxgate Magnetometer with a temporal resolution of 4 s (Balogh et al., <xref ref-type="bibr" rid="B6">2001</xref>) and the plasma parameters by the Hot Ion Analyzer instrument (R&#x000E8;me et al., <xref ref-type="bibr" rid="B27">2001</xref>) when the instrument was working under the magnetosphere or the magnetosheath mode.</p>
</sec>
<sec>
<title>2.2. The Labels Datasets</title>
<p>One of the most important innovation brought by the MMS mission is its burst data management and selection system. The MMS spacecraft collect a combined volume of &#x0007E;100 gigabits per day of particle and field data. On average, only 4 gigabits of that volume can be transmitted to the ground. With nested automation and &#x0201C;Scientist-in-the-Loop&#x0201D; (SITL) processes, this system is designed to maximize the value of the burst data by prioritizing the data segments selected for transmission to the ground.</p>
<p>Concretely, the SITL system consists of a manual selection process by a scientific expert designated to eyeball daily survey (low-time resolution) data and pick time intervals of interest that will be transmitted to the ground as burst (high-time resolution) data. The selected intervals are tagged with timestamps and a comment, which usually includes the type of event selected and eventually the near-Earth region in which it occurred. For each orbit, these selections are written up in a &#x0201C;SITL report,&#x0201D; in the form of a text file notably. An example of these reports can be found in Argall et al. (<xref ref-type="bibr" rid="B3">2020</xref>).</p>
<p>We developed a Python code which parses these text files to extract the timestamps and comments by identifying keywords associated with the near-Earth region where the event occurred. Each time interval was then associated with a label indicating where the spacecraft was located as follows.</p>
<p>If a region cannot be identified from the SITL comment, then the time interval is rejected. If FGM or FPI data is not available during a labeled time interval, then the time interval is also rejected. Using this technique, from the date at which the SITL reports are available as text files, i.e., April 2016, to the end of 2019, we collected 7, 832 labeled time intervals relevant for our study. We note here that the number of occurrences for each regions were somewhat unbalanced, so we added a total of 605 time intervals labeled by hand to undersampled regions (examples of typical plasma parameters for the different magnetospheric regions can be found in textbooks, e.g., Baumjohann and Treumann, <xref ref-type="bibr" rid="B7">1996</xref>), bringing the total to 8, 437 labeled time intervals of various lengths. We resampled the label data to the same cadence as FPI data, i.e., 4.5 s, representing a total of 1, 331, 133 labeled data points. This constitutes the biggest dataset of labeled time intervals for near-Earth space to our knowledge. The labels of the different regions are sorted roughly according to their distance to the Sun, and summarized in <xref ref-type="table" rid="T1">Table 1</xref>.</p>
<table-wrap position="float" id="T1">
<label>Table 1</label>
<caption><p>Labels for the 10 different near-Earth regions in our model.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th valign="top" align="left"><bold>Regions</bold></th>
<th valign="top" align="left"><bold>Labels</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">Solar wind</td>
<td valign="top" align="left">SW</td>
</tr>
<tr>
<td valign="top" align="left">Ion foreshock</td>
<td valign="top" align="left">FS</td>
</tr>
<tr>
<td valign="top" align="left">Bow shock</td>
<td valign="top" align="left">BS</td>
</tr>
<tr>
<td valign="top" align="left">Magnetosheath</td>
<td valign="top" align="left">MSH</td>
</tr>
<tr>
<td valign="top" align="left">Magnetopause</td>
<td valign="top" align="left">MP</td>
</tr>
<tr>
<td valign="top" align="left">Boundary layer</td>
<td valign="top" align="left">BL</td>
</tr>
<tr>
<td valign="top" align="left">Magnetosphere</td>
<td valign="top" align="left">MSP</td>
</tr>
<tr>
<td valign="top" align="left">Plasma sheet</td>
<td valign="top" align="left">PS</td>
</tr>
<tr>
<td valign="top" align="left">Plasma sheet boundary layer</td>
<td valign="top" align="left">PSBL</td>
</tr>
<tr>
<td valign="top" align="left">Lobe</td>
<td valign="top" align="left">LOBE</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Regarding the Cluster mission labels, we use the dataset presented in Nguyen et al. (<xref ref-type="bibr" rid="B21">2019</xref>). This dataset covers three near-Earth space regions, namely the magnetosphere, the magnetosheath and the solar wind, over a 2-year time period (2005&#x02013;2006). The data is resampled to a 1 min resolution, yielding a total of 148, 762 labeled points.</p>
</sec>
<sec>
<title>2.3. Final Data Set</title>
<p>Once the labels are defined, we build the final dataset that will feed the ML models. In Earth&#x00027;s magnetosphere, the plasma is dominated by its core magnetic field, thus the first feature we took into account is the magnetic field vector <inline-formula><mml:math id="M1"><mml:mover accent="true"><mml:mrow><mml:mi>B</mml:mi></mml:mrow><mml:mo>&#x02192;</mml:mo></mml:mover></mml:math></inline-formula>. Additionally, in each magnetospheric region the plasma has a rather typical distribution function. However, the full particle distribution function constitutes an enormous amount of data when dealing with several years of data (as done here), in particular with the MMS mission (several TB of data). Furthermore, important differences exist between different heliospheric missions in the specificities of the distribution functions, e.g., energy and angular ranges as well as energy and angular resolutions. Therefore, we chose not to consider those products and focused on moments only (density, bulk velocity and temperature), to keep our model lightweight and as general as possible (i.e., applicable to different heliospheric missions such as Cluster). For this latter reason, we also decided not to use the spacecraft location as a feature, because different missions cover different locations in near-Earth space (e.g., Cluster has a polar orbit while MMS has an equatorial orbit; apogees/perigees are different, etc.).</p>
<p>We start with loading the raw MMS magnetic field and plasma moments data from FGM and FPI instruments for the 2016&#x02013;2019 period using the aidapy package<xref ref-type="fn" rid="fn0001"><sup>1</sup></xref>, and resample the data to the FPI cadence, i.e., 4.5 s. The resulting dataset contains 12 variables: the magnetic field magnitude <italic>B</italic><sub><italic>tot</italic></sub> and its components <italic>B</italic><sub><italic>x</italic></sub>, <italic>B</italic><sub><italic>y</italic></sub>, <italic>B</italic><sub><italic>z</italic></sub>, the ion density <italic>N</italic><sub><italic>i</italic></sub>, the bulk velocity magnitude <italic>V</italic><sub><italic>i</italic><sub><italic>tot</italic></sub></sub> and its components <italic>V</italic><sub><italic>i</italic><sub><italic>x</italic></sub></sub>, <italic>V</italic><sub><italic>i</italic><sub><italic>y</italic></sub></sub>, <italic>V</italic><sub><italic>i</italic><sub><italic>z</italic></sub></sub>, the parallel and perpendicular temperatures <italic>T</italic><sub>&#x02225;</sub>, <italic>T</italic><sub>&#x022A5;</sub> with regards to the ambient magnetic field and the total value <italic>T</italic><sub><italic>tot</italic></sub>. The dataset is matched with the labels points defined in the previous section. If data gaps are present in the specified time interval, then the whole interval is rejected. This method yields a total dataset of size 1, 331, 133 &#x000D7; 12.</p>
<p>The TSC model requires as input arrays of equal sizes with one label per array. Thus the dataset is grouped as time series corresponding to the labeled time intervals, resulting in 6, 928 data blocks of various sizes. We decided to split these time series into equal chunks of 3 min, because this time length correspond roughly to the mean value of the data blocks (i.e., it minimizes the padding) and yields enough points (40) in each block given the time sampling resolution. To do so, we apply the following scheme: if the data block is shorter than 3 min, it is padded with the wrap of the vector along the axis (i.e., the first values are used to pad the end and the end values are used to pad the beginning); and if the data block is longer than 3 min, then it is split into several time series of 3 min each (the last one being padded as described above if also shorter than 3 min). <xref ref-type="table" rid="T2">Table 2</xref> gives the distribution of the occurrences for each class.</p>
<table-wrap position="float" id="T2">
<label>Table 2</label>
<caption><p>Number of occurrences for each class.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th/>
<th valign="top" align="center"><bold>Time series</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">SW</td>
<td valign="top" align="center">2,130</td>
</tr>
<tr>
<td valign="top" align="left">FS</td>
<td valign="top" align="center">4,714</td>
</tr>
<tr>
<td valign="top" align="left">BS</td>
<td valign="top" align="center">2,328</td>
</tr>
<tr>
<td valign="top" align="left">MSH</td>
<td valign="top" align="center">4,274</td>
</tr>
<tr>
<td valign="top" align="left">MP</td>
<td valign="top" align="center">3,764</td>
</tr>
<tr>
<td valign="top" align="left">BL</td>
<td valign="top" align="center">4,544</td>
</tr>
<tr>
<td valign="top" align="left">MSP</td>
<td valign="top" align="center">4,658</td>
</tr>
<tr>
<td valign="top" align="left">PS</td>
<td valign="top" align="center">3,576</td>
</tr>
<tr>
<td valign="top" align="left">PSBL</td>
<td valign="top" align="center">2,703</td>
</tr>
<tr>
<td valign="top" align="left">LOBE</td>
<td valign="top" align="center">1,468</td>
</tr>
<tr>
<td valign="top" align="left">Total</td>
<td valign="top" align="center">34,159</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>This operation yields a dataset as an multidimensional array of size (34159, 40, 12). Finally, to input this array to the TSC model (and to avoid temporal bias due to the spacecraft orbit), we shuffle and randomly split the time series into training (56.25%), test (25%), and validation (18.75%) datasets. These three classical categories are defined such as:</p>
<list list-type="bullet">
<list-item><p>The training set is used to determined the weights of the model;</p></list-item>
<list-item><p>The validation set is an out-of-sample set and allows to evaluate the error for data which has not been observed. In particular, the validation set is used for hyperparameter search and early stopping to avoid over-fitting ensuring a good generalization of the model;</p></list-item>
<list-item><p>The test set is also an out-of-sample set which has not been used during training. The data are only used after the training to assess the performance of the final model, after training and hyperparameter optimization.</p></list-item>
</list>
</sec>
</sec>
<sec id="s3">
<title>3. Classification Methods With a Fully Convolutional Neural Network</title>
<p>In this section, we overview the machine-learning algorithm we use: the fully convolutional neural network (FCN). This algorithm is assessed with several evaluation metrics. FCN works with time-dependant inputs (time series) in order to learn dynamical features. The main purpose of classifying time series and not only the instantaneous values is to learn automatically different features across the time dimension. The events can be characterized by dynamical insights at different scales learned by the model. We present a second model, called Multilayer perceptron (MLP), in the <xref ref-type="supplementary-material" rid="SM1">Supplementary Materials</xref>. It considers the input of the 12 variables as time independent. The main advantages of this method are its simplicity to prepare the machine learning pipeline and the possibility to work with any temporal resolution. However, the classification performance is much lower.</p>
<p>The FCN belongs to the category of artificial neural networks. They are usually characterized by their architecture: number of layers, type of connection (feedforward, feedback, convolution, etc.), and the activation functions. A layer is defined as a set of neurons which are not connected to each other. We selected neural network as they are able to learn non-linear models and can handle large datasets compared to kernel methods.</p>
<sec>
<title>3.1. Model Presentation</title>
<p>Time series classification (TSC) is an active field of research and hundreds of different algorithms have been developed in recent years (Bagnall et al., <xref ref-type="bibr" rid="B4">2017</xref>). Classical TSC usually uses new features spaces generated from the time series. The best performing models can combine dozen of different classifiers and feature transformations, leading to significant complexity and an important computational cost (Lucas et al., <xref ref-type="bibr" rid="B18">2019</xref>).</p>
<p>Even if deep learning has seen very successful applications in the last decades, only a few examples of algorithms for TSC exist. This lack of overview has been filled recently (Fawaz et al., <xref ref-type="bibr" rid="B12">2019</xref>) and several models show very promising results. In particular, we are convinced that convolution architectures can build very accurate classifiers. The convolutional layers use convolution in place of general matrix multiplication.</p>
<p>Local groups of values are often highly correlated in time series and they form distinctive local motifs that are easily detected. Convolutional layers are designed to identify these patterns invariant to location: if a motif specific to a label appears in one part of the time series, it could also appear anywhere. Hence a convolutional layer sharing the same weights at different locations can detect temporal patterns in different parts of the time series (LeCun et al., <xref ref-type="bibr" rid="B16">2015</xref>). Moreover, several deep learning frameworks, such as Tensorflow (Abadi et al., <xref ref-type="bibr" rid="B1">2016</xref>) or Pytorch (Paszke et al., <xref ref-type="bibr" rid="B24">2019</xref>), are nowadays freely available. They provide differentiable programming to build very efficient neural networks. Thus, we consider deep learning for TSC for these two reasons: the availability of high-quality frameworks and the relevance of convolutional architectures.</p>
<p>The Fully Convolutional Network (FCN) (Wang et al., <xref ref-type="bibr" rid="B31">2017</xref>) is a competitive deep-learning architecture for TSC yielding good results on large benchmarks (Fawaz et al., <xref ref-type="bibr" rid="B12">2019</xref>). The network architecture is relatively simple and is comprised of a sequence of thee time convolution blocks followed by a global average pooling block (Lin et al., <xref ref-type="bibr" rid="B17">2013</xref>). Each time convolution block is divided into a convolution layer, a batch normalization layer, and a Rectified Linear Unit (RELU) Nair and Hinton (<xref ref-type="bibr" rid="B20">2010</xref>) activation function. The convolutional layer is used to extract temporal features from the inputs by performing a convolution between the input signal and several filters. Each convolutional block has different filter lengths in order to analyze several time scales. The extracted features of the last convolutional block are used as inputs for the global average pooling (GAP) module to output the classification result. This last block is composed of the global average pooling layer and the Softmax layer. A more complete description of the FCN architecture can be found in Wang et al. (<xref ref-type="bibr" rid="B31">2017</xref>) and Fawaz et al. (<xref ref-type="bibr" rid="B12">2019</xref>).</p>
<p>As regards the numerical parameter, we performed a bayesian optimization to select the hyperparameters using the validation set for four parameters:</p>
<list list-type="bullet">
<list-item><p>The optimizer: adam or rmsprop</p></list-item>
<list-item><p>The learning rate: between 10<sup>&#x02212;6</sup> and 10<sup>&#x02212;3</sup>;</p></list-item>
<list-item><p>The batch size: 32, 64, or 92;</p></list-item>
<list-item><p>The number of filters: the baseline of the FCN paper, half the baseline and twice the baseline. The baseline given by the FCN paper (Wang et al., <xref ref-type="bibr" rid="B31">2017</xref>) is the following: the first convolutional block has 128 filters with a filter length equal to 8, the second convolution extracts features with 256 filters of size 5 and the final convolutional layer is defined by 128 filters, each one with a length equal to 3.</p></list-item>
</list>
<p>The final FCN is trained for 1, 000 epochs with the categorical cross entropy as loss function. The result of the bayesian optimization provides the different hyperparameters. The Adam optimizer is used with an initial value of the learning rate set to 0.00002. An adaptive learning rate decrease is selected (with a minimum learning rate of 10<sup>&#x02212;6</sup>), reducing the learning rate when the validation accuracy has stopped improving for 50 epochs. A batch size of 92 is used with twice the baseline configuration for the number of filters. The final FCN has 1, 079, 000 free parameters. The method of early termination is adopted to avoid over-fitting and stops the learning process when the validation loss did not decrease for 20 epochs. All the time series are standardized before the training process. The learning curve is presented in <xref ref-type="fig" rid="F1">Figure 1</xref>. The learning process stopped after 140 epochs thanks to the early termination strategy.</p>
<fig id="F1" position="float">
<label>Figure 1</label>
<caption><p>Learning curve history comparing training and validation loss.</p></caption>
<graphic xlink:href="fspas-07-00055-g0001.tif"/>
</fig>
</sec>
<sec>
<title>3.2. Performance Evaluation</title>
<p>Assessing accurately the quality of a classification model raises significant challenges. A single and unified performance metric cannot effectively evaluate a multi-class classifier from all perspectives, such as class-balance or the number of different outcomes. Therefore, several metrics generalized from binary classification are considered.</p>
<p>The confusion matrix is a basic but useful tool to visualize the distribution of the predicted classes. Each column of the matrix gives the instances of a true class while each row represents the instance of a predicted class. Several metrics from binary classification can be generalized to multiclass by considering the prediction of each class as a binary classification problem: the given class has been predicted (positive) or not (negative). Then, the total number of True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN) can be computed and several metrics are defined:</p>
<list list-type="simple">
<list-item><p>- <bold>Accuracy</bold> is the most intuitive metric and gives the percentage of correct predictions among all the predictions <italic>N</italic><sub><italic>p</italic></sub>:
<disp-formula id="E1"><label>(1)</label><mml:math id="M2"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>a</mml:mi><mml:mi>c</mml:mi><mml:mi>c</mml:mi><mml:mi>u</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>c</mml:mi><mml:mi>y</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>T</mml:mi><mml:mi>P</mml:mi><mml:mo>&#x0002B;</mml:mo><mml:mi>T</mml:mi><mml:mi>N</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mrow><mml:mi>N</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:mfrac><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p></list-item>
<list-item><p>- <bold>Precision</bold>, also called positive predictive value, measures the proportion of positive values that are correctly identified as such among all predicted positives. In other words, it corresponds to the percentage of detections that are right. High precision is associated to a small amount of FP:
<disp-formula id="E2"><label>(2)</label><mml:math id="M3"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>i</mml:mi><mml:mi>o</mml:mi><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>T</mml:mi><mml:mi>P</mml:mi></mml:mrow><mml:mrow><mml:mi>T</mml:mi><mml:mi>P</mml:mi><mml:mo>&#x0002B;</mml:mo><mml:mi>F</mml:mi><mml:mi>P</mml:mi></mml:mrow></mml:mfrac><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p></list-item>
<list-item><p>- <bold>Recall</bold>, also called the true positive rate, measures the proportion of positives detected. A significant number of missed true values (FN) leads to low recall:
<disp-formula id="E3"><label>(3)</label><mml:math id="M4"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>T</mml:mi><mml:mi>P</mml:mi></mml:mrow><mml:mrow><mml:mi>T</mml:mi><mml:mi>P</mml:mi><mml:mo>&#x0002B;</mml:mo><mml:mi>F</mml:mi><mml:mi>N</mml:mi></mml:mrow></mml:mfrac><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p></list-item>
<list-item><p>- <bold>F1-score</bold> is the harmonic mean of precision and recall. Usually, high recall is detrimental to precision and vice versa. Therefore, the F1-score gives a trade-off between the two quantities and can help to compare two classifiers with different precision and recall values:
<disp-formula id="E4"><label>(4)</label><mml:math id="M5"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:mi>a</mml:mi><mml:mi>c</mml:mi><mml:mi>c</mml:mi><mml:mi>u</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>c</mml:mi><mml:mi>y</mml:mi><mml:mo>=</mml:mo><mml:mn>2</mml:mn><mml:mo>.</mml:mo><mml:mfrac><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>i</mml:mi><mml:mi>o</mml:mi><mml:mi>n</mml:mi><mml:mo>.</mml:mo><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi></mml:mrow><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>i</mml:mi><mml:mi>o</mml:mi><mml:mi>n</mml:mi><mml:mo>&#x0002B;</mml:mo><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:mfrac><mml:mo>.</mml:mo></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p></list-item>
</list>
<p>All these metrics are computed for each class. Therefore, averaged quantities can be also defined to provide a more general view of the classifier. A macro-average gives the unweighted mean of the metric without taking imbalance into account and a micro-average computes the average weighted by the number of true instances for each class. The micro-average will account for label imbalance.</p>
<p>Finally, a receiver operating characteristic (ROC), also called ROC curve, is a graphical tool illustrating the performance of a binary classifier system when the discrimination threshold is varied. Indeed, each class prediction is associated to a probability. Usually, the class predicted by the classifier is chosen as the class with the highest probability. Instead, a threshold value can be used to decide if the class is effectively predicted by the classifier. The ROC curve plots the fraction of true positives out of all the predicted positives (True Positive Rate) vs. the fraction of false positives out of all the predicted negatives (False Positive rate) at various threshold values. For instance, all classes are predicted with a zero threshold (False Positive Rate and True Positive Rate of 1.0) while there are no correct predicted class and no false positive with a unit threshold (False Positive Rate and True positive rate of 0.0). A perfect classifier is located on the left corner of the curve with a true positive rate of 1.0 and a false positive rate of 0.0. A ROC curve can be drawn for each class. In case of a model with no discrimination capacity to distinguish between positive class and negative class, the ROC curse is a straight line of slope 1. The area under the ROC curve (AUC) summarized in one number if the model is capable of distinguishing between classes.</p>
</sec>
</sec>
<sec sec-type="results" id="s4">
<title>4. Results</title>
<sec>
<title>4.1. Classification of MMS Data</title>
<p>We use here the test set (the out-of-sample set that is not involved in the training process) to evaluate the performance of the model. It is obtained by shuffling 25% of the data as described in section 2.3.</p>
<p><xref ref-type="table" rid="T3">Table 3</xref> summarizes the precision, recall, f1-score, and AUC evaluated by the FCN for the 10 different classes. In term of absolute values, the FCN shows great performance metrics. The AUC value is above 0.98 for all the classes. It means that a significant probability is always associated to the correct region by the classifier, even it is not the highest probability. For instance, the classifier could give a probability of 45% to the SW and 35% to the FS for a test sample belonging to the FS. Even if the prediction is wrong, the classifier still has detected some features which can belong to the correct class.</p>
<table-wrap position="float" id="T3">
<label>Table 3</label>
<caption><p>Classification report for FCN computed on the test set.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th/>
<th valign="top" align="center"><bold>Precision</bold></th>
<th valign="top" align="center"><bold>Recall</bold></th>
<th valign="top" align="center"><bold>f1-score</bold></th>
<th valign="top" align="center"><bold>AUC</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">SW</td>
<td valign="top" align="center">0.88</td>
<td valign="top" align="center">0.92</td>
<td valign="top" align="center">0.90</td>
<td valign="top" align="center">1.00</td>
</tr>
<tr>
<td valign="top" align="left">FS</td>
<td valign="top" align="center">0.93</td>
<td valign="top" align="center">0.95</td>
<td valign="top" align="center">0.94</td>
<td valign="top" align="center">1.00</td>
</tr>
<tr>
<td valign="top" align="left">BS</td>
<td valign="top" align="center">0.85</td>
<td valign="top" align="center">0.80</td>
<td valign="top" align="center">0.83</td>
<td valign="top" align="center">0.99</td>
</tr>
<tr>
<td valign="top" align="left">MSH</td>
<td valign="top" align="center">0.91</td>
<td valign="top" align="center">0.91</td>
<td valign="top" align="center">0.91</td>
<td valign="top" align="center">0.99</td>
</tr>
<tr>
<td valign="top" align="left">MP</td>
<td valign="top" align="center">0.84</td>
<td valign="top" align="center">0.84</td>
<td valign="top" align="center">0.84</td>
<td valign="top" align="center">0.99</td>
</tr>
<tr>
<td valign="top" align="left">BL</td>
<td valign="top" align="center">0.84</td>
<td valign="top" align="center">0.84</td>
<td valign="top" align="center">0.84</td>
<td valign="top" align="center">0.98</td>
</tr>
<tr>
<td valign="top" align="left">MSP</td>
<td valign="top" align="center">0.96</td>
<td valign="top" align="center">0.95</td>
<td valign="top" align="center">0.96</td>
<td valign="top" align="center">1.00</td>
</tr>
<tr>
<td valign="top" align="left">PS</td>
<td valign="top" align="center">0.89</td>
<td valign="top" align="center">0.89</td>
<td valign="top" align="center">0.89</td>
<td valign="top" align="center">0.99</td>
</tr>
<tr>
<td valign="top" align="left">PSBL</td>
<td valign="top" align="center">0.86</td>
<td valign="top" align="center">0.87</td>
<td valign="top" align="center">0.87</td>
<td valign="top" align="center">0.99</td>
</tr>
<tr>
<td valign="top" align="left">LOBE</td>
<td valign="top" align="center">0.95</td>
<td valign="top" align="center">0.95</td>
<td valign="top" align="center">0.95</td>
<td valign="top" align="center">1.00</td>
</tr>
<tr>
<td valign="top" align="left">Macro average</td>
<td valign="top" align="center">0.89</td>
<td valign="top" align="center">0.89</td>
<td valign="top" align="center">0.89</td>
<td valign="top" align="center">0.98</td>
</tr>
<tr>
<td valign="top" align="left">Micro average</td>
<td valign="top" align="center">0.89</td>
<td valign="top" align="center">0.89</td>
<td valign="top" align="center">0.89</td>
<td valign="top" align="center">0.99</td>
</tr>
<tr>
<td valign="top" align="left">Accuracy</td>
<td valign="top" align="center" colspan="4">0.89</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Two different groups of regions are identified in <xref ref-type="table" rid="T3">Table 3</xref>. The first group consisting of the FS, the MSP, and the LOBE is very well-predicted with a respective f1-score above 0.94 and a AUC of 1.00. Such regions show usually very specific patterns, explaining why the classification metrics are very high. The second group is formed by the BS, the MP, the BL, the PS, and the PSBL, with smaller metric values, such as a f-1 score between 0.82 and 0.88 and a AUC between 0.98 and 0.99. <xref ref-type="fig" rid="F2">Figure 2</xref> shows the different ROC curves for the FCN. BL and BS are the lowest curves. They have a much higher false positive rate when they reached a true positive rate of 1.0 compared to the other classes. It means that, for some very specifics predictions, the classifier associates a very low probability to the correct class. The BL and the BS are thin regions marking the boundary between larger regions. Therefore, several time intervals labeled by SITLs may overlap two or more nearby regions. It could explain the lower metric values for these two regions.</p>
<fig id="F2" position="float">
<label>Figure 2</label>
<caption><p>Receiver operating characteristic curve computed on the test set.</p></caption>
<graphic xlink:href="fspas-07-00055-g0002.tif"/>
</fig>
<p>From the <xref ref-type="supplementary-material" rid="SM1">Supplementary Material</xref>, the second model (MLP) has important also problems to classify regions with strong variations, such as the BS with a f-1 score below 0.5. Thus, it seems that convolutional methods help to improve the accuracy of the classifier for the most challenging regions and it validates the choice of such algorithms designed to extract important temporal features and variations.</p>
<p><xref ref-type="table" rid="T4">Table 4</xref> gives details on the FCN predictions with a confusion matrix. Very typical errors can be observed for nearby regions, such as: SW and FS; PS, BL, and PSBL; PSBL and LOBE; MP, MSH and BL. These errors can be explained by physical arguments. The plasma properties can be similar for several nearby regions. For instance, we may expect that MP shares common properties with MSH and MSP as the MP acts as a boundary between the two other regions. The SW region can also be very similar to the FS as the latter comes from the reflection of the SW on the BS, as stated in the introduction. Therefore, it may be concluded that the FCN model really learned the typical patterns associated to each region as the main errors are identified for regions with similar physics.</p>
<table-wrap position="float" id="T4">
<label>Table 4</label>
<caption><p>Confusion Matrix for FCN computed on the test set.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th/>
<th/>
<th valign="top" align="center" colspan="10" style="border-bottom: thin solid #000000;"><bold>True</bold></th>
</tr>
<tr>
<th/>
<th/>
<th valign="top" align="center"><bold>SW</bold></th>
<th valign="top" align="center"><bold>FS</bold></th>
<th valign="top" align="center"><bold>BS</bold></th>
<th valign="top" align="center"><bold>MSH</bold></th>
<th valign="top" align="center"><bold>MP</bold></th>
<th valign="top" align="center"><bold>BL</bold></th>
<th valign="top" align="center"><bold>MSP</bold></th>
<th valign="top" align="center"><bold>PS</bold></th>
<th valign="top" align="center"><bold>PSBL</bold></th>
<th valign="top" align="center"><bold>LOBE</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="middle" align="center" rowspan="11">Prediction</td>
</tr>
<tr>
<td valign="top" align="left" style="border-bottom: thin solid #000000;">SW</td>
<td valign="top" align="center" style="background-color:#bbbdc0;border-bottom: thin solid #000000;">493</td>
<td valign="top" align="center">53</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">8</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">2</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">1</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
</tr>
 <tr>
<td valign="top" align="left" style="border-bottom: thin solid #000000;">FS</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">42</td>
<td valign="top" align="center" style="background-color:#bbbdc0">1,140</td>
<td valign="top" align="center">40</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
</tr>
 <tr>
<td valign="top" align="left" style="border-bottom: thin solid #000000;">BS</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">2</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">12</td>
<td valign="top" align="center" style="background-color:#bbbdc0">450</td>
<td valign="top" align="center">54</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">8</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">1</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
</tr>
 <tr>
<td valign="top" align="left" style="border-bottom: thin solid #000000;">MSH</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">1</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">52</td>
<td valign="top" align="center" style="background-color:#bbbdc0">982</td>
<td valign="top" align="center">41</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">5</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
</tr>
 <tr>
<td valign="top" align="left" style="border-bottom: thin solid #000000;">MP</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">10</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">37</td>
<td valign="top" align="center" style="background-color:#bbbdc0">801</td>
<td valign="top" align="center">92</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">5</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">3</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">2</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">1</td>
</tr>
 <tr>
<td valign="top" align="left" style="border-bottom: thin solid #000000;">BL</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">1</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">4</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">78</td>
<td valign="top" align="center" style="background-color:#bbbdc0">933</td>
<td valign="top" align="center">49</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">39</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">10</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
</tr>
 <tr>
<td valign="top" align="left" style="border-bottom: thin solid #000000;">MSP</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">10</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">32</td>
<td valign="top" align="center" style="background-color:#bbbdc0">1,101</td>
<td valign="top" align="center">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
</tr>
 <tr>
<td valign="top" align="left" style="border-bottom: thin solid #000000;">PS</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">5</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">38</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">5</td>
<td valign="top" align="center" style="background-color:#bbbdc0">803</td>
<td valign="top" align="center">54</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">1</td>
</tr>
 <tr>
<td valign="top" align="left" style="border-bottom: thin solid #000000;">PSBL</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">7</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">13</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">59</td>
<td valign="top" align="center" style="background-color:#bbbdc0">572</td>
<td valign="top" align="center">15</td>
</tr>
 <tr>
<td valign="top" align="left" style="border-bottom: thin solid #000000;">LOBE</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">0</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">1</td>
<td valign="top" align="center" style="border-bottom: thin solid #000000;">16</td>
<td valign="top" align="center" style="background-color:#bbbdc0">354</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p><italic>The gray background corresponds to the correct classification in the confusion matrix</italic>.</p>
</table-wrap-foot>
</table-wrap>
</sec>
<sec>
<title>4.2. Examples of MMS Classification</title>
<p>In this section, we show some examples of time series observed by the MMS spacecraft as it spanned the different near-Earth regions, along with the labels of the classifications made by the FCN model.</p>
<p><xref ref-type="fig" rid="F3">Figure 3</xref> shows the MMS1 probe observations for the whole day of 2019-11-09, during which it flew through the dayside region. From top to bottom, the figure panels show the energy spectrum of the omnidirectional ion flux, the three components of the magnetic field (<italic>B</italic><sub><italic>x</italic></sub>, <italic>B</italic><sub><italic>y</italic></sub>, <italic>B</italic><sub><italic>z</italic></sub>) in GSE coordinates and its magnitude <italic>B</italic><sub><italic>tot</italic></sub>, the ion number density, the three components of the ion bulk velocity (<italic>V</italic><sub><italic>x</italic></sub>, <italic>V</italic><sub><italic>y</italic></sub>, <italic>V</italic><sub><italic>z</italic></sub>) in GSE coordinates, the ion temperatures parallel and perpendicular (<italic>T</italic><sub>&#x02225;</sub>, <italic>T</italic><sub>&#x022A5;</sub>) to the ambient magnetic field, and finally the labels given by the FCN model (FCN labels). The time in UT format and the spacecraft position (<italic>X</italic><sub><italic>pos</italic></sub>, <italic>Y</italic><sub><italic>pos</italic></sub>, <italic>Z</italic><sub><italic>pos</italic></sub> in <italic>R</italic><sub><italic>E</italic></sub> and GSE coordinates) are displayed at the bottom of the X-axis.</p>
<fig id="F3" position="float">
<label>Figure 3</label>
<caption><p>Example of MMS dayside classification. Labels, not present in the initial data set, have been manually added to compare the FCN predictions with a ground truth. They are represented by colored regions on the FCN labels plot.</p></caption>
<graphic xlink:href="fspas-07-00055-g0003.tif"/>
</fig>
<p>In this example, the FCN model classifies well the regions, as its labels follow to a great extend the MMS1 observations: first the spacecraft is located in the magnetosphere, then it crosses the magnetopause to enter the magnetosheath, afterwards it flies through a series of bow shocks and goes back and forth to the solar wind, until it finally enters the solar wind. The model is even able to precisely detect the small-scale dynamics of the boundary regions such as partial magnetopause, boundary layer and bow shock crossings, and the come and go between the solar wind and the ion foreshock. Only three points seem to be clearly misclassified (as MSP) in the ion foreshock. However, these points can be easily eyeballed as outliers or discriminated by their low quality flag.</p>
<p><xref ref-type="fig" rid="F4">Figure 4</xref> shows another example of the FCN classification method described above, but this time when MMS spacecraft flew through the nightside region. The MMS1 observations take place during the whole day of 2019-07-13, and the format is the same as in <xref ref-type="fig" rid="F3">Figure 3</xref>. In this example again, the FCN model is able to label properly the regions spanned by MMS1: at the very beginning MMS1 exits the magnetosphere to the plasma sheet boundary layer, then goes in and out the lobe regions before reaching the plasma sheet. Again, the FCN model is also able to pick up the small-scale dynamics such as short plasma sheet crossings.</p>
<fig id="F4" position="float">
<label>Figure 4</label>
<caption><p>Example of MMS nightside classification. Labels, not present in the initial data set, have been manually added to compare the FCN predictions with a ground truth. They are represented by colored regions on the FCN labels plot.</p></caption>
<graphic xlink:href="fspas-07-00055-g0004.tif"/>
</fig>
<p>The two examples shown in this section therefore support the good metrics obtained in the previous section, showing concretely that the FCN model is suited to properly label most of the MMS data with the regions spanned.</p>
</sec>
<sec>
<title>4.3. Locating Important Feature in Time Series With Class Activation Map</title>
<p>Class Activation Map (CAM) is a technique developed by Zhou et al. (<xref ref-type="bibr" rid="B32">2016</xref>) to get the discriminative regions used by a CNN to identify a specific class in the input data. I. CAM has been applied to TSC for one-dimensional case in Wang et al. (<xref ref-type="bibr" rid="B31">2017</xref>) for the first time. The objective in our case is to highlight the subsequences (i.e., sections) in each time series which are relevant to its class. Thus, this approach allows to explain the decision taken by the classifier. The mathematical description of the method can be found in Zhou et al. (<xref ref-type="bibr" rid="B32">2016</xref>), Wang et al. (<xref ref-type="bibr" rid="B31">2017</xref>), and Fawaz et al. (<xref ref-type="bibr" rid="B12">2019</xref>). This method works only for models with the global average pooling as last layer (Lin et al., <xref ref-type="bibr" rid="B17">2013</xref>). CAM is represented by a univariate time series (with the same size than the FCN input) where the value gives the importance of the signal to classification. Low values mean the subsequence does not contribute to the decision of the classifier while high values mean the section contributes significantly.</p>
<p><xref ref-type="fig" rid="F5">Figure 5</xref> shows CAM examples for two different classes: the solar wind and the foreshock. For each class, a well-predicted time series is drawn and colored by the value of the CAM, illustrating the results from MMS data given in section 4.1. As regards the SW example, almost all the input signal contributes to the classification, as stated by the uniform CAM values above 0.8 between 20 and 160 s. It means that the values of input features are much more important than their variations or than specific patterns. On the other hand, the classifier detects the FS mainly thanks to a specific pattern around 65 s associated to extrema for <italic>B</italic><sub><italic>x</italic></sub>, <italic>B</italic><sub><italic>y</italic></sub>, <italic>N</italic><sub><italic>i</italic></sub>, and <italic>V</italic><sub><italic>y</italic></sub> and significant slopes for the other features. Only a few specific time intervals are involved in the decision of the classifier for FS. The CAM analysis strengthens the conclusion that temporal and dynamical analysis are fundamental to classify nearby regions with fluctuating behaviors. For instance, the MLP results given in the <xref ref-type="supplementary-material" rid="SM1">Supplementary Materials</xref> shows that a significant number of SW region are misclassified as FS as the model works only on instantaneous quantities.</p>
<fig id="F5" position="float">
<label>Figure 5</label>
<caption><p>The Class Activation Map highlighting the important sections of the time series contributing most to the classification. Low values mean the time step of the time series does not contribute to the decision of the classifier while high values mean the time step contributes significantly. <bold>(A)</bold> Solar wind. <bold>(B)</bold> Foreshock.</p></caption>
<graphic xlink:href="fspas-07-00055-g0005.tif"/>
</fig>
</sec>
<sec>
<title>4.4. Extension to Cluster Mission</title>
<p>In this section, we put to test the adaptability of the FCN model to different magnetospheric data, namely data from the Cluster mission. This mission has been chosen as the data is pretty close to MMS data (notably the data sampling), and a 2-year period of labeled data is available (see Nguyen et al., <xref ref-type="bibr" rid="B21">2019</xref>) to audit the classification resulting from the model.</p>
<p>First, we qualitatively assess the quality of the different classification methods, by comparing them with C1 probe observations. We randomly select a day during which the C1 probe flew through the dayside region. This example, from the day of 2005-02-13, is shown in <xref ref-type="fig" rid="F6">Figure 6</xref> in the same format as <xref ref-type="fig" rid="F3">Figures 3</xref>, <xref ref-type="fig" rid="F4">4</xref>, except that we include the manual labels from Nguyen et al. (<xref ref-type="bibr" rid="B21">2019</xref>) (named &#x0201C;Man labels&#x0201D;) in the penultimate bottom panel.</p>
<fig id="F6" position="float">
<label>Figure 6</label>
<caption><p>Example of Cluster dayside classification.</p></caption>
<graphic xlink:href="fspas-07-00055-g0006.tif"/>
</fig>
<p>The &#x0201C;Man labels&#x0201D; are in good agreement with the observations of C1, as the probe is first located in the magnetosphere, then flies through the magnetosheath and finally reaches the solar wind. The &#x0201C;FCN labels&#x0201D; show also good agreement with C1 observations: the probe is first located in the magnetosphere and then crosses the magnetopause a few times before entering the magnetosheath, then it crosses the bow shock to enter the solar wind before crossing several times again the bow shock and finally spanning the ion foreshock. As in the examples shown for the MMS mission, the FCN model is able to pick up the small-scale dynamics of the near-Earth frontiers: the magnetopause, the bow shock and the foreshock. As a result, the model is able to outperform the manual labels by identifying in more detail the magnetospheric regions, in particular the small-scale dynamics of the transition regions.</p>
<p>Then, we take advantage of the 2-year period of Cluster labeled data from Nguyen et al. (<xref ref-type="bibr" rid="B21">2019</xref>) to quantify the quality of the FCN model classification, by investigating the performance metrics. We select the points labeled as &#x0201C;MSP,&#x0201D; &#x0201C;MSH,&#x0201D; and &#x0201C;SW&#x0201D; by the FCN model using Cluster data from the 2005&#x02013;2006 period, and compare them with the labels for these 3 regions obtained from Nguyen. Using this method, we obtain an accuracy classification score of 0.97 over a total of 10, 929 common labeled points. the classification report can be found in <xref ref-type="table" rid="T5">Table 5</xref>. We note here that this score is not an exact quantization of the model&#x00027;s accuracy on Cluster data, and the classification score is probably overestimated because only 3 classes (i.e., magnetospheric regions) are considered here instead of the 10 included in the FCN model. Therefore, a dataset of Cluster data labeled with these 10 near-Earth regions is required to get an absolute quantification of its accuracy regarding the Cluster mission. However, it shows globally that our FCN model classification is a reliable method for the labeling of the Cluster mission data and potentially other heliophysics missions.</p>
<table-wrap position="float" id="T5">
<label>Table 5</label>
<caption><p>Classification report for FCN computed on the Cluster dataset.</p></caption>
<table frame="hsides" rules="groups">
<thead><tr>
<th/>
<th valign="top" align="center"><bold>Precision</bold></th>
<th valign="top" align="center"><bold>Recall</bold></th>
<th valign="top" align="center"><bold>f1-score</bold></th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">MSP</td>
<td valign="top" align="center">0.84</td>
<td valign="top" align="center">0.97</td>
<td valign="top" align="center">0.90</td>
</tr>
<tr>
<td valign="top" align="left">MSH</td>
<td valign="top" align="center">1.00</td>
<td valign="top" align="center">0.97</td>
<td valign="top" align="center">0.98</td>
</tr>
<tr>
<td valign="top" align="left">SW</td>
<td valign="top" align="center">0.95</td>
<td valign="top" align="center">0.99</td>
<td valign="top" align="center">0.97</td>
</tr>
<tr>
<td valign="top" align="left">Macro average</td>
<td valign="top" align="center">0.93</td>
<td valign="top" align="center">0.97</td>
<td valign="top" align="center">0.95</td>
</tr>
<tr>
<td valign="top" align="left">Micro average</td>
<td valign="top" align="center">0.98</td>
<td valign="top" align="center">0.97</td>
<td valign="top" align="center">0.97</td>
</tr>
<tr>
<td valign="top" align="left">Accuracy</td>
<td/>
<td valign="top" align="center">0.97</td>
<td/>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec>
<title>4.5. Resources</title>
<p>The most time-consuming task in the present work has been the data preparation and the parsing of the SITL reports. Training a FCN model needs about 200 CPU hours on a workstation featured with an Intel Xeon E5-2670 v3 (12 cores at 2.30 GHz). These values must be multiplied by the number of different trials needed to optimize the hyperparameters (about 40 in that case).</p>
</sec>
</sec>
<sec id="s5">
<title>5. Discussion and Conclusions</title>
<p>Using deep learning algorithms, namely a fully convolutional neural network (FCN), we built an automatic detection of 10 near-Earth regions: the solar wind, the ion foreshock, the bow shock, the magnetosheath, the magnetopause, the boundary layer, the magnetosphere, the plasma sheet, the plasma sheet boundary layer and the lobes.</p>
<p>Using more than 3 years of labeled (SITL and additional human-labeled) MMS mission data, we showed that this method are reliable to classify near-Earth regions. The FCN method(1,079,000 free parameters) has been very effective in taking into account the dynamical features of the most challenging plasma regions (important data variability due to the fluctuations of the plasma), in particular the bow shock and the boundary layer. The high accuracy of the FCN model also highlights the quality of the labeled data set generated from SITL reports. We demonstrate the good accuracy of the classification predictions on the test and validation datasets, but also on unlabeled data from the MMS mission. We also show the adaptability of the trained FCN model by applying the classification to the Cluster ESA mission data. The predictions showed good accuracy and enhanced dynamics in comparison with previous human-labeled dataset.</p>
<p>These results show on one hand that the model can be applied to the whole MMS dataset, which would be of great interest to map the different magnetospheric boundaries and build empirical models of the properties and dynamics of the plasma in the near-Earth space. On the other hand, these results show that the model could be applied on different space missions orbiting around Earth (such as Cluster or THEMIS) or other planets to automatically label available data. However, we recommend to build a small labeled dataset specific to each mission with limited retraining of the last layer. This process called transfer learning could help improving the generalization of our labeled dataset to other missions such as the JUICE mission, which will be launched in 2022 and for which selective downlink strategies are being discussed.</p>
<p>As a matter of fact, the model could be used as a support to the scientific experts in charge of the data selection process (such as the SITL system), providing classification of the regions that would contribute to ease and speed up this time-consuming and tedious task. Such lightweight and easily-adaptable algorithms could also be important for the so-called SOC (Science Operation Center) of current and future spacecraft missions, both on ground and onboard. For the latter case, these algorithms could be implemented within onboard spacecraft digital boards to automatically select regions and events of scientific interest, much reducing the complexity and the cost of science operations.</p>
<p>The intended integration of this model into the aidapy package<xref ref-type="fn" rid="fn0002"><sup>2</sup></xref>, which allows to automatically load selected data from open-access databases, will be of particular interest by providing plasma data accompanied with region labels and quality flags on the fly for use case and statistical studies. The integration of such lightweight algorithms can be also generalized to other programs.</p>
<p>In terms of modeling, we expect to improve the FCN results by generalizing the use of hyperparameter optimization for a higher number of hyperparameters and on larger ranges. We also plan to investigate the use of convolution methods directly on the omnidirectional ion energy fluxes.</p>
<p>Finally, the classification of near-Earth regions represents only a first step for the time series classification in heliophysics. It paves the way to more ambitious models, such as the identification and the classification of space plasma processes (e.g., magnetic reconnection and structures, waves and turbulence or plasma jets), as well as their combinations. However, this topic is beyond the scope of the present study and is left for a forthcoming study.</p>
</sec>
<sec sec-type="data-availability-statement" id="s6">
<title>Data Availability Statement</title>
<p>The models used for this study, the post-processing tools, and the link to the data can be found in the Jupyter notebook classification results.ipynb in the AIDA repository<xref ref-type="fn" rid="fn0003"><sup>3</sup></xref>.</p>
</sec>
<sec id="s7">
<title>Author Contributions</title>
<p>HB and RD built the data set, the machine learning models and wrote the manuscript. HB, RD, AR, and OL gathered information from SITL reports and provided information for their usage for machine learning. HB, AR, OL, and GL provided physical interpretation of the results. RD and JA provided insights into the use of the different machine learning techniques. AR and GL supervised the work. All authors contributed to manuscript revision, read, and approved the submitted version.</p>
</sec>
<sec id="s8">
<title>Conflict of Interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest. The reviewer JB declared a past co-authorship with one of the authors AR to the handling editor.</p>
</sec>
</body>
<back>
<ack><p>Data were retrieved using HELIOPY v0.5.3 (Stansby et al., <xref ref-type="bibr" rid="B29">2020</xref>) and processed using aidapy<xref ref-type="fn" rid="fn0004"><sup>4</sup></xref>, pandas McKinney (<xref ref-type="bibr" rid="B19">2010</xref>), and scikit-learn (Pedregosa et al., <xref ref-type="bibr" rid="B25">2011</xref>). Figures were produced using matplotlib (Hunter, <xref ref-type="bibr" rid="B13">2007</xref>). The model has been built with Keras from Tensorflow 2.2 (Abadi et al., <xref ref-type="bibr" rid="B1">2016</xref>) and we modified scripts provided in the dl-4-ts repository<xref ref-type="fn" rid="fn0005"><sup>5</sup></xref>. The hyperparameter optimization is performed with the Python library optuna (Akiba et al., <xref ref-type="bibr" rid="B2">2019</xref>). The authors would like to acknowledge Gautier Nguyen (LPP) for providing classifications on Cluster data, Nicolas Aunai (LPP) and Alexis Jeandet (LPP) for the helpful discussion and support.</p>
</ack>
<sec sec-type="supplementary-material" id="s9">
<title>Supplementary Material</title>
<p>The Supplementary Material for this article can be found online at: <ext-link ext-link-type="uri" xlink:href="https://www.frontiersin.org/articles/10.3389/fspas.2020.00055/full#supplementary-material">https://www.frontiersin.org/articles/10.3389/fspas.2020.00055/full#supplementary-material</ext-link></p>
<supplementary-material xlink:href="Data_Sheet_1.PDF" id="SM1" mimetype="application/pdf" xmlns:xlink="http://www.w3.org/1999/xlink"/>
</sec>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Abadi</surname> <given-names>M.</given-names></name> <name><surname>Barham</surname> <given-names>P.</given-names></name> <name><surname>Chen</surname> <given-names>J.</given-names></name> <name><surname>Chen</surname> <given-names>Z.</given-names></name> <name><surname>Davis</surname> <given-names>A.</given-names></name> <name><surname>Dean</surname> <given-names>J.</given-names></name> <etal/></person-group>. (<year>2016</year>). <article-title>Tensorflow: a system for large-scale machine learning,</article-title> in <source>12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16)</source> (<publisher-loc>Savannah, GA</publisher-loc>), <fpage>265</fpage>&#x02013;<lpage>283</lpage>.</citation></ref>
<ref id="B2">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Akiba</surname> <given-names>T.</given-names></name> <name><surname>Sano</surname> <given-names>S.</given-names></name> <name><surname>Yanase</surname> <given-names>T.</given-names></name> <name><surname>Ohta</surname> <given-names>T.</given-names></name> <name><surname>Koyama</surname> <given-names>M.</given-names></name></person-group> (<year>2019</year>). <article-title>Optuna: a next-generation hyperparameter optimization framework,</article-title> in <source>Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery</source> &#x00026; <italic>Data Mining</italic> (Anchorage, AK), <fpage>2623</fpage>&#x02013;<lpage>2631</lpage>. <pub-id pub-id-type="doi">10.1145/3292500.3330701</pub-id></citation></ref>
<ref id="B3">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Argall</surname> <given-names>M. R.</given-names></name> <name><surname>Small</surname> <given-names>C.</given-names></name> <name><surname>Piatt</surname> <given-names>S.</given-names></name> <name><surname>Breen</surname> <given-names>L.</given-names></name> <name><surname>Petrik</surname> <given-names>M.</given-names></name> <name><surname>Barnum</surname> <given-names>J.</given-names></name> <etal/></person-group>. (<year>2020</year>). <article-title>MMS SITL ground loop: automating the burst data selection process</article-title>. <source>arXiv [Preprint]. arXiv:2004.07199</source>. <pub-id pub-id-type="doi">10.3389/fspas.2020.00054</pub-id></citation></ref>
<ref id="B4">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Bagnall</surname> <given-names>A.</given-names></name> <name><surname>Lines</surname> <given-names>J.</given-names></name> <name><surname>Bostrom</surname> <given-names>A.</given-names></name> <name><surname>Large</surname> <given-names>J.</given-names></name> <name><surname>Keogh</surname> <given-names>E.</given-names></name></person-group> (<year>2017</year>). <article-title>The great time series classification bake off: a review and experimental evaluation of recent algorithmic advances</article-title>. <source>Data Mining Knowl. Discov</source>. <volume>31</volume>, <fpage>606</fpage>&#x02013;<lpage>660</lpage>. <pub-id pub-id-type="doi">10.1007/s10618-016-0483-9</pub-id><pub-id pub-id-type="pmid">30930678</pub-id></citation></ref>
<ref id="B5">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Balasis</surname> <given-names>G.</given-names></name> <name><surname>Aminalragia-Giamini</surname> <given-names>S.</given-names></name> <name><surname>Papadimitriou</surname> <given-names>C.</given-names></name> <name><surname>Daglis</surname> <given-names>I. A.</given-names></name> <name><surname>Anastasiadis</surname> <given-names>A.</given-names></name> <name><surname>Haagmans</surname> <given-names>R.</given-names></name></person-group> (<year>2019</year>). <article-title>A machine learning approach for automated ULF wave recognition</article-title>. <source>J. Space Weather Space Clim</source>. <volume>9</volume>:<fpage>A13</fpage>. <pub-id pub-id-type="doi">10.1051/swsc/2019010</pub-id></citation></ref>
<ref id="B6">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Balogh</surname> <given-names>A.</given-names></name> <name><surname>Carr</surname> <given-names>C. M.</given-names></name> <name><surname>Acu&#x000F1;a</surname> <given-names>M. H.</given-names></name> <name><surname>Dunlop</surname> <given-names>M. W.</given-names></name> <name><surname>Beek</surname> <given-names>T. J.</given-names></name> <name><surname>Brown</surname> <given-names>P.</given-names></name> <etal/></person-group>. (<year>2001</year>). <article-title>The Cluster Magnetic Field Investigation: overview of in-flight performance and initial results</article-title>. <source>Ann. Geophys</source>. <volume>19</volume>, <fpage>1207</fpage>&#x02013;<lpage>1217</lpage>. <pub-id pub-id-type="doi">10.5194/angeo-19-1207-2001</pub-id></citation></ref>
<ref id="B7">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Baumjohann</surname> <given-names>W.</given-names></name> <name><surname>Treumann</surname> <given-names>R. A.</given-names></name></person-group> (<year>1996</year>). <source>Basic Space Plasma Physics.</source> <publisher-loc>London</publisher-loc>: <publisher-name>Imperial College Press</publisher-name>. <pub-id pub-id-type="doi">10.1142/p015</pub-id></citation></ref>
<ref id="B8">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Burch</surname> <given-names>J.</given-names></name> <name><surname>Moore</surname> <given-names>T.</given-names></name> <name><surname>Torbert</surname> <given-names>R.</given-names></name> <name><surname>Giles</surname> <given-names>B.</given-names></name></person-group> (<year>2016</year>). <article-title>Magnetospheric multiscale overview and science objectives</article-title>. Space Science Reviews, <volume>199</volume>(<issue>1-4</issue>):<fpage>5</fpage>-<lpage>21</lpage>. <pub-id pub-id-type="doi">10.1007/s11214-015-0164-9</pub-id></citation></ref>
<ref id="B9">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Camporeale</surname> <given-names>E.</given-names></name> <name><surname>Car&#x000E9;</surname> <given-names>A.</given-names></name> <name><surname>Borovsky</surname> <given-names>J. E.</given-names></name></person-group> (<year>2017</year>). <article-title>Classification of solar wind with machine learning</article-title>. <source>J. Geophys. Res. Space Phys</source>. <volume>122</volume>, <fpage>10</fpage>&#x02013;<lpage>910</lpage>. <pub-id pub-id-type="doi">10.1002/2017JA024383</pub-id></citation></ref>
<ref id="B10">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Dungey</surname> <given-names>J. W.</given-names></name></person-group> (<year>1963</year>). <article-title>Interactions of solar plasma with the geomagnetic field</article-title>. <source>Planet. Space Sci</source>. <volume>10</volume>, <fpage>233</fpage>&#x02013;<lpage>237</lpage>. <pub-id pub-id-type="doi">10.1016/0032-0633(63)90020-5</pub-id></citation></ref>
<ref id="B11">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Esling</surname> <given-names>P.</given-names></name> <name><surname>Agon</surname> <given-names>C.</given-names></name></person-group> (<year>2012</year>). <article-title>Time-series data mining</article-title>. <source>ACM Comput. Surv</source>. <volume>45</volume>, <fpage>1</fpage>&#x02013;<lpage>34</lpage>. <pub-id pub-id-type="doi">10.1145/2379776.2379788</pub-id></citation></ref>
<ref id="B12">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Fawaz</surname> <given-names>H. I.</given-names></name> <name><surname>Forestier</surname> <given-names>G.</given-names></name> <name><surname>Weber</surname> <given-names>J.</given-names></name> <name><surname>Idoumghar</surname> <given-names>L.</given-names></name> <name><surname>Muller</surname> <given-names>P.-A.</given-names></name></person-group> (<year>2019</year>). <article-title>Deep learning for time series classification: a review</article-title>. <source>Data Mining Knowl. Discov</source>. <volume>33</volume>, <fpage>917</fpage>&#x02013;<lpage>963</lpage>. <pub-id pub-id-type="doi">10.1007/s10618-019-00619-1</pub-id></citation></ref>
<ref id="B13">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hunter</surname> <given-names>J. D.</given-names></name></person-group> (<year>2007</year>). <article-title>Matplotlib: a 2D graphics environment</article-title>. <source>Comput. Sci. Eng</source>. <volume>9</volume>, <fpage>90</fpage>&#x02013;<lpage>95</lpage>. <pub-id pub-id-type="doi">10.1109/MCSE.2007.55</pub-id></citation></ref>
<ref id="B14">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Jel&#x000ED;nek</surname> <given-names>K.</given-names></name> <name><surname>N&#x0011B;me&#x0010D;ek</surname> <given-names>Z.</given-names></name> <name><surname>&#x00160;afr&#x000E1;nkov&#x000E1;</surname> <given-names>J.</given-names></name></person-group> (<year>2012</year>). <article-title>A new approach to magnetopause and bow shock modeling based on automated region identification</article-title>. <source>J. Geophys. Res. Space Phys</source>. <volume>117</volume>:<fpage>A05208</fpage>. <pub-id pub-id-type="doi">10.1029/2011JA017252</pub-id></citation></ref>
<ref id="B15">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kivelson</surname> <given-names>A.</given-names></name> <name><surname>Kivelson</surname> <given-names>M.</given-names></name> <name><surname>Russell</surname> <given-names>C.</given-names></name></person-group> (<year>1995</year>). <source>Introduction to Space Physics</source>. Cambridge University Press. <pub-id pub-id-type="doi">10.1017/9781139878296</pub-id></citation></ref>
<ref id="B16">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>LeCun</surname> <given-names>Y.</given-names></name> <name><surname>Bengio</surname> <given-names>Y.</given-names></name> <name><surname>Hinton</surname> <given-names>G.</given-names></name></person-group> (<year>2015</year>). <article-title>Deep learning</article-title>. <source>Nature</source> <volume>521</volume>, <fpage>436</fpage>&#x02013;<lpage>444</lpage>. <pub-id pub-id-type="doi">10.1038/nature14539</pub-id><pub-id pub-id-type="pmid">26017442</pub-id></citation></ref>
<ref id="B17">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Lin</surname> <given-names>M.</given-names></name> <name><surname>Chen</surname> <given-names>Q.</given-names></name> <name><surname>Yan</surname> <given-names>S.</given-names></name></person-group> (<year>2013</year>). <article-title>Network in network</article-title>. <source>arXiv [Preprint]. arXiv:1312.4400</source>.</citation></ref>
<ref id="B18">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Lucas</surname> <given-names>B.</given-names></name> <name><surname>Shifaz</surname> <given-names>A.</given-names></name> <name><surname>Pelletier</surname> <given-names>C.</given-names></name> <name><surname>O&#x00027;Neill</surname> <given-names>L.</given-names></name> <name><surname>Zaidi</surname> <given-names>N.</given-names></name> <name><surname>Goethals</surname> <given-names>B.</given-names></name> <etal/></person-group>. (<year>2019</year>). <article-title>Proximity forest: an effective and scalable distance-based classifier for time series</article-title>. <source>Data Mining Knowl. Discov</source>. <volume>33</volume>, <fpage>607</fpage>&#x02013;<lpage>635</lpage>. <pub-id pub-id-type="doi">10.1007/s10618-019-00617-3</pub-id></citation></ref>
<ref id="B19">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>McKinney</surname> <given-names>W.</given-names></name></person-group> (<year>2010</year>). <article-title>Data structures for statistical computing in Python,</article-title> in <source>Proceedings of the 9th Python in Science Conference</source> (<publisher-loc>Austin, TX</publisher-loc>), <fpage>56</fpage>&#x02013;<lpage>61</lpage>. <pub-id pub-id-type="doi">10.25080/Majora-92bf1922-00a</pub-id></citation></ref>
<ref id="B20">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Nair</surname> <given-names>V.</given-names></name> <name><surname>Hinton</surname> <given-names>G. E.</given-names></name></person-group> (<year>2010</year>). <article-title>Rectified linear units improve restricted Boltzmann machines,</article-title> in <source>Proceedings of the 27th International Conference on Machine Learning (ICML-10)</source> (<publisher-loc>Haifa</publisher-loc>), <fpage>807</fpage>&#x02013;<lpage>814</lpage>.</citation></ref>
<ref id="B21">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Nguyen</surname> <given-names>G.</given-names></name> <name><surname>Aunai</surname> <given-names>N.</given-names></name> <name><surname>Michotte de Welle</surname> <given-names>B.</given-names></name> <name><surname>Jeandet</surname> <given-names>A.</given-names></name> <name><surname>Fontaine</surname> <given-names>D.</given-names></name></person-group> (<year>2019</year>). <article-title>Automatic detection of the earth bow shock and magnetopause from <italic>in-situ</italic> data with machine learning</article-title>. <source>Ann. Geophys. Discuss</source>. <volume>2019</volume>, <fpage>1</fpage>&#x02013;<lpage>22</lpage>. <pub-id pub-id-type="doi">10.5194/angeo-2019-149</pub-id></citation></ref>
<ref id="B22">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Nishizuka</surname> <given-names>N.</given-names></name> <name><surname>Sugiura</surname> <given-names>K.</given-names></name> <name><surname>Kubo</surname> <given-names>Y.</given-names></name> <name><surname>Den</surname> <given-names>M.</given-names></name> <name><surname>Watari</surname> <given-names>S.</given-names></name> <name><surname>Ishii</surname> <given-names>M.</given-names></name></person-group> (<year>2017</year>). <article-title>Solar flare prediction model with three machine-learning algorithms using ultraviolet brightening and vector magnetograms</article-title>. <source>Astrophys. J</source>. <volume>835</volume>:<fpage>156</fpage>. <pub-id pub-id-type="doi">10.3847/1538-4357/835/2/156</pub-id></citation></ref>
<ref id="B23">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Olshevsky</surname> <given-names>V.</given-names></name> <name><surname>Khotyaintsev</surname> <given-names>Y. V.</given-names></name> <name><surname>Divin</surname> <given-names>A.</given-names></name> <name><surname>Delzanno</surname> <given-names>G. L.</given-names></name> <name><surname>Anderzen</surname> <given-names>S.</given-names></name> <name><surname>Herman</surname> <given-names>P.</given-names></name> <etal/></person-group>. (<year>2019</year>). <article-title>Automated classification of plasma regions using 3d particle energy distribution</article-title>. <source>arXiv [Preprint]. arXiv:1908.05715</source>.</citation></ref>
<ref id="B24">
<citation citation-type="web"><person-group person-group-type="author"><name><surname>Paszke</surname> <given-names>A.</given-names></name> <name><surname>Gross</surname> <given-names>S.</given-names></name> <name><surname>Massa</surname> <given-names>F.</given-names></name> <name><surname>Lerer</surname> <given-names>A.</given-names></name> <name><surname>Bradbury</surname> <given-names>J.</given-names></name> <name><surname>Chanan</surname> <given-names>G.</given-names></name> <etal/></person-group>. (<year>2019</year>). <article-title>PyTorch: an imperative style, high-performance deep learning library,</article-title> in <source>Advances in Neural Information Processing Systems 32</source>, eds H. Wallach, H. Larochelle, A. Beygelzimer, F. d&#x00027;Alch&#x000E9;-Buc, E. Fox, and R. Garnett (<publisher-loc>Curran Associates, Inc</publisher-loc>.), <fpage>8026</fpage>&#x02013;<lpage>8037</lpage>. Available online at: <ext-link ext-link-type="uri" xlink:href="http://papers.nips.cc/paper/9015-pytorch-an-imperative-style-high-performance-deep-learning-library.pdf">http://papers.nips.cc/paper/9015-pytorch-an-imperative-style-high-performance-deep-learning-library.pdf</ext-link></citation></ref>
<ref id="B25">
<citation citation-type="web"><person-group person-group-type="author"><name><surname>Pedregosa</surname> <given-names>F.</given-names></name> <name><surname>Varoquaux</surname> <given-names>G.</given-names></name> <name><surname>Gramfort</surname> <given-names>A.</given-names></name> <name><surname>Michel</surname> <given-names>V.</given-names></name> <name><surname>Thirion</surname> <given-names>B.</given-names></name> <name><surname>Grisel</surname> <given-names>O.</given-names></name> <etal/></person-group>. (<year>2011</year>). <article-title>Scikit-learn: machine learning in Python</article-title>. <source>J. Mach. Learn. Res</source>. <volume>12</volume>, <fpage>2825</fpage>&#x02013;<lpage>2830</lpage>. Available online at: <ext-link ext-link-type="uri" xlink:href="https://dl.acm.org/doi/10.5555/1953048.2078195">https://dl.acm.org/doi/10.5555/1953048.2078195</ext-link></citation></ref>
<ref id="B26">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Pollock</surname> <given-names>C.</given-names></name> <name><surname>Moore</surname> <given-names>T.</given-names></name> <name><surname>Jacques</surname> <given-names>A.</given-names></name> <name><surname>Burch</surname> <given-names>J.</given-names></name> <name><surname>Gliese</surname> <given-names>U.</given-names></name> <name><surname>Saito</surname> <given-names>Y.</given-names></name> <etal/></person-group>. (<year>2016</year>). <article-title>Fast plasma investigation for magnetospheric multiscale</article-title>. <source>Space Sci. Rev</source>. <volume>199</volume>, <fpage>331</fpage>&#x02013;<lpage>406</lpage>. <pub-id pub-id-type="doi">10.1007/s11214-016-0245-4</pub-id></citation></ref>
<ref id="B27">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>R&#x000E8;me</surname> <given-names>H.</given-names></name> <name><surname>Aoustin</surname> <given-names>C.</given-names></name> <name><surname>Bosqued</surname> <given-names>J. M.</given-names></name> <name><surname>Dandouras</surname> <given-names>I.</given-names></name> <name><surname>Lavraud</surname> <given-names>B.</given-names></name> <name><surname>Sauvaud</surname> <given-names>J. A.</given-names></name> <etal/></person-group>. (<year>2001</year>). <article-title>First multispacecraft ion measurements in and near the Earth&#x00027;s magnetosphere with the identical Cluster ion spectrometry (CIS) experiment</article-title>. <source>Ann. Geophys</source>. <volume>19</volume>, <fpage>1303</fpage>&#x02013;<lpage>1354</lpage>. <pub-id pub-id-type="doi">10.5194/angeo-19-1303-2001</pub-id></citation></ref>
<ref id="B28">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Russell</surname> <given-names>C.</given-names></name> <name><surname>Anderson</surname> <given-names>B.</given-names></name> <name><surname>Baumjohann</surname> <given-names>W.</given-names></name> <name><surname>Bromund</surname> <given-names>K.</given-names></name> <name><surname>Dearborn</surname> <given-names>D.</given-names></name> <name><surname>Fischer</surname> <given-names>D.</given-names></name> <etal/></person-group>. (<year>2016</year>). <article-title>The magnetospheric multiscale magnetometers</article-title>. <source>Space Sci. Rev</source>. <volume>199</volume>, <fpage>189</fpage>&#x02013;<lpage>256</lpage>. <pub-id pub-id-type="doi">10.1007/s11214-014-0057-3</pub-id></citation></ref>
<ref id="B29">
<citation citation-type="web"><person-group person-group-type="author"><name><surname>Stansby</surname> <given-names>D.</given-names></name> <name><surname>Rai</surname> <given-names>Y.</given-names></name> <name><surname>Argall</surname> <given-names>M.</given-names></name> <name><surname>JeffreyBroll Erwin</surname> <given-names>N.</given-names></name> <name><surname>Shaw</surname> <given-names>S.</given-names></name> <etal/></person-group>. (<year>2020</year>). <source>heliopython/heliopy: Heliopy 0.10.0</source>. Available online at: <ext-link ext-link-type="uri" xlink:href="https://zenodo.org/record/3676651&#x00023;.Xz38LSgzaUk">https://zenodo.org/record/3676651&#x00023;.Xz38LSgzaUk</ext-link></citation></ref>
<ref id="B30">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Torbert</surname> <given-names>R.</given-names></name> <name><surname>Russell</surname> <given-names>C.</given-names></name> <name><surname>Magnes</surname> <given-names>W.</given-names></name> <name><surname>Ergun</surname> <given-names>R.</given-names></name> <name><surname>Lindqvist</surname> <given-names>P.-A.</given-names></name> <name><surname>LeContel</surname> <given-names>O.</given-names></name> <etal/></person-group>. (<year>2016</year>). <article-title>The fields instrument suite on MMS: scientific objectives, measurements, and data products</article-title>. <source>Space Sci. Rev</source>. <volume>199</volume>, <fpage>105</fpage>&#x02013;<lpage>135</lpage>. <pub-id pub-id-type="doi">10.1007/s11214-014-0109-8</pub-id><pub-id pub-id-type="pmid">29755144</pub-id></citation></ref>
<ref id="B31">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Wang</surname> <given-names>Z.</given-names></name> <name><surname>Yan</surname> <given-names>W.</given-names></name> <name><surname>Oates</surname> <given-names>T.</given-names></name></person-group> (<year>2017</year>). <article-title>Time series classification from scratch with deep neural networks: a strong baseline,</article-title> in <source>2017 International Joint Conference on Neural Networks (IJCNN)</source> (<publisher-loc>Anchorage, AK</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>1578</fpage>&#x02013;<lpage>1585</lpage>. <pub-id pub-id-type="doi">10.1109/IJCNN.2017.7966039</pub-id></citation></ref>
<ref id="B32">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Zhou</surname> <given-names>B.</given-names></name> <name><surname>Khosla</surname> <given-names>A.</given-names></name> <name><surname>Lapedriza</surname> <given-names>A.</given-names></name> <name><surname>Oliva</surname> <given-names>A.</given-names></name> <name><surname>Torralba</surname> <given-names>A.</given-names></name></person-group> (<year>2016</year>). <article-title>Learning deep features for discriminative localization,</article-title> in <source>Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition</source> (<publisher-loc>Las Vegas, NV</publisher-loc>), <fpage>2921</fpage>&#x02013;<lpage>2929</lpage>. <pub-id pub-id-type="doi">10.1109/CVPR.2016.319</pub-id></citation></ref>
</ref-list>
<fn-group>
<fn id="fn0001"><p><sup>1</sup><ext-link ext-link-type="uri" xlink:href="https://gitlab.com/aidaspace/aidapy">https://gitlab.com/aidaspace/aidapy</ext-link></p></fn>
<fn id="fn0002"><p><sup>2</sup><ext-link ext-link-type="uri" xlink:href="https://gitlab.com/aidaspace/aidapy">https://gitlab.com/aidaspace/aidapy</ext-link></p></fn>
<fn id="fn0003"><p><sup>3</sup><ext-link ext-link-type="uri" xlink:href="https://gitlab.com/aidaspace/notebooks_aida/-/tree/master/04_sitl_classification_region">https://gitlab.com/aidaspace/notebooks_aida/-/tree/master/04_sitl_classification_region</ext-link></p></fn>
<fn id="fn0004"><p><sup>4</sup><ext-link ext-link-type="uri" xlink:href="https://gitlab.com/aidaspace/aidapy">https://gitlab.com/aidaspace/aidapy</ext-link></p></fn>
<fn id="fn0005"><p><sup>5</sup><ext-link ext-link-type="uri" xlink:href="https://github.com/hfawaz/dl-4-tsc">https://github.com/hfawaz/dl-4-tsc</ext-link></p></fn>
</fn-group>
<fn-group>
<fn fn-type="financial-disclosure"><p><bold>Funding.</bold> This paper has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement No. 776262 (AIDA, <ext-link ext-link-type="uri" xlink:href="http://www.aida-space.eu">http://www.aida-space.eu</ext-link>).</p>
</fn>
</fn-group>
</back>
</article>