Classification of Magnetosheath Jets Using Neural Networks and High Resolution OMNI (HRO) Data

Magnetosheath jets are transient, localized dynamic pressure enhancements found downstream of the Earth's bow shock in the magnetosheath region. Using a pre-existing database of magnetosheath jets we train a neural network to distinguish between jets found downstream of a quasi-parallel bow shock (θBn<45o) and jets downstream of a quasi-perpendicular bow shock (θBn>45o). The initial database was compiled using MMS measurements in the magnetosheath (downstream) to identify and classify them as “quasi-parallel” or “quasi-perpendicular,” while the neural network uses only solar wind (upstream) measurements from the OMNIweb database. To evaluate the results, a comparison with three physics-based modeling approaches is done. It is shown that neural networks are systematically outperforming the other methods by achieving a ~93% agreement with the initial dataset, while the rest of the methods achieve around 80%. The better performance of the neural networks likely is due to the fact that they use information from more solar wind quantities than the physics-based models. As a result, even in the absence of certain upstream properties, such as the IMF direction, they are capable of accurately determining the jet class.


Magnetosheath Jets
The magnetosphere, surrounding the Earth, offers protection from plasma flows originating from the Sun traveling at supersonic speeds. Initially, the solar wind particles interact with the Earth's bow shock and are decelerated into subsonic velocities, moving into the magnetosheath region. The interaction between the solar wind and the Earth's bow shock can in principle be modeled through the Rankine-Hugoniot relations, assuming an 1D, time stationary shock (Baumjohann and Treumann, 2012). However, there are phenomena too complex to be precisely described by the current theoretical framework. This complexity arises mainly from the geometry of the bow shock and the rapid changes in the Interplanetary Magnetic Field (IMF). A phenomenon that is generated in the interaction of the solar wind with the bow shock is the so called "magnetosheath jet." These jets are usually described as localized enhancements of dynamic pressure in the magnetosheath plasma and are attributed to a velocity or a density increase or in most cases an increase of both (e.g., Amata et al., 2011;Archer et al., 2012;Plaschke et al., 2018).
For magnetosheath jets, several terms and definitions are used in the literature (Plaschke et al., 2018). In this work, we use the term "magnetosheath jet" or simply "jet" to describe an enhancement of the dynamic pressure above the background magnetosheath level, using a time-moving average window of ±10 min for the dynamic pressure (e.g., Archer and Horbury, 2013;Gunell et al., 2014;Gutynska et al., 2015;Karlsson et al., 2015;Raptis et al., 2019). When an enhancement higher than two times the background level is observed, a jet is registered to a list of events.
While jets have been observed since 1998 (Němeček et al., 1998), there are still several open questions regarding their origin, their morphology, and their exact generation mechanism (Plaschke et al., 2018). The predominant generation mechanism connects jets to bow shock ripples found at the quasi-parallel bow shock (Hietala et al., 2009;Hietala and Plaschke, 2013). Other phenomena that are possibly connected to jet generation may be the so called SLAMS (Short Large Amplitude Structure) that are foreshock phenomena characterized by very large magnetic field amplitudes and plasma density enhancements (Schwartz et al., 1992). It has been hypothesized that SLAMS can pass through the bow shock ripples and contribute to a density enhancement that would result in an overall increase of the dynamic pressure (Karlsson et al., 2015).
Jets are of great interest for the field of space physics and space weather. It has been suggested that they are connected to various phenomena such as the radiation belts (Turner et al., 2012;Xiang et al., 2016) and throat aurora (Han et al., 2017). Recently it has been shown that by interacting with the magnetopause, jets can trigger magnetopause reconnection , which may excite surface eigenmodes (Archer et al., 2019) or even contribute to direct plasma penetration through the magnetopause (Karlsson et al., 2012). Furthermore, they appear to be occurring in other planets of our solar system and in astrophysical shocks (Giacalone and Jokipii, 2007;Plaschke et al., 2018).

Magnetosphere Earth
Quasi-perpendicular Shock FIGURE 1 | Sketch of the bow shock and its different configuration in the Earth's environment. An Interplanetary Magnetic Field (IMF) with an angle, approximately 45 • with the normal at the nose of the bow shock is assumed. As a result, a quasi-perpendicular (θ Bn > 45) shock takes place on the left part of the image and a quasi-parallel (θ Bn < 45) on the right. The instabilities caused by the reflected ions in the Qpar case create the so called ion foreshock which changes drastically the properties between the Qpar shock and the Qperp one.
An important factor that creates an intrinsic classification to shock transitions and therefore to both the magnetosheath region and the jets, is the angle (θ Bn ) between the bow shock normal vector (n) and the IMF (B), as depicted in Figure 1. Due to the differences in the bow shock formation and in particle dynamics explained below, quasi-perpendicular (Qperp) shocks (θ Bn > 45) exhibit a sharp transition between the upstream flow and the downstream plasma, followed by a less turbulent magnetosheath region (Fuselier, 2013;Wilson, 2016). On the other hand, for quasi-parallel (Qpar) shocks (θ Bn < 45), the transition is harder to define and the downstream plasma is irregular and strongly turbulent. The source of the different properties of each region is the dynamic behavior of solar wind particles going through the shock transition. In the case of the Qpar shock, reflected ions can travel far upstream, interact with the incoming solar wind flow and cause a number of instabilities leading to wave growth. This, in turn, creates a foreshock region which is absent in the case of Qperp shocks where the reflected particles, due to their gyration around the magnetic field, are quickly returned back to the shock and hence do not travel as far back upstream. This results in a less turbulent environment both upstream and downstream of the Qperp bow shock (Schwartz and Burgess, 1991;Balogh and Treumann, 2013).
For the generation of Figure 1, the bow shock and magnetopause model by Chao et al. (2002) are used. The parameters used are B z = −0.22 (nT), P dyn = 2.15 (nPa), M ms = 6.09 and β = 2.20. These values correspond to the average conditions of the solar wind for the periods that a Qpar or a Qperp jet was found.
Classifying jets into different categories is vital to investigate the possibility of different generation mechanisms. As discussed above, there is no consensus regarding the generation of jets. By classifying jets to different bow shock configurations one can investigate both the jet properties and the associated solar wind to determine if any of the suggested mechanism apply to these subset of jets or even indicate new class-specific generation mechanisms.

Neural Networks
Neural Networks (NN) are widely used machine learning (ML) tools that are often employed to perform classification and regression tasks. Neural Networks were first introduced in 1943 ( McCulloch and Pitts, 1943) and have been used for such tasks since at least 1958 (Rosenblatt, 1958). The basic principle behind NNs is that when provided with enough data, they are capable of adjusting their internal parameters in an optimal way to perform a specific task related to the data given. By iteratively parameterizing, and thus training, a neural network with error minimization techniques, it has been shown that when presented with unknown data the network is capable of accurately performing its trained task (Bishop, 1995). Lately, multi-layered (deep) neural networks have been used in various applications due to their ability to accurately model complex, and potentially unknown, relationships (Goodfellow et al., 2016;Samarasinghe, 2016). In the last years, machine learning techniques, including neural networks, have been employed in heliospheric physics and space weather (Camporeale et al., 2018a,b). Their spectrum of application is quite broad, tackling many problems that traditional statistics or physics-based modeling techniques struggle with. Many applications of neural networks focus on predictive tasks such as the forecasting of solar flares (Florios et al., 2018;Jonas et al., 2018), Coronal Mass Ejections (CMEs) (Bobra and Ilonidis, 2016), CME arrival time (Liu et al., 2018), and geomagnetic indices (Boberg et al., 2000;Wintoft et al., 2017;Chandorkar and Camporeale, 2018). Other applications focus on space environment characterization (Shin et al., 2016;Aminalragia-Giamini et al., 2018), wave recognition (Balasis et al., 2019), and the classification of the solar wind (Camporeale et al., 2017).
In this work, we apply neural networks for a supervised learning classification task. In particular, to classify magnetosheath jets using solar wind measurements and compare the results with physics-based models. The main goal of this study is to classify jets between those originating from quasi-parallel shock transitions and those originating from quasi-perpendicular ones. By doing so, we determine whether machine learning techniques can outperform physics-based models in this task and investigate the potential connection between solar wind conditions and each jet class. Finally, as detailed below, we use parts of a pre-classified dataset of jets (Raptis et al., 2019) which we evaluate by investigating the agreement of each method with the initial classification.

OMNIweb-Solar Wind (Upstream) Data
For the upstream conditions, which correspond to the input of the neural network, data from the OMNI database are used, available at https://omniweb.gsfc.nasa.gov/form/omni_min_def. html. The OMNI data mainly originate from the ACE spacecraft that resides in the Sun-Earth L1 point (Stone et al., 1998) and are automatically time-shifted to the Earth's bow shock nose. The time-shifted data have an 1-min resolution and take into account the bow shock location and shape (King and Papitashvili, 2005). The solar wind measurements are associated with every jet as later described, resulting in a dataset of equal length to the number of jets. This dataset is then used as input to the neural networks, consisting of the 12 physical quantities shown in Table 1.

MMS-Magnetosheath (Downstream) Data and Jet Database
In this work, we use a list of jets initially presented in Raptis et al. (2019). The dataset is created using in-situ measurements from the Magnetospheric Multiscale (MMS) mission during 11/2015-03/2019. For the downstream conditions and for the initial creation of the jet dataset various plasma moment and magnetic field parameters are used. The magnetic field data are taken from the fluxgate magnetometer (FGM) (Russell et al., 2016) and ion data are taken from the fast plasma investigation (FPI) (Pollock et al., 2016). Finally, the position of MMS during each jet is registered in GSE coordinates, using as unit the Earth radius (R E = 6, 371km). This dataset provides a list of well-characterized and pre-classified jets. These are used for the training and the evaluation of the NN system, where the class of the jets serves as the desired classification output.
All the jets are required to satisfy a criterion of minimum dynamic pressure compared to the background magnetosheath plasma: where the angular brackets indicate an average using a 20 min time moving window. m p is the proton mass, n i the ion number density, and V i the ion velocity.
After each jet has been registered to the database, a classification algorithm is applied to determine its class. The main feature of the initial classification is that it uses in-situ MMS measurements to determine whether the jet originated from a quasi-parallel or a quasi-perpendicular bow shock configuration. This methodology was preferred over using solar wind data to calculate θ Bn for several reasons. Firstly, to avoid the errors that are generated in time-lagging procedures such as the one taking place in OMNIweb database (Mailyan et al., 2008;Case and Wild, 2012). Furthermore, due to the 1-min resolution of the database, short time scale variations of the IMF are consequently undetectable. Finally, the jets are detected in the whole magnetosheath region. As a result, a time-shift on the associated solar wind values is required for every jet in order to take into account the time it took for every jet to travel inside the magnetosheath. This procedure itself is difficult to be accurately implemented and it would further increase the uncertainty of the method. The initial dataset, therefore, relies on properties found in the magnetosheath plasma regions. In particular, the algorithm uses thresholds on ion temperature anisotropy that is found to be lower in Qpar plasma than in Qperp Fuselier et al., 1994). It also takes advantage of the fact that the magnetic field's standard deviation is observed to be higher in the Qpar plasma than in the Qperp (Formisano and Hedgecock, 1973;Luhmann et al., 1986). Finally, the main difference between the Qpar and Qperp plasma regions is the high energy ion population in the ion foreshock which only exists in the Qpar bow shock (Gosling et al., 1978;Fuselier, 2013). As a result, in-situ measurements of temperature anisotropy, magnetic field standard deviation, and high energy ion flux were used. A summary of the basic characteristics of each class is shown in Table 2. From these classes, the only ones used in this work are the Qpar (N = 860) and Qperp (N = 211) jets.
In Figure 2, an example of MMS measurements for a quasiparallel and a quasi-perpendicular jet is shown. T iperp T ipar FIGURE 2 | Left: An example of a quasi-parallel (Qpar) magnetosheath jet. Right: An example of a quasi-perpendicular (Qperp) jet. From top to bottom, ion dynamic pressure, ratio of the ion dynamic pressure to the background level, ion velocity, ion number density, magnetic field components, ion energy spectrogram and parallel and perpendicular components of ion temperature. The red vertical line shows the peak of dynamic pressure for each jet, blue vertical lines indicate the start and end point of the jet. Finally, the green lines indicate a period of time before and after the jet equal to 1 min, respectively. The velocity and magnetic field components along with the position of the spacecraft are given in GSE coordinates.
Frontiers in Astronomy and Space Sciences | www.frontiersin.org 3. METHODOLOGY

Input Determination
For both the physics-based modeling and the neural networks, it is necessary to provide an input that corresponds to the same time intervals in order to have a consistent comparison. The choice of the input is nontrivial, since, as discussed in the previous section, the availability of measurements and their association to jets contains multiple errors and uncertainties. Several possible inputs were examined, by either taking average or maximum values of the conditions found within a 5, 10, or 15 min period of the jet. It was found that taking average solar wind conditions starting from 5 min before the jet up to the jet observation time provided the highest agreement to the initial classification in all presented methods. As a result, the solar wind measurements (X u ) used for each jet are defined as: where, t jet is the time the jet was observed by MMS, t is equal to 60 s and subscript u refers to X being an upstream quantity.
It should be noted that while the input described in Equation (2) provided the highest agreement with the initial database, it still has its limitations. Specifically, this input choice means that jets found very far away from the bow shock nose or with extremely high or low velocities will potentially not be characterized correctly.

Evaluating Jet Class With Physics-Based Modeling
In order to provide a baseline to compare the results from the neural networks, we use three different physics-based models to estimate the θ Bn angle and distinguish between Qpar and Qperp magnetosheath jets.

Cone Angle Approximation
A simple approach to estimate θ Bn is through the cone angle: where, B u,x is the x component of the upstream magnetic field and B u is the IMF vector. θ cone is identical to θ Bn at the subsolar point of the bow shock. By calculating the cone angle, we classify the available jets. For θ cone < 45 a jet is classified as Qpar while for θ cone > 45 it is classified as Qperp. This method should in principle work for the majority of the jets that are found close to the subsolar point. However, the number of the jets that are in very close proximity to the subsolar point (|Y, Z GSE | < 2R E ) is quite small (Qpar: 151/ Qperp: 108). As a result, we expect this method to perform poorly for jets found close to the flanks of the magnetosheath.

Coplanarity Method
Another set of methods used is the so called coplanarity methods. There is a variety of methods based on the coplanarity theorem (e.g., Paschmann and Daly, 1998). In our case, the simplest version of magnetic field coplanarity method provides the highest agreement with the initial dataset and is the one shown in this work.
Starting from Rankine-Hugoniot relations we can derive the normal vector of the bow shock as: In our case, the upstream (IMF) magnetic field was taken as the average value from 5 min before the observation of the jet to the time the jet was observed (Equation 2). On the other hand, the downstream (magnetosheath) magnetic field was taken as the average value of ±2.5 min before and after the jet measurement by MMS. This approximation should in principle be less accurate for jets found very far away from the bow shock since the jump conditions refer to points close to the shock. Furthermore, jets found at the flanks are also prone to errors since the upstream solar wind measurements are time-lagged to the bow shock nose and therefore characterize the subsolar region.

Bow Shock Modeling
Another method to calculate θ Bn requires a model of the bow shock and an approximation of the origin of each jet.
Assuming that the jet does not get significantly accelerated or decelerated during its lifetime in the magnetosheath, one can use the maximum velocity vector (V) to propagate the jet backwards in time and find its point of origin at the bow shock. For the modeling of the bow shock, the model described by Chao et al. (2002) was used. It should be noted that this procedure is prone to several errors. To begin with, the position of the modeled bow shock may have a significant error compared to the real position (Merka et al., 2003;Turc et al., 2013). Furthermore, the assumption that the velocity is constant may introduce more errors. To derive a realistic bow shock model, we use the average associated solar wind conditions starting from 10 min before the jet up to 5 min after its observation by MMS. After we approximated a point of origin for each jet, the angle between the normal vector of that point and the IMF was calculated.

Evaluating Jet Class With Neural Networks
For the input of the neural networks, several inputs associated to each jet were tested. For every jet 12 solar wind measurements were used (Table 1) and were associated to it (Equation 2). From the initial number of jets (860 Qpar/211 Qperp) we exclude jets that contain corrupted data in any of the input that was used in the neural network ( Table 1). As a result, the final dataset consists of 759 Qpar jets and 196 Qperp jets.
The neural network architecture, algorithm, and back-end training procedure were implemented in Python by using TensorFlow library version 2.0.0 (Abadi et al., 2015). One of the main problems of the neural network application is the treatment of the class imbalance. We are dealing with a problem where the majority class (Qpar jets) is roughly ∼ 80% of the whole dataset. Class imbalance is a non-trivial problem to optimize in Input Layer ∈ ℝ¹² Hidden Layer ∈ ℝ²⁰ Hidden Layer ∈ ℝ²⁰ Output Layer ∈ ℝ² (1) Qpar jet (2) Qperp jet ... ...
... (Table 4) FIGURE 3 | Basic architecture of the neural network used for the classification of the jets. The input layer shows all the quantities that were used in the neural network method. To avoid having too many nodes and neurons shown, the rest of the hidden layers are given in Table 3. The visualization was done by using a publicly available tool (LeNail, 2019) and editing its output.

Rest of Hidden layers
machine learning and there is no ideal solution for it (Goodfellow et al., 2016;Brownlee, 2020). In order to tackle this problem we utilized the imbalanced-learning library (Lemaître et al., 2017), and used under-sampling and up-sampling techniques. In particular, we used ClusterCentroid under-sampling and SMOTE up-sampling methods on the majority of the trials (Chawla et al., 2002). It should be noted, that both under-sampling and upsampling techniques did not increase the average accuracy of the neural network significantly. Another direct way to tackle the class imbalance problem in the training procedure is to implement a weight factor in the update of the weights and biases to compensate for the differences in the classes found in the training samples. As a result, a weighted factor was used for updating the parameters of the network when the minority class (quasi-perpendicular jets) is introduced to the network. For the optimizer of the gradient descent algorithm, we used the Adam optimizer as implemented in the Keras library (Chollet, 2015) with a smaller learning rate of α = 0.0001 while the rest of the parameters were left at their default status. Since the neural network is tackling a binary classification problem, the error function used for the back-propagation is the binary crossentropy loss function. In all trials and in the final architecture we also used the batch normalization technique (Ioffe and Szegedy, 2015) and parametric rectified linear units (PReLu) (He et al., 2015) in the hidden layers of the network. The final architecture of the network is shown in Figure 3 and described in Table 3.

Validation Method
For the training of a neural network we have chosen to use 80% of the jets, leaving 20% available to test the accuracy of the network.
To ensure that the results are not biased from a specific division of the data into training and test sets, the process is repeated multiple times. At each iteration, the training/testing division is made randomly resulting in different subsets. Using this method, the architecture remains the same, while allowing a reasonable sampling of the, otherwise immense, space of divisions of the data into training and testing. This method is then used to evaluate the stability of the NN classifier. From each iteration, the classifying score can be calculated and the overall mean accuracy, as well as the standard deviation of the results, are direct evidence of the system's performance. In the following section results from this iterative process are shown where 100 iterations have been used.
An additional method used for the validation of the classification results is the "leave-one-out" method which produces independent classification results for each and every sample. This method is very useful when dealing with datasets of small size as it can give a good measure of the system's performance in terms of correctly classified and miss-classified cases (e.g., Aminalragia-Giamini et al., 2020). With this procedure, a neural network is trained with all the available data apart from one sample which is "left out." After training, this one sample is input as a test set of size 1 and its class is evaluated by the network. This process iteratively evaluates all samples, setting a different one apart each time, and thus requires the training of a neural network as many times as the total number of jets, here N = 955. After its completion, this process produces 955 classification results where in each case only the sample tested did not participate in the training and every other available sample was used to produce the results. Finally, a single accuracy score can be calculated for each class which is indicative of the overall performance. The presented results of the "leave-1-out" method are the average results of three independent runs using this validation technique.

Neural Network
An example plot of the neural network training is shown in Figure 4. The test accuracy (left) increases until ∼ 200 epoches and as expected the test loss (right) decreases in a respective trend. Beyond the ∼ 200 epoch point, no significant changes were observed. After using a validation set to determine the best number of epoches and batch size, we decided to use 250 epoches with a batch size equal to 100 training samples per iteration. Finally, the 80/20 training/testing division of the data results in absolute numbers in 607 Qpar jets and 157 Qperp jets for training and 152 Qpar jets and 39 Qperp jets for testing.
The classification results from 100 iterations with the random training/testing division for neural networks are shown in Figures 5, 6. Figure 5 shows the individual classification scores for Qpar and Qperp jets where it is seen that in both cases high scores with a mean accuracy of ∼ 98.2 and ∼ 88.9% are achieved, respectively. Specifically for the Qpar jets, the scores are tightly clustered in the ∼ 95 − 100% range showing minimal standard deviation between iterations. On the other hand, the results of Qperp jets have a higher standard deviation, with accuracy scores ranging from ∼ 75 − 100%. This could be due to the number of jets per class not being balanced, which provides more available information for the neural network regarding the majority class (Qpar). As a result, the testing set used for each iteration contains fewer samples which makes it possible to get worse training and test splits on each iteration. Another possible explanation is that on top of the class imbalance, due to the way Qpar and Qperp shocks form, most of Qperp jets occur much closer to the subsolar region compared to Qpar jets. As discussed previously, ∼ 50% of Qperp jets are close to the subsolar region and the other half are further away toward the flanks. As a result, a split of data can make the result vary heavily if the training and test sample are not equally distributed. Accuracy Qpar (%) Random Iteration Score Leave-one-out Score FIGURE 6 | Accuracy of the neural network for 100 random initialization of training/test set, with every point being one iteration. The x-axis represents the accuracy in quasi-perpendicular class and ranges from 70 to 100%. On the other hand, the y-axis shows the accuracy in the quasi-parallel class and ranges from 94 to 100%. Special indication of the leave one out result is marked in green color. The training of the shown neural networks includes the IMF vector. Figure 6 shows the resulting pairs of Qperp accuracy vs. the Qpar accuracy for each of the 100 iterations. It is seen that the distributions of the independent iterations does not exhibit any specific structure but appears random. This is important and gives confidence in the NN results since it is common in binary classification problems, such as this one, to have a competing classification problem; i.e., the higher the score for one class the lower the score for the other. This is not the case here and the differences in the respective scores appear to stem only from the random division of training/testing subsets.
Finally, in Figure 6 the classification score from the leave-oneout process can be seen with Qpar and Qperp scores equal to ∼ 96.7 and ∼ 88.2%, respectively. The leave-one-out process scores lie close to the mean of both the Qpar and the Qperp scores, while being slightly lower in both cases. We can speculate that the small differences may originate from the differences between the two types of validation methods. First of all, the class imbalance and the fact that resampling methods utilized in this case had to increase the dataset to a larger number of samples, could enhance the effect of class imbalance, decreasing the accuracy of the network. Furthermore, for the leave-one-out method, a validation set of 10% was used to check at which point the epoch training should be stopped. This was necessary since optimizing the epoch number or the batch size, while training with all but The neural network accuracy is taken as the average performance of the 100 random iterations as shown in Figures 5, 6. one jet is time consuming and outside the scope of this work. As a result, the difficulty in optimizing the hyper-parameters of the neural network for the leave-one-out case may have had a slight impact on the overall accuracy of the method.

Comparison of Neural Networks to Physics-Based Models
We now compare the classification scores obtained from the neural networks with the respective scores from the physics-based models. As seen in Table 4, neural networks outperform the physics-based modeling methods in reproducing the classification of the jets in the dataset. The simple approximation of the cone angle (Equation 3) performs very well for the Qperp class, achieving the highest score of all the methods with an accuracy of ∼ 94% surpassing that of the neural networks. On the other hand, the cone angle method clearly underperforms in the Qpar class having the lowest score of all methods with an accuracy of only ∼ 61%. These results show that the cone angle approximation is not well-suited for this problem. This is expected since a large portion of jets were not found in close proximity to the subsolar region.
The coplanarity method (Equation 4) performs almost equally well for the two classes with accuracy scores of ∼ 81 and ∼ 79% for the Qpar and Qperp classes, respectively. The accuracy scores are quite high demonstrating it is an appropriate and accurate method for this problem. However, in both classes, it is heavily outperformed by the neural networks.
Finally, using a bow shock model to calculate the θ Bn presents an in-between case of the other two physical methods. The accuracy scores of ∼ 74 and ∼ 86% for the Qpar and Qperp classes, respectively, are good classification scores with a high tendency to misclassify jets as Qperp, though not as strong as in the cone-angle method. However, this method is also outperformed in both classes by the neural networks. It is interesting to note that the three physics-based methods all have mean scores, for both classes, close to ∼ 80% implying possibly an inherent limitation due to the fact that for upstream information they only use the IMF vector. This is not true for the neural networks which can accept all the available information.

Neural Networks Without IMF (B u ) Input
After establishing the advantage of the neural network method when providing the upstream magnetic field vector (B u ), we investigate the performance of NNs even in the absence of the, in In this case, the magnetic field components were not included in the training procedure of the neural network method. The neural network accuracy is taken as the average performance of 100 individually trained networks as shown in Figures 7, 8. principle, vital information of the magnetic field orientation. This was done to see whether the neural network can still perform well without the IMF input that is necessary for all the other physicsbased models. It should be noted, that we still used the absolute magnetic field (|B|) as input to the NN. As a result, the input in these runs consists of all the parameters shown in Table 1, except the last three which are the components of the magnetic field vector.
Similarly to the previous subsections, the results of the random train/test splits are shown in Figures 7, 8. In Figure 7, it can be seen that the average classification accuracy of both Qpar (∼ 94.8%) and Qperp (∼ 87.1%) class remain high even when the NN's input does not contain directional information of the IMF. Once more, the accuracy in the class of Qpar jets has a lower standard deviation than the Qperp, while in both cases the standard deviation has increased compared to the results shown in Figure 5. Again, as shown in Figure 8, there is no specific structure regarding the scores of each iteration, similarly to the previous case reported in section 4.1. The leave-one-out result is slightly lower than the average result of Qperp jets (∼ 85.7%), while being the same as the average for the Qpar ones (∼ 94.7%).

Dependence of Solar Zenith Angle
After deriving a classification using all the presented methods, a possible link between the misclassified jets and their position in the magnetosheath is investigated. As discussed previously, the solar wind measurements provided as input for all methods, characterize the subsolar region and are not ideal for the characterization of the flanks. As a result, we investigate if this effect is shown in the classification results of each method.
In Figure 9, we present the probability of jets appearing for difference solar zenith angles. There are 4 histograms per jet class that correspond to the 4 presented methods of classifications. On each histogram, there are 3 plots representing the total number of jets (blue), the misclassified jets (red) and the normalized misclassified cases (black). Figure 9A shows the results of the Qpar jets while Figure 9B shows the Qperp jets. It can be seen that most cases of misclassification occur for angles close to the subsolar region (≤ 30 • ). However, when looking at the normalized misclassified rates (black line), it appears that when taking into account the overall number of jets, the relative misclassification rate is much higher close to the flanks (≥ 30 • ).

DISCUSSION AND CONCLUSIONS
From the results of the neural network application (Figures 5, 6, and Table 4), it is clearly shown that neural networks are capable of reproducing the results of the initial database with greater accuracy than the alternative physics-based models. The different results for each method likely originates from the different properties the associated solar wind values between the Qpar and Qperp jets (Raptis et al., 2019). As shown in Figure 4 of Raptis et al. (2019), the velocity of Qperp jets is much lower than that of the Qpar jets, with the first having an average absolute ion velocity of ∼ 100 km/s, while Qpar have ∼ 230 km/s. Furthermore, it was shown that the average solar wind velocity under which Qpar jets were found was V SW,||Jets ≈ 495 km/s with a standard deviation of σ ||,Jets = 96 km/s. On the other hand for the Qperp jet, V SW,⊥Jets ≈ 400 km/s with σ ⊥,Jets = 46 km/s. These differences in the velocity of the jets can have a large effect on the final results since they not only affect the input parameter space (solar wind velocity) but also the association timing (5-min average) differently for every class.
To begin with, the cone angle approximation is working effectively only for the Quasi-perpendicular jets. This is most likely because the majority of them were found close to the subsolar region. Another reason could be that most Qperp jets  have a lower average velocity (Raptis et al., 2019), that along with the proximity to the subsolar region may make the 5-min average values used for the modeling more accurate. The better overall results of the bow shock modeling method originate from the estimation of the bow shock normal vectorn. By finding a point of origin for each jet, many cases that were found closer to the flanks of the magnetosheath region were correctly classified. Finally, the coplanarity method, while still producing overall worse results than the neural network, showed that a significant part of the jets can be classified using this approach. As shown in Figure 9, the majority of the jets, and especially Qperp jets occur close to the subsolar region (≤ 30 • ). However, in all the presented methods the misclassified cases occur mainly close to the flanks. This could originate from the poor characterization of OMNIweb data regarding phenomena that occur close to the flanks. In particular, OMNIweb has a poor capability of catching intervals of quasi-radial IMF (Bier et al., 2014;Suvorova and Dmitriev, 2016). Under quasi-radial IMF there is a quasi-perpendicular shock forming close to the flanks. As a result, Qperp jets found close to the flanks are probably not characterized well enough by the available solar wind measurements that were given as input to all the methods. The superiority of the neural network provides indirect support to the initial dataset. This is achieved because the input of the neural network was independent of the one used in the initial classification. In particular, the initial database was classified using only magnetosheath (downstream) data, while the neural network input contained only solar wind (upstream) information. According to Figure 9, the highest evaluation accuracy was obtained for jets found in close vicinity of the subsolar region. As already stated previously, the OMNIweb database provides measurements that correspond to the subsolar region and therefore are not ideal to characterize the flank regions. Furthermore, the jets found very far from the bow shock could have taken a longer time to propagate in the magnetosheath region, making the choice of 5-min averaging dubious. A better estimation of the jet travel time from the bow shock to its observation point could possibly increase the accuracy of all the presented methods. These results show that the choice of using in-situ measurements for the determination of jets' class may indeed provide more accurate results while not limiting the classification procedure to periods of times that upstream data are available (Raptis et al., 2019). There are many jets that were found far away from the subsolar region (Y GSE > 5R E ) that were systematically misclassified by the physics-based methods. However, a good portion of them was correctly classified by the neural network approach. As previously discussed, the main problem with jets that are found at the flanks of the magnetosheath is that the measurements taken from the solar wind do not accurately characterize this region. Furthermore, the time propagation error along with the error of the origin position is greatly enhanced the further away a jet is found from the bow shock. Nevertheless, due to the availability of such cases, the neural network was able to recognize peculiar cases, "train" for them, and correctly identify a significant portion of them. Table 6, shows the number of misclassifications done per method grouped in three ranges, these close to the subsolar region ([0 − 30] • ) these further away from the subsolar ([30 − 50] • ) and the ones far toward the flanks of the magnetosheath ([50−90] • ). It is clear, that neural networks not only outperform the rest of the methods in the regions where jets are found more frequently but also in the not so common cases of flank jets.
To increase the accuracy of the neural network, one could in principle train two different NNs to tackle the different characterization of subsolar jets and flank jets. Then by utilizing ensemble learning methods, each network could work on its appropriate dataset possibly providing superior combined results. This task is not trivial since the boundary of where a subsolar region starts and ends is not sharp. Furthermore, depending on the properties of the jet, the association of solar wind measurements is an extremely complicated task. In this work, we used 5-min average values that while characterizing the majority of the events, they may fail to do so if a jet has very high velocities or if a significant part of its velocity lies in the yz plane, which could mean that it traveled in the magnetosheath for a longer period of time. All the above, along with the determination of the rest of the classes, shown in the presented database ( Table 2) are planned to be done in future studies.
From a physical point of view, the most interesting result is perhaps the fact that neural networks maintained a very high accuracy even in the absence of the directional information of the IMF (Figures 7, 8 and Table 5). This could be interpreted in several different ways. The most direct one is that the neural networks take advantage of the fact that in the initial database, the jets found in quasi-perpendicular plasma have on average a lower velocity and density than the jets found in the quasi-parallel magnetosheath. It is, however, not yet fully understood if this is the result of an observational bias or of a real physical mechanism (Raptis et al., 2019). The observational bias here would be that for conditions of low velocity and density, the threshold of finding a jet is easier to be satisfied (Equation 1). This would in principle allow jets that are found in the quasi-perpendicular plasma to occur primarily under low velocity and density solar wind. On the other hand, such a bias is not likely to fully explain the shown results. The conditions under which Qperp jets are found could originate from a physical process that makes Qperp jets more likely to occur under specific solar wind conditions, regardless of the IMF direction. If the latter is true, it means that an investigation of solar wind classes (e.g., Habbal et al., 1997;Camporeale et al., 2017) could give insight as to whether each jet class ( Table 2) occurs under different conditions or if specific conditions simply favor the formation of one class over the other. A final possible explanation is that directional information of the IMF is "hidden" in various quantities that were used for the training of the neural network. This, in turn, would allow the non-linear relationship generated by the network to accurately find the correct class of the jets by utilizing such previously undetectable information.
Neural Networks were shown to be a powerful method for the classification of magnetosheath jets. They outperformed the physics-based methods used in distinguishing between quasiparallel and quasi-perpendicular jets. The results here, also indicate that upstream solar wind properties are sufficient to predict the class of the jets even without including the magnetic field vector. Last but not least, machine learning approaches, such as this one, can be generalized and applied to several satellite missions and space environments.

DATA AVAILABILITY STATEMENT
MMS data are available at the MMS Science Data Center (https:// lasp.colorado.edu/mms/sdc). OMNIweb Data are available at https://omniweb.gsfc.nasa.gov/form/omni_min.html. Finally, the time of observation, the initial classification and the classification done by the neural networks and the three physical methods can be found in the Supplementary Material or in the associated data repository (Raptis et al., 2020).

AUTHOR CONTRIBUTIONS
SR and SA-G performed the data analysis. SR wrote the paper with contributions from SA-G, TK, and ML. All the authors contributed to drafting and revising the paper. All the authors contributed to the interpretation of the data.

FUNDING
SR and TK acknowledge support from the Swedish National Space Board (SNSA grant 90/17).