dataesr/scientific-paragraphs-categorization huggingface dataset:
Montoliu et al. [24]  proposed a bag-of-words (BoW)-based method for describing fingerprints on the basis of magnetic fields. The authors gathered 21 points in a corridor and evaluated the classification using k-NN, SVM, random forest, and other algorithms, demonstrating good positioning performance. Typically, fingerprinting methods require traversing the entire magnetic-field database, which is often time-consuming. Most conventional methods treat successive sequences of magnetic fields as independent observations of each other, and positioning is achieved with point-to-point matching. However, measurements from two points at different spatial locations may show similarity in a wide environment, leading to positioning errors. Complex indoor environments often have various constraints, and as some walking trajectories are relatively fixed, it becomes feasible to use historical information about the trajectory to enhance the location estimation method  [25].
In  [26, 27] , the authors used dynamic time warping (DTW), which treats the magneticfield trajectory as a time series. The magnetic-field trajectories' unique pattern can overcome the low-discernibility problem of the magnetic field, but it is also very time-consuming and can cause time delays. Although magnetic-field anomalies can be used to locate users moving through narrow corridors, it remains challenging to locate users in expansive areas. Perez-Navarro et al. [27]  created eight 'virtual corridors' to simulate users' movement upon entering this building. Using the DTW method, they obtained a dataset of 64 paths (8 paths × 2 directions × 4 smartphones) and achieved corridor-level positioning. The works in  [28] [29] [30]  used sensor fusion methods to increase positioning accuracy, such as the fusion of pedestrian dead reckoning (PDR) with the magnetic field using Kalman filters, particle filters, or hidden Markov models.
The extracted image features were then analyzed with a convolutional neural network (CNN), and magnetic landmarks were classified with a multilayer perceptron (MLP). The corridor and atrium had accuracies of 0. 8 and 2. 3 m, respectively. Zhang et al. [35]  proposed an LSTM-based magnetic-field positioning algorithm and extended the magnetic-field dimension with a double slidingwindow-based scheme, which expanded the feature dimension of the LSTM model to achieve higher positioning accuracy. To solve the above problem, this paper proposes a novel magnetic positioning algorithm based on TCNs to avoid the RNN (LSTM and GRU) vanishing gradient problem. Magnetic-field sequences are used to represent each corridor  [13]. A vast database of magnetic fields was collected through heterogeneous smartphones.
Data Collection To evaluate the performance of the proposed algorithm, we selected eight corridors on the first, second, and third floors of the building of Polytech Galilée, shown in Figure  7 ; several heterogeneous smartphones (iPhone Xs Max, iPhone 12 Mini, Redmi Note 7, Samsung Galaxy S20) were used to collect the data. Table  1  describes the system version, sensor vendor, magnetometer model, and magnetometer characteristics of the smartphones used in the experiment. Samsung Galaxy S20, Samsung Galaxy S9, and Redmi Note 7 all use magnetometer models from Asahi Kasei Microdevices (AKM), OnePlus 7T Pro uses a magnetometer model from MEMSIC, while iPhone uses Apple's own magnetometer, and the information is not available through the API. The chosen corridors were all between 10 and 20 m in length, the MATLAB Mobile application was used for data collection, and the sampling frequency was set to 100 Hz.
The smartphones were held horizontally, and data were collected 10 times in the forward direction and 10 times in the backward direction, so that there were 20 trajectories per corridor; the training dataset of 3 heterogeneous smartphones (iPhone Xs Max, iPhone 12 Mini, and Redmi Note 7) contained a total of 3 × 10 × 2 × 8 = 480 trajectories. We then collected two more round trips in each corridor (two forward and two backward) as a test dataset, giving a total of 4 × 8 × 3 = 96 test trajectories. The training dataset had 739,700 magnetic-field measurement samples, while the test dataset contained 148,600 samples. We also took two round-trip paths of Samsung Galaxy S20, Samsung Galaxy S9, and OnePlus 7T Pro to test whether the algorithm could be seamlessly applied to heterogeneous smartphones, even if we had not used the neural network to train them.
Experimental Settings Table  2  describes the parameter settings of the algorithm. We defined a TCN network with six residual blocks in sequence, beginning with a dilation factor of 1 and each subsequent residual block with a dilation factor twice that of the previous layer. For the residual block's one-dimensional convolutional layer, 128 filters of size 5 were provided, and a dropout factor of 5 × 10 -3 was specified for the dropout layer. The optimizer was set to 'Adam', epochs were set to 120, the minibatch size was set to 4, and the learning rate was set to 1 × 10 -4. Table 2 also shows the working environment of the experiment. The experiments in this article were conducted on a MacBook Pro with a 2. 6 GHz 6-Core Intel Core i7 processor running macOS Monterey 12. 6. All models were implemented on MATLAB 2022a.
Classification Results We first tested our prediction model using the three trained smartphones. The test dataset for the experiment consisted of forward and backward trajectories from the three trained smartphones. Figure  8  depicts the ground truth and predictions of the test set, with most of the red lines overlapping the blue (predictions were consistent with the ground truth). The shown red line represents an incorrect prediction. Figure  9a  shows the confusion matrix result of the three trained smartphones (iPhone Xs Max, iPhone 12 Mini, and Redmi Note 7). The blue diagonal areas represent correctly predicted points, while the nondiagonal parts represent wrongly predicted points. The majority of the 148,600 total points corresponded to correct predictions. Classification accuracy can be evaluated by comparing predictions with ground truth and calculated with Equation (4); the accuracy of the TCN-based magnetic-field trajectory classification method was 99.
Accuracy = # correctly classified points # total points. To evaluate the applicability of our trained model to an untrained smartphone, we utilized a Samsung Galaxy S20, Samsung Galaxy S9, and OnePlus 7T Pro to collect three test datasets (two round-trip walks in eight corridors for each smartphone). The newly collected data were fed into the previously trained model (Figure  9b-d ) and achieved accuracies of 95. 20%, 88. 23%, and 84. 27%, respectively. This demonstrates that the trained model could also be applied to untrained smartphones. We implemented the GRU and bidirectional LSTM (BiLSTM) to the same training and test sets. Table  3  compares the classification accuracy of BiLSTM, GRU, and TCNs in the same dataset. The results show that the TCN models outperformed the two RNN models.
Conclusions In this article, we proposed a novel TCN-based indoor magnetic positioning algorithm for smartphones that exploits the predictive power of TCNs to solve the indoor magnetic positioning problem and avoids the time-consuming fingerprint matching process compared to the DTW-based magnetic-field sequence matching method. Compared with traditional RNN methods such as LSTM and GRU, our training was faster and more accurate, and avoided the gradient explosion problem. We analyzed the characteristics of magnetic-field trajectories, and preprocessed the magnetic-field sequence using coordinate transformation, smoothing filters, and first-order differencing. Large-scale magnetic-field trajectory data were used to train the prediction model, and different test sets were used to evaluate our algorithm.
Magnetic susceptibility datasets Volumic magnetic susceptibilities (ĸ) were measured in situ with two field susceptibilimeters (Bartington MS2D sensor, and Terraplus KT10). We also performed susceptibility measurements (ĸ) with a GEONICS EM38 electromagnetic induction (EMI) device. This instrument is usually devoted to conductivity surveys but can also be used to map qualitative variations of field susceptibility  (De Smedt et al. 2014). To obtain quantitative measurements, an additional calibration is necessary. We used the protocol described in  Thiesson et al. (2016)  using theoretical calculation from a ground layer with different susceptibilities. First, we took a non-magnetic purely conductive aluminum sphere to find the converting coefficient between field measures and ppm (part per million).
For our instrument, the adjusted coefficient is 35 ppm (from the secondary field over the primary field ratio), to be compared to the coefficient of 29 ppm indicated in the user's manual of GEONICS. Second, we calibrated the electromagnetic response of the device to convert ppm values into real susceptibility values. Using our calibration results, we re-calculated the data obtained in the field. The goal was to test the reliability of this device and method in comparison with more classical near surface susceptibilimeters. With this protocol, this instrument integrate volumetric susceptibility measurements at greater depth than the other devices. Measurements with the GEONICS EM38 and Bartington MS2D were realized simultaneously in May 2012. The Terraplus KT10 measurements were realized the same year during a second field campaign using the same profiles and position.
2 ). It is worth to note here that the olive grove is plowed almost every 6 months up to a depth estimated by the farmer at 40-60 cm. The measurements with the MS2D susceptibilimeter, EM38 device and the sampling was realized before plowing of the field whereas, those with the KT10 susceptibilimeter were done shortly after. Maps for each of the concerned devices were drawn with the commercial SURFER Software (https:// www. golde nsoft ware. com/ produ cts/ surfer) using minimum curvature interpolation. Unfortunately, a technical failure prevented the in situ measurements of the T6 and T7 profiles with the Bartington MS2D sensor. However, soil samples were taken at each measurement point of these two profiles as well as for profiles T4 and T1 to perform the laboratory magnetic analyses (see Sect.
These measurements are consistent with the presence of lepidocrocite or goethite for which typical susceptibilities are on the order of a few 10 -5 SI and amorphous iron oxyhydroxides as already suggested by the mineralogical studies  (Ghorbel et al. 2010). Figure  2  shows the spatial distribution of the susceptibilities in the olive grove obtained with the three different devices used. The three datasets are plotted using the SURFER10 software using minimum curvature interpolation and the same color scale for direct comparison. Measured susceptibilities range between 17 and 108 × 10 -5 SI, 31 and 114 × 10 -5 SI, and 10 and 159 × 10 -5 SI for the Bartington MS2D, KT10, and EM38, respectively. Similar ranges are observed for the variations with the MS2D and KT10 and slightly higher for the EM38 interpreted as due to the penetration differences and soil volumes integrated by the different devices.
We therefore demonstrate, with this dataset, the efficiency of the GEONICS EM38 for susceptibility measurements in contaminated soils studies while this specific use was up to now mainly restrained to Geoarcheology (i. e. ,  De Smedt et al. 2014; Heil and Schmidhalter 2019). The advantage of using the GEONICS EM38 for environmental prospection, besides its investigation depth, resides in the possible combination, with a single device, of the susceptibility maps with soil resistivity ones for which the GEONICS EM 38 is mostly dedicated (i. e. ,  Heil and Schmidhalter 2019). The commercial Terraplus KT10 and MS2D Bartington susceptibilimeters (even if known for their slightly lower sensitivity compared to laboratory susceptibilimeters) also proved their reliability even in the case of very low intensity signal rarely reported to our knowledge in the literature.
Acknowledgements The authors thank the editor and reviewers for their careful reading and comments that greatly improved the manuscript. They also like to acknowledge  N. Herrero  and  C. Djebbi  for helping in the field and  N. Herrero  for Magnetic analyses. We also thank  Julien Thiesson  ( METIS ,  UMR7619, Paris, France ) for helping with the calibration of the GEONICS-EM38.
The model is a Convolutional Neural Network (CNN) trained on a database of synthetic PEGS-simulated for an exhaustive set of possible earthquakes distributed along the Chilean subduction zone-augmented with empirical noise. The approach is multi-station and leverages the information recorded by the seismic network to estimate as fast as possible the magnitude and location of an ongoing earthquake. Our results indicate that PEGSNet could have estimated that the magnitude of the 2010 M w 8. 8 Maule earthquake was above 8. 7, 90 s after origin time. Our offline simulations using real data and noise recordings further support the instantaneous tracking of the source time function of the earthquake and show that deploying seismic stations in optimal locations could improve the performance of the algorithm.
Plain Language Summary Tsunami early warning requires the fast and reliable estimation of an earthquake magnitude provided by Earthquake Early Warning (EEW) systems. EEW systems are currently limited by the propagation speed of P-waves, which rely on as natural information carriers. Even more problematic, EEW systems based on the first seismic arrivals tend to saturate with earthquake magnitude, and can become unreliable for magnitudes above 8. The recent discovery of Prompt Elasto-Gravity Signals (PEGS), which comprise gravitational changes generated by earthquakes, has raised hope to overcome these limitations because they travel at the speed of light, much faster than P-waves. We use PEGS to re-train the previously developed deep learning model PEGSNet to track the magnitude evolution of big earthquakes in the Chilean subduction zone, historically affected by tsunamis.
The CNN is trained on a database made of synthetic PEGS waveforms plus real noise. Motivated by the success of PEGSNet in estimating the magnitude of the 2011 M w 9. 0 Tohoku-Oki earthquake in real time  (Licciardi et al. , 2022) , we aim to export the algorithm to another tsunamigenic region, Chile, and evaluate the feasibility of proposing this method as a complementary tsunami early warning system. For this, we first re-train PEGSNet on the seismic network that recorded the 2010 M w 8. 8 Maule earthquake in order to assess its performance in rapidly estimating the magnitude of this mega-earthquake. We then re-train the algorithm on the seismic network presently available in order to assess how PEGSNet would perform currently for an earthquake in Chile.
Data Given the limited number of PEGS observations, we create a synthetic database to train the CNN. We compute the theoretical waveforms at the location of the available stations generated by 500,000 sources with different locations, source time functions, seismic moments and focal mechanisms. The waveform computation uses a pre-constructed moment tensor database, which uses normal mode theory to build Green's functions between sources and receivers  (Juhel et al. , 2019). To make the synthetic signals realistic, we then add empirical noise (i. e. , actual noise recorded at each station) to the modeled waveforms. We For both networks, we select stations within a 2,000 km radius from all synthetic epicenters. According to  Juhel et al. (2019) , stations located in the P-wave extensional direction of the radiation pattern record strong gravity perturbation when deployed at distances between 1,000 and 2,000 km away from the epicenter of a large earthquake, due to the growing density anomaly generated by the rupture itself and the larger volume perturbed by the propagating seismic waves.
Synthetics PEGS Database We compute synthetic PEGS following the method of  Juhel et al. (2019). It requires as inputs the earthquake centroid location, station locations, focal mechanism, Source Time Function (STF) and seismic moment (M 0 ). We consider 994 source locations, equally spaced along the 20 and 30 km iso-depths of the Chilean subduction megathrust, since all the earthquakes that caused tsunamis had centroids located in this depth range. The longitude, latitude, depth, strike and dip angles of all sources are consistent with the Slab2. 0 model  (Hayes et al. , 2018). Rake angles for each source are drawn from a normal distribution with mean 90° and standard deviation 10°, and magnitudes from a uniform distribution between 6. 0 and 10. 0. Moment is calculated as 𝐴𝐴 𝐴𝐴0 = 10 1. 5𝐴𝐴 𝑤𝑤 +9.
Empirical Noise Database For both configurations, 2010 and 2021, the noise database is built from 11 months of continuous recordings, from May 2009 to April 2010 and from February 2021 to January 2022, respectively. The database is composed of 1-hr long traces that we pre-process as follows: instrumental response, mean and linear trend removal, and decimation to 1 Hz. We filter the recordings and synthetic waveforms as indicated in  Vallée et al. (2017) , using a 2. 0 mHz high-pass, Butterworth, two poles, causal filter and a 30. 0 mHz low-pass, Butterworth, six poles, causal filter. From each 1-hr-long trace, we extract data windows of 700 s at randomly selected starting times. For one event, we use the same time interval for all stations to preserve spatial coherence of noise across the seismic network.
We then add these noise samples to the synthetic PEGS and store each waveform as a 700 s long time series, centered on the earthquake origin time. We calculate the P-wave arrival time corresponding to each event-station pair in the synthetic waveform database, then set the signal to zero after that time and use the information of PEGS uniquely, to train the model. In a real-time scenario a P-phase picker would estimate the P-arrival time. As in  Licciardi et al. (2022) , we clip traces at ±10 nm/s 2 to eliminate high amplitudes and to limit the influence of high levels of noise. We scale amplitudes by 10 nm/s 2 to facilitate the convergence of the optimizer and to preserve information on the relative amplitudes of the PEGS. Additionally, we set to zero the amplitudes of the traces of 5% of the stations, randomly selected, for each event to simulate missing data and to limit over-fitting.
Architecture PEGSNet is a CNN that combines convolutional layers and fully connected layers in sequence (Figure  3 ), adopting a multi-station approach  (Licciardi et al. , 2022). We work with image-like inputs to train PEGSNet. Data are organized as images of size (M, N, c). M (=315) is the number of samples in 315 s long trace time windows, N is the number of stations and c (=3) is the number of components: vertical, east and north. The three outputs of the model are latitude (ϕ), longitude (λ) and moment magnitude (M w (t)) at the time t of the last sample of the window. The original architecture of PEGSNet designed by  Licciardi et al. (2022)  consists of eight convolutional blocks, but in this work, we use seven since the number of stations is less than that used in the cited work. Each block has one convolutional layer with rectified linear unit (ReLu) activation function and one dropout layer.
10. 1029/2023JB026588 6 of 15 of 315 s. Then, we assign the value of M w (t 1 + 315 s) as the corresponding label (Figures  3b  and 3c ). In other words, PEGSNet is given a 315 s snapshot of the network's seismograms, and has to output the magnitude at the end of this snapshot. The full database is divided into three parts: training, validation and test sets that comprise 80%, 10% and 10% of the database, respectively. The loss between the ground truth and the predicted values is minimized during training (200 epochs and batches of size 512) by measuring the mean absolute error. At the end of each epoch, the model is evaluated on the validation set. The model whose loss value is the lowest on the validation set is selected as the final model and is evaluated once again on the test set. PEGSNet has to be re-trained for each change in the network setup.
Testing For each sample in the test set, a 315 s-long window [t 1 , t 2 = t 1 + 315 s] slides through the data with a time step of 1 s. The starting window ends at the earthquake origin time t 0 (t 2 = t 0 and t 1 = t 0 -315 s) and the final window starts at the earthquake origin time (t 2 = t 0 + 315 s and t 1 = t 0 ). In between, PEGSNet reconstructs the STF by predicting M w (t 2 ) at each time step of 1 s.
PEGSNet Performance in Chile in 2010 4. 1. Overall Performance PEGSNet estimates the latitude ϕ and longitude λ of synthetic earthquakes, with errors on the order of 0. 5° [55 km] for latitude and 0. 2° [22 km] for longitude, after 120 s (see Figure  S2  in Supporting Information S1). These results should not be over-interpreted since we implicitly provide the P-wave arrival times to PEGSNet by setting waveforms to 0 after the P arrival, making the location problem relatively trivial. We therefore mainly focus our analysis on the magnitude estimation. We simulate a real-time scenario on each sample of the test set, by analyzing the data with a running time window of 315 s. Each window is fed to PEGSNet which estimates M w (t), the magnitude at the time of the last sample of the time window.
Performance on M w 8. 8 Earthquakes Testing the model with real earthquakes requires data recorded by the same stations used to train the model, or at least the majority of them. The stations available in 2010 were not the same as in posterior years because of the 21 stations that we used to train the model, 12 belonged to a temporary network (XH) that operated until August 2010. Therefore, we test PEGSNet's performance on M w 8. 8 synthetic earthquakes distributed everywhere along the Chilean subduction fault. Figure  5a  shows the probability density of the magnitude estimation on the test set for all the predictions of events with final magnitude M w = 8. 8 ± 0. 5. Following the red solid line, which is the mode of the predictions, we see a clear underestimation of the magnitude before 100 s (when the true M w is generally below 8.
7 in our STF database) followed by a sudden jump after which the model starts tracking the evolution of the magnitude. This indicates that PEGSNet does not detect PEGS when the earthquake magnitude is below 8. 7 and that estimations below that magnitude threshold should be interpreted as an absence of detected signal. Above this value, estimations start to be reliable, indicating the ongoing occurrence of a very large (M w ≥ 8. 7), likely tsunamigenic, earthquake.
Playback of the Maule Earthquake In order to validate the performance of PEGSNet, we use the actual Maule earthquake recordings. The processing of the raw data is the same as the one described in the Data section. We feed the model with the processed signals. The model outputs magnitude and location estimations every second starting at the origin time of the earthquake and using the previous 315 s of data, as described in the PEGSNet architecture section. Regarding the location estimations, we get mean errors of 0. 33° [36 km] for latitudes and 0. 28° [30 km] for longitudes (Figure  S3  in Supporting Information S1). With respect to the magnitude estimations, we compare the results to the STF extracted from the SCARDEC database (Vallée & Douet, 2016) (Figure  6 ). We observe a clear underestimation The results on the synthetic test set for the location, ϕ and λ, with the 2021 network are displayed in Supporting Information S1 (Figure  S5 ).