Artificial intelligence unfolding for space radiation monitor data

The reliable and accurate calculation of incident particle radiation fluxes from space radiation monitor measurements, i.e. count-rates, is of great interest and importance. Radiation monitors are relatively simple and easy to implement instruments found on board multiple spacecrafts and can thus provide information about the radiation environment in various regions of space ranging from Low Earth orbit to missions in Lagrangian points and even interplanetary missions. However, the unfolding of fluxes from monitor count-rates, being an ill-posed inverse problem, is not trivial and prone to serious errors due to the inherent difficulties present in such problems. In this work we present a novel unfolding method which uses tools from the fields of Artificial Intelligence and Machine Learning to achieve good unfolding of monitor measurements. The unfolding method combines a Case Based Reasoning approach with a Genetic Algorithm, which are both widely used. We benchmark the method on data from European Space Agency’s (ESA) Standard Radiation Environment Monitor (SREM) on board the INTEGRAL mission by calculating proton fluxes during Solar Energetic Particle Events and electron fluxes from measurements within the outer Radiation Belt. Extensive evaluation studies are made by comparing the unfolded proton fluxes with data from the SEPEM Reference Dataset v2.0 and the unfolded electron fluxes with data from the Van Allen Probes mission instruments Magnetic Electron Ion Spectrometer (MagEIS) and Relativistic Electron Proton Telescope (REPT).


Introduction
A significant volume of data associated with observations of critical Space Weather phenomena, such as Solar Proton Events (SPE) (Paassilta et al., 2018;Robinson et al., 2018) and Radiation Belts (RB) enhancements (Baker et al., 2004;Tang et al., 2016), are attributed to in situ measurements of radiation monitors on board spacecrafts. Radiation environment monitors are instruments tasked with measuring and recording the incident charged particle radiation and provide information and alerts to the host spacecraft and monitoring systems. They are typically designed to be sensitive to particle radiation from protons with energies of few up to hundreds of MeVs and to electrons with energies of few hundred KeVs up to few MeVs. Such energetic particle populations usually originate from solar eruptive phenomena (Liu et al., 2014;Papaioannou et al., 2016) and the complex dynamics of Earth's Radiation Belts (Kataoka & Miyoshi 2006;Turner et al., 2014). The most common radiation monitors are silicon detectors with various geometric and shielding configurations and the latter ones primarily determine the characteristic response and the energy resolution of the monitor. The monitor measurements, count-rates, are typically binned in different channels and each channel has a different response function as well as an energy range it is effectively sensitive to. Radiation monitors are found on board multiple spacecrafts as they are light-weight and simpler to implement instruments, compared to scientific spectrometer detectors which directly detect flux particles such as those of the Combined Release and Radiation Effects Satellite (CRRES) mission (Bandic et al., 2016) or the Payload for Antimatter Matter Exploration and Light-nuclei Astrophysics (PAMELA) mission (Adriani et al. 2011). In this context, the efficient and reliable calculation of particle fluxes from count-rates is highly desirable as it can provide a wealth of data about the radiation environment in various regions of space, and this is invaluable information for the formulation and continued update and improvement of probabilistic SPE models Jiggens et al., 2018) and System Science: Application to Space Weather Analysis, Modelling, and Forecasting RB models (Ginet et al., 2013) as well as forecasting/nowcasting systems (Anastasiadis et al., 2017;Núñez et al., 2017). However, the process of calculating the incident charged particle fluxes from such monitor count-rates, i.e. unfolding, is not trivial as it falls in the category of ill-posed inverse problems.
The fields of Artificial Intelligence (AI) and Machine Learning provide multiple tools and methods that can tackle problems which are difficult to approach with traditional mathematical tools. Ill-posed inverse problems are such a category where AI methods can yield great benefits in terms of efficiency and the reliability of the results (Raudenský et al., 1996;Adler & Öktem, 2017). In this work, we present an AI-based unfolding method for the reliable calculation of proton and electron fluxes from radiation monitor data, the genetic correlative unfolding method (GenCORUM). We employ AI methods in a concept which combines a Case Based Reasoning (CBR) process coupled with a Genetic Algorithm (GA). CBR is a process in computer reasoning in which past knowledge in a system is used to provide solutions for new data without the explicit use of inferred rules and a similarity metric is used to assess the best matching solution from the pool of knowledge. GAs are loosely based on the principles of natural evolution with populations that adapt to their environment, breed, and mutate over time, to adopt traits and characteristics beneficiary to their continued survival. GAs are powerful tools able to efficiently explore and discover solutions in multidimensional and complex problems without supervision and guidance from human users and they have found widespread application in various scientific and engineering fields. One of their more famous space applications is the ''evolved antenna'' on board NASA's ST5 spacecraft which was designed by means of a GA (Lohn et al., 2005).
In this work we have applied our unfolding method, employing the CBR-GA scheme, to data from the European Space Agency (ESA) Standard Radiation Environment Monitor (SREM) on board the spacecraft of the INTEGRAL mission. This specific unit is called IREM (INTEGRAL Radiation Environment Monitor). IREM was designed to measure electrons with energies E > 0.5 MeV and protons with energies E > 10 MeV with fair spectral and angular resolution. There are 15 detector channels and each channel has its own characteristic proton and electron energy response. The instrument and its characteristics have been described in detail in Mohammadzadeh et al. (2003). Sandberg et al. (2012) were the first to demonstrate the derivation of high quality differential proton fluxes with a high energy resolution from SREM measurements using the Singular Value Decomposition (SVD) method. The same method was used later on for the construction of the Level-1 SREM flux database. The INTEGRAL mission is ongoing uninterrupted since 2002 providing an extensive dataset containing years of measurements which include numerous RB passes as well as multiple SPEs occurrences. This makes the IREM dataset an ideal choice for the benchmarking and evaluation of an unfolding method. Furthermore, the unfolding of fluxes from SREM data in general is of particular interest as SREM units have collected a large amount of data from several ESA missions like Rosetta, GIOVE-B, Planck, and Herschel. In what follows, we present in detail the GenCORUM method and evaluate its results. We compare the reconstructed count-rates with the actual measurements and show there is very good agreement. For the analysis of solar energetic protons we use measurements during SPEs and we validate the unfolded proton fluxes by comparing them to the SEPEM Reference Dataset v2 (RDSv2) (Heynderickx et al. 2017). It is shown that the results of our method are in very good agreement with the RDSv2, even in high energies and especially for the more energetic SPEs. We also demonstrate the derivation of electron fluxes by unfolding measurements of energetic electrons within the outer Radiation Belt. The derived electron fluxes are evaluated by comparing them with Van Allen Probes measurements from the Energetic Particle Composition and Thermal Plasma Suite (ECT) (Spence et al., 2013) instruments, specifically from the Magnetic Electron Ion Spectrometer (MagEIS)  and the Relativistic Electron Proton Telescope (REPT)  during carefully selected magnetic conjunctions with the INTEGRAL mission. We show that the unfolded electron fluxes agree well with the Van Allen Probes fluxes.

GenCORUM method description
The unfolding method we have devised in this work consists of two main parts. The first step employs a process based on Case Based Reasoning and the second part employs a Genetic Algorithm. The CBR process produces an initial cruder unfolding of the measurements and its products are then passed on to the GA where the results are fine-tuned and the final unfolded fluxes are produced.

Case based reasoning for flux unfolding
Case Based Reasoning (CBR) is a process in the field of AI in which the knowledge of a system is embodied in a library of past cases as templates (Biswas et al., 2014). Typical ruleinduction systems learn from past knowledge and create explicit rules which are then applied to new and unknown problems. Contrary to this, in the CBR approach there are no general rules created but each past case is treated as its own separate category. Each case typically contains a description of the problem and its solution. For every new problem that the system encounters a similarity metric is used to compare it to the whole library of cases and find the closest matching past problem. The corresponding solution of this closest matched problem is retrieved, revised, and then offered as the new solution. Finally the new problem and its produced solution are incorporated into the library as a new template for future use. This chain of actions is often described as ''retrieve-reuse-reviseretain'' and it can be used both in classification and regression problems. We employ this scheme here by creating a ''virtual library'' of virtual fluxes and virtual count-rates. The causal relation between incident fluxes and measured count-rates is given by Equation (1) where f(E) is the flux, E the energy, C i the count-rate of the ith channel, E min and E max the minimum and maximum energy of the ith channel, RF i the response function of the ith channel, and M the total number of instrument's channels. We note that response functions are typically calculated by experimental calibrations or numerical calibrations by means of GEANT4 simulations. The analytical function we use to model the particle fluxes is the exponential cut-off power law, where a is the intensity of the spectrum, b the power-law spectral index and c the exponential spectral index. This function is simple yet versatile as it is able to capture both pure exponential and pure power-law behavior at its extremes as well as all the in-between cases. Virtual fluxes are produced using the analytical functions and virtual count-rates are calculated by folding the fluxes with the instrument's response functions according to Equation (1). These virtual count-rates and virtual fluxes serve as problem-solution pairs in the CBR process where the count-rates are the problem and the fluxes are the solution. They comprise a library which serves as the system's past knowledge. For the construction of the library a wide range of values is considered for the spectral indexes b and c with all possible combinations. For the intensity a, we use a single value, which allows us to limit significantly the size of the library to a few thousands of count-rate vector -flux spectra pairs. This becomes possible as the Pearson correlation is used for the similarity metric; a simple and robust metric which is insensitive to the absolute values of the compared vectors. We note that there is no reason not to include multiple types of analytical functions for the modeling of virtual fluxes, and their corresponding count-rates. This way one could have a larger and more differentiated pool to match to actual measured count-rates. However, this could potentially increase the library size significantly, making the process slower. Furthermore, as long as the analytical function which is used can adequately approximate physical spectra any possible gains from the inclusion of multiple, but similar, functions are made irrelevant here due to the GA part of our method which is detailed further below. After constructing the library, the CBR process ( Fig. 1) consists of the following steps: 1. each measured count-rate vector is correlated to the whole library of virtual count-rates, and correlation coefficients are calculated; 2. the virtual count-rate vector with the highest correlation is identified and retrieved along with its respective virtual flux; 3. a linear fit of the type y = kx is performed fitting the measured count-rate vector (y) to the virtual count-rate vector (x) and the k value is calculated; 4. the k value is used as a scaling factor by which the virtual flux spectrum is rescaled and the new rescaled flux spectrum is offered as the unfolded flux.
We note that in this implementation we simplify the CBR process and we omit the last step which is to retain and store the new problem-solution pair in the library. We omit this step primarily because it would continually increase the size of the, already extensive, virtual library. For large datasets of the order of tens or hundreds of thousands of measurements this would result in a very slow overall process. Furthermore, due to the way the correlation similarity metric and rescaling is done there is no great benefit in retaining a measured count-rate with its unfolded flux since the latter is simply a multiplied copy of a flux vector that already exists in the library. The unfolded fluxes produced by this initial process will often reconstruct adequately the measured count-rates, especially if high-correlation matches are found in the library. However, since the flux spectra are derived from selected analytical functions they may not be always able to capture the finer details in the measured flux distributions that would very accurately reconstruct the measurements. For the fine-tuning of the spectra and the final production of unfolded fluxes the products of the CBR step are forwarded to the GA described below.

Genetic Algorithm for flux unfolding
Genetic Algorithms (GAs) are part of the broad field of Evolutionary computing. They are processes that are inspired from the way populations of organisms and species change and evolve in nature, as a result of the drive to adapt to their environment, survive, and pass on their genetic information to the next generation. GAs were first described and introduced in the 60s and 70s while many variations have been described since and implemented in various scientific and engineering fields while they are still the subject of active research (Gong et al., 2015;Karafotias et al., 2015). GAs are particularly useful in providing answers to problems that human users cannot offer insights as to what an optimal solution could be. They are very well suited for exploring the space of solutions in complex problems of high dimensionality and can thus uncover novel solutions which can offer increased performance and efficiency to a system. Here we employ a simple GA as the second part of our unfolding method. The GA uses each flux spectrum produced in the previous step as a good starting point since the CBR fluxes can usually already reconstruct the measurements relatively well. Using the CBR spectrum we produce a population of N spectra (organisms) by randomly perturbing the flux values (genes) in the K energy bins of the CBR spectrum. We only restrict the random fluctuations so that the trend of the spectrum is that ''the higher the energy binthe lower the flux''. This results in a population of N similar but different flux spectra all of which correspond, more or less successfully, to a single measured count-rate vector. We fold all individual spectra from this population with the response functions and produce their respective reconstructed count-rate vectors.
Using this initial population, the GA then consists of the following stages depicted in Figure 2 and detailed below: 1. Fitness evaluation of the population As a metric of fitness, or performance, we use the mean absolute percentage error (MAPE) of the measured count-rate vector relative to all the reconstructed count-rates from the population of unfolded flux spectra (organisms). Equation (3) shows the MAPE calculation; a low MAPE value means a high fitness/performance for an individual organism.
where M is the number of the instrument's channels, C i the measured count-rate of the ith channel and RC i the reconstructed count-rate of the ith channel.

Parent selection from the population
At each generation we select as parents the individuals with the lowest MAPE errors. We identify those whose error is in the P lowest quantile, P 2 (0, 1), of all the MAPE values in the current generation. These individuals are selected as parents; for a population of N the selected parents are P · N. Using the elitism tactic the parents also survive unaltered in the next generation. Elitism ensures that even if no children are produced with higher fitness scores (lower error) in the new generation, the genomes (fluxes) of this generation's most successful individuals are not lost and the maximum population fitness will not decrease but at worst remain constant.

Breeding and creation of children population
Random pairs of parents are selected from those identified in the previous step to produce a child. For each of the pairs weights are calculated representing the performance of the two parents relative to each other. The genome (flux) of the child is the weighted mean of the parents' genes, as shown in Equation (4). If R 1 and R 2 are the MAPE errors of the two parents then, where w 1 and w 2 are the weights, f 0 is the child flux and f 1 and f 2 are the parent fluxes. The weights are calculated this way so that the parent with the higher error, and hence lower fitness, will participate accordingly less in the genes of the offspring and vice-versa.

Random mutation of the children population
The produced flux spectra (genomes) of the children are randomly mutated. A mutation rate is used to stochastically determine whether a flux value in a genome will be mutated or not. We use a high mutation rate of 0.5, 50% of all values  are altered, as this is the main search operator since all fluxes in the population originate from a single spectrum. The flux values are altered in the K energy bins maintaining the downwards trend of ''the higher the energy bin -the lower the flux''. The final population of this generation consists of the mutated children and their unaltered parents. The whole process returns to step 1 and repeats until a minimum error threshold or a maximum number of repetitions (generations) is reached.
3 Instrument characteristics and data

SREM response functions
The IREM response functions (RFs) for incident omnidirectional proton and electron fluxes are shown in Figure 3. There are 15 channels and each has a different sensitivity energy band for protons and electrons. We note that unlike spectrometers, which are able to measure incident spectra in narrow distinct energy intervals, SREM samples the spectra in broad and overlapping energy bands; e.g., channels TC1, S12 and S12 (or TC3, S32, S33 and S34). As a consequence, the count-rates of the channels are strongly dependent on each other; e.g., counts in S15 are also counted in S14, S13, S12 and TC1. The threshold energy in the ''total count-rate'' channels of detectors 1 and 3 (TC1 and TC3) correspond to the threshold penetration of IREM shielding. All the channels are sensitive to protons, while the coincidence channels C1-C4, S25 and S15 can be considered as pure proton channels. However, in the presence of high-energy electrons (with energies above MeV) S15 and C4 can be contaminated by electron counts. Obviously, there are no pure electron channels.
All the response functions are open-ended, meaning they do not fall back to zero after some energy value. The proton RFs have narrow or broad peaks while the electron RFs do not even present well-defined local maxima (peaks) having mostly positive slopes across the energy axes. These characteristics of the response functions, especially the fact they are open-ended, make the unfolding of INTEGRAL-IREM measurements a non-trivial procedure and an ideal benchmark for the application of the GenCORUM method. We have retrieved all the count-rate measurements of IREM dataset, from the start of the mission in 2002/11 up to 2018/01, from the PSI SREM website (http://srem.web.psi.ch/).

Solar proton events data
For the validation of unfolded proton fluxes we have used the SEPEM RDS v2.0 dataset (RDSv2), publicly available at http://sepem.eu/help/SEPEM_RDS_v2-00.zip. RDSv2 is considered to be the most complete, reliable and continuous dataset of SPE fluxes. Currently, it contains proton differential flux time-series from 1974 to 2013 derived from NOAA GOES measurements. The flux series have been cleaned from spurious data points, cross-calibrated with IMP-8/GME data (Sandberg et al., 2014), and re-binned to 11 energy channels. The integral fluxes derived by RDS have been recently validated with STEREO-HET and IMP-8/GME by Rodriguez et al. (2017). By making use of the SEPEM Reference Event list for SPEs, we extracted the IREM data within the event durations of the 51 SPEs that occurred in the period 2002/11 to 2013/03, as defined in the list. The count-rate measurements were interpolated to the 5 min cadence time stamps of the RDSv2 prior to the unfolding, resulting in a concatenated time-series with 65,000 measurements in total. We have excluded all the measurements at L-shell values of less than 8 to avoid magnetic shielding effects and contamination by trapped particles. We note that INTEGRAL has a highly elliptical orbit with the largest part of its orbit being at L > 8. Therefore, the measurements we have excluded were less than 13% of the SPE related measurements.

Radiation belts
For the validation of unfolded electron fluxes we use data from the Van Allen Probes mission (VAP). The VAP mission consists of two spacecrafts, A and B, each carrying the Magnetic Electron Ion Spectrometer (MagEIS) detector and the Relativistic Electron Proton Telescope (REPT) detector which measure electron fluxes. The two instruments have slightly overlapping energy bands where MagEIS measures electron fluxes with energies E > 30 KeVand REPT measures relativistic electron fluxes with E > 1.5 MeV. The VAP mission and its dataset is ongoing since late 2012 and it is considered a very good reference for electron flux measurements due to its high energy and time resolution. Here, we use data from spacecraft A, available at https:// rbsp-ect.lanl.gov/data_pub/, to compare against IREM electron fluxes derived with the GenCORUM method. The comparisons were made during conjunctions within 2012/11-2018/01. The conjunctions were derived using elements from the COSPAR Panel for Radiation Belt Environment Modeling (PRBEM) recommendations for Data Analysis Procedure (http://craterre. onecert.fr//prbem/Reference_documents.html). For the determination of the conjunctions we require the satisfaction of conditions associated to the L-shell value (L), the fraction of the total intensity of the magnetic field divided by its equatorial value B/B eq , the magnetic local time (MLT), the absolute difference in time between measurements (Dt), and the Kp index value. The selected values considered for the calculation of the conjunctions are presented in Table 1.
For each measurement of INTEGRAL we find all measurements from MagEIS and REPT that satisfy all the above conditions which results in~2100 measurements from the INTEGRAL dataset. We have unfolded all the IREM measurements during SPEs and derived the corresponding SPE flux series. For the Gen-CORUM unfolding, we have used spectral indexes b 2 (0 À8], c 2 (0 À8], to create the library of virtual fluxes and the spectra are calculated over 40 energies logarithmically binned between 10 and 300 MeV. This high number of energy S. Aminalragia-Giamini et al.: J. Space Weather Space Clim. 2018, 8, A50 bins is used in order to allow many degrees of freedom to the GA to be able to fine-tune the flux spectrum. For the GA part a population of 1000 spectra in each generation is used and a maximum of 2000 generations is set with a MAPE goal of 5%. After unfolding the derived fluxes are folded with the instrument's response functions according to Equation (1) to  produce the reconstructed count-rates. Figure 4 shows comparisons between the measured and reconstructed time-series and cross-plots for S12-2nd, C1-8th, and S33-14th channels. Figures with comparisons for all channels can be seen in the Supporting Information (SI). The comparisons of the measured and the reconstructed count-rates show that the unfolded fluxes reproduce the measurements very well. The reconstructed count-rates typically differ at low values closer to the background as seen in channel C1-8th and others. However, above the background in almost all channels there is remarkable agreement indicating that the unfolding is successful. It is particularly interesting that channels with very different energy bands show similarly good reconstruction, which implies that the produced spectra are of good quality across all the energy bins. This is particularly evident in the proton coincident channels S25-7th, C1-8th, and C2-9th, which have the relatively weakest responses.

Comparison of unfolded fluxes with SEPEM fluxes
For the flux-to-flux comparison with the SEPEM RDSv2 dataset the GenCORUM-IREM unfolded fluxes were re-binned to SEPEM energy bins and directly compared. INTEGRAL-IREM can measure protons with energies E ! 10 MeV, however the first two bins of SEPEM have effective energies at 6 MeV and 8.7 MeV and therefore no comparisons are made Fig. 4. Time-series and cross-plots of measured and reconstructed INTEGRAL count-rates -for channels S12-2nd, C1-8th, and S33-14thduring all considered SPEs; y = x equality lines are in blue.
S. Aminalragia-Giamini et al.: J. Space Weather Space Clim. 2018, 8, A50 for these bins. Figure 5 shows the mean spectrum from all measurements where an overall very good agreement can be clearly seen. The inset shows the absolute percentage error for the mean spectrum which is below 40%. Notably, even at high energies the error remains low and this is explained by the fact that at high energies only the most energetic SPEs register where the unfolded fluxes agree best with SEPEM fluxes. Figure 6 shows time-series plots and cross-plots for the 3rd, 6th, and 9th energy bins at 12.6 MeV, 38 MeV, and 115 MeV respectively, comparisons for all energies can be seen in the SI.
The comparisons show that GenCORUM-IREM unfolded fluxes agree very well with the SEPEM Reference dataset fluxes across all energies. The majority of the unfolded fluxes are within a factor of 2 of the SEPEM fluxes and the relationships at all energy bins are clearly linear and parallel to the y = x equality line. The unfolding captures especially well the most intense parts of the SPEs as it can be seen in the cross-plots that there is minimal scattering along the y = x equality line for high flux values, requiring no or minimal cross-calibration. The two datasets diverge mostly at lower values close to or within the background which is in agreement with the scattering that was seen in the cross-plots of the reconstructed count-rates. It is interesting to note that in the first compared energy, the 3rd SEPEM bin at E = 12.58 MeV, there is significantly more scattering than in all the rest energy bins. The bounds of this SEPEM bin are 10.45 MeV and 15.12 MeV; at those energies only 4 of the 15 proton RFs have significant response values and furthermore the response values are effectively identical. This possibly offers limited information in the unfolding process and it is possibly the reason for the increased variance between GenCORUM-IREM fluxes and SEPEM, especially at lower flux values for f < 10 (cm 2 s sr MeV) À1 . However, even in this energy bin the energetic SPEs show quite good agreement. As an additional evaluation of the agreement between the unfolded fluxes and the SEPEM fluxes we have calculated the Pearson correlation between the two time-series. The correlation coefficient is suitable here as a metric since it is not affected by any offsets that may exist and thus allows the direct comparison of the time-series without additional processing, e.g. a cross-calibration process. As shown further on this is particularly useful for the comparisons made in the electron unfolded fluxes. The calculated correlation coefficients for the proton fluxes at the 8 SEPEM energy bins are shown in Table 2.

Comparison of measurements with reconstructed count-rates
As previously done for the solar proton measurements, we have unfolded all measurements during the calculated conjunctions. For the unfolding we have used spectral indexes b 2 (0 À8], c 2 (0 À8], to create the library of virtual fluxes and the spectra are calculated over 40 energies logarithmically binned between 0.5 and 10 MeV. For the GA part, a population S. Aminalragia-Giamini et al.: J. Space Weather Space Clim. 2018, 8, A50 of 1000 spectra in each generation is used and a maximum of 2000 generations is set with a MAPE goal of 5%. After unfolding we reconstruct the count-rates from the electron fluxes folding them with the instrument's response functions according to Equation (1). We note that for the unfolding of electron fluxes we do not use the measurements from all channels. We use only data from the channels in ''Group A'' as denoted in Figure 3, namely the TC1-1st,  S12-2nd, S13-3rd, TC2-6th, C4-11th, TC3-12th, S32-13th and S33-14th channels. While the use of less information for unfolding may seem counter-intuitive, the rest of the channels have very low response functions which are also typically non-zero only in quite high energies. The signal from these channels is usually very close to or lost within the background noise offering little information and actually making the unfolding process less efficient. Therefore we omit the counts from these channels and we do not take into account the quality of their reconstruction in the unfolding process. Figure 7 shows the comparisons of reconstructions and measurements in time-series and cross-plots for channels S12-2nd, TC2-6th, and TC3-12th. Figures with comparisons for all channels that are used in the unfolding can be seen in the SI. The comparisons between measurements and reconstructions show very good agreement for the channels used in the unfolding with the majority of the measurements being on or very close to the y = x equality line. The channel showing most divergence is the TC2-6th which is non-zero above 1 MeV and is sensitive to electrons of higher energies. This indicates that for higher energies the unfolding diverges and can produce lower values. This is discussed below in the flux comparisons. For the flux-to-flux comparison with the MagEIS dataset the unfolded fluxes are re-binned to the MagEIS energy bins and directly compared. INTEGRAL-IREM can measure electrons with energies E ! 0.5 MeV and the unfolded fluxes are compared for bins above this energy. We note that the MagEIS dataset has no data at certain energy bins and these are just omitted. Figure 8 shows the mean spectrum from all data points during RBs for MagEIS, REPT and the GenCORUM-IREM fluxes each at their own energy bins. We note that the spectra we have calculated here extend up to~10 MeV, however the IREM instrument was not really designed to be sensitive to electrons with energies higher than~4 MeV and therefore we restrict our study to energy bins close to this limit. It is notable, however, that the mean spectrum agrees relatively well with REPT even up to~10 MeV. Figure 9 shows time-series plots and cross-plots with comparisons of MagEIS data with the unfolded fluxes re-binned in the MagEIS bins at 0.59 MeV, 0.9 MeV, 1.7 MeV and 2.65 MeV, figures with comparisons for all energies up to 4.22 MeV can be seen in the SI. Figure 10 shows time-series plots and cross-plots with comparisons of REPT data with the unfolded fluxes re-binned in the REPT bins at 1.9 MeV, 2.6 MeV, and 3.4 MeV, figures with comparisons for all energies up to 4.2 MeV can be seen in the SI.
The comparisons show that the unfolded electron fluxes have good agreement with both MagEIS and REPT flux data. In most energy bins the majority of the flux measurements fall close to the y = x equality line and mostly within a factor of 2 with respect to MagEIS data. For lower energies E < 1.5 MeV, especially in the first compared energy bin E = 0.59 MeV, there is some scattering but it is generally contained in the lower values of the data. For higher energies E ! 1.5 MeV, the unfolded fluxes agree quite well with MagEIS but show offsets with respect to REPT, particularly for E = 1.9 MeV. Notably, the agreement with REPT is quite good at E = 3.4 MeV and better than in lower energy bins. Also, at higher energies E ! 1.5 MeV the unfolded fluxes show less scattering relative to MagEIS and REPT data. Finally, as was done for the proton datasets, we calculate the Pearson correlation coefficients between the unfolded and measured flux time-series from MagEIS and REPT. This is particularly useful as the unfolded fluxes show in some cases offsets but are otherwise very similar to the measured ones. Since Pearson correlation is invariant to simple linear transformations and is thus not affected by offsets it serves well to show the agreement between the two datasets. Table 3 shows the calculated correlation coefficients for the electron fluxes at all 9 energy bins of MagEIS and all 5 energy bins of REPT.

Conclusions
In this work we have presented an Artificial Intelligence unfolding method for the calculation of proton and electron fluxes from radiation monitor count-rates. GenCORUM combines two methodologies from the field of Artificial Intelligence in a single process in order to achieve reliable and good quality flux unfolding. The method is quite flexible in the sense  that it essentially only requires the response functions of an instrument. While some very basic assumptions about the spectral profile of the particle fluxes are made here the method is not in principle bound by them as multiple and possibly very different spectral profiles can be included in the analysis. Furthermore the method can produce flux spectra with arbitrarily dense energy binning allowing for accurate comparisons with multiple other datasets over a wide range of energies as long as the instrument design allows it. We have applied the GenCORUM method to the extensive dataset of INTEGRAL-IREM using more than 15 years of data. The INTEGRAL-IREM instrument presents a real challenge to any unfolding method due to the profiles of its response functions. Both proton and electron responses are open-ended to high-energies not providing any cut-off threshold energy to consider and the electron response functions are effectively simple curves with positive slopes and no peaks offering minimal information. Despite these characteristics we have shown successful unfolding of proton and electron fluxes from IREM data which reconstruct the measurements very well. Furthermore we have compared our fluxes using SEPEM data and VAP/MagEIS and VAP/REPT data for protons and electrons respectively. The unfolded proton fluxes show a very good degree of agreement with SEPEM fluxes during SPEs. In the great majority of measurements and energy bins the unfolded fluxes are within a factor of 2 with SEPEM requiring little or no cross-calibration, while the best agreement is shown for the more intense SPEs. The electron fluxes also show good agreement with MagEIS and REPT data during the calculated conjunctions remaining mostly within a factor of 2 or showing simple linear or log-linear relationships. Overall our unfolding method is shown to be robust and produce reliable fluxes. We aim to continue improving the GenCORUM method and further apply it to data from other monitors like the EMU from the ESA Galileo mission and provide high quality fluxes to the space environment community.

Supplementary Material
Supporting Information for Artificial Intelligence Unfolding for Space Radiation Monitor data are available at https:// swsc-journal.org/10.1051/swsc/2018041/olm