dataesr/scientific-paragraphs-categorization huggingface dataset:
• On the other hand we show the performances of a computation code that we have written in Matlab, based on this method, on an industrial test case. In particular, we provide the user with the results obtained for the workshop ISAE EM 2016, where the electromagnetic scattering of a complex object, consisting both of a perfect electric conductor and dielectric regions, has to be computed. This paper is organized as follows. Section 1 is devoted to the classical integral equation BEM framework for electromagnetic scattering and the coupling with a volumic finite element discretization for the dielectric materials. Section 2 explains the fundamentals of the SCSD, and eventually Section 3 provides the reader with the results on classical numerical tests for validation together with the test case coming from the workshop ISAE EM 2016.
To properly discretize the equations, the electric current J is represented using (div-conforming) Rao-Wilton-Glisson finite elements while the electric field E tr is represented by using (rot-conforming) Nédélec edge finite elements on tetrahedra. The coupled system (27,28) in the two unknowns J and E tr is solved iteratively using a Schur complement approach. The main unknown J is used as the iterate and the field E tr is computed exactly at each iteration using Matlab's mldivide function (backslash), which amounts to solve the underlying system by a LU factorization. The iterative solver is a Multi Generalized Conjugate Residual (MGCR) algorithm  [17, 18] , allowing for simultaneous resolution of all incidences and polarisations for a given frequency. The algorithm is not restarted during convergence.
Numerical results In this section, a number of numerical examples are presented in order to validate and demonstrate the performance of the proposed method for solving electromagnetic scattering problems for obstacles composed both of PEC and dielectric materials. The software used for the numerical computations is a Matlab code referred to as MyBEM. It includes a full BEM and FEM code with suitable finite elements for electromagnetic scattering (Raviart-Thomas and Nédélec finite elements) and an implementation of the SCSD method.
ISAE workshop test case We now give a description of the results obtained on the test case number 3 of the workshop ISAE 2016, entitled RCS and radar imaging for an UAV-like with two RAM regions. The test case consists in computing the electromagnetic scattering of an UAV-like object. The UAV is assumed to be a perfect electric conductor (PEC) except in two regions, the nose and a slot, which are filled with an absorbing material with relative permittivity r = 1. 5 + 0. 1i and relative permeability µ r = 2. 5 + 1. 8i. The geometry of the object is rather complicated and contains many small details, making the test case both interesting and challenging. The surface mesh was provided by J. Simon from Onera. The two volume regions were constructed from this surface mesh, using the software GMSH  [13].
58 GHz up to 4GHz) which are more memory consuming. Some performance information on the resolution of the electromagnetic scattering by the UAV are given in Table  2. The performance data depends on the frequency considered and the machine used, hence justifying the fact that we only provide ranges. The runs on the first machine are slightly faster, albeit the slower clock rate, than the runs on the second one. This is likely explained by the different Matlab version. We finally note that if these computations had been done sequentially on these two machines, we arrive at a total computing time of around 24 days for the whole test case. the problem with two unknowns, the electric current on the surface of the scatterer and the electric field inside the dielectric material, coupled in two equations discretised respectively via the boundary element method and the volumic finite element method.
Earlier we created a chemical hazard database via natural language processing of dossiers submitted to the European Chemical Agency with approximately 10 000 chemicals. We identified repeat OECD guideline tests to establish reproducibility of acute oral and dermal toxicity, eye and skin irritation, mutagenicity and skin sensitization. Based on 350-700þ chemicals each, the probability that an OECD guideline animal test would output the same result in a repeat test was 78%-96% (sensitivity 50%-87%). An expanded database with more than 866 000 chemical properties/hazards was used as training data and to model health hazards and chemical properties. The constructed models automate and extend the read-across method of chemical classification. The novel models called RASARs (read-across structure activity relationship) use binary fingerprints and Jaccard distance to define chemical similarity.
, 2016) , but the utility of the approach is limited by data access and the unknown uncertainty of these predictions. A large machine-readable database of toxicological information makes automation of read-across approaches viable by allowing computational modeling of chemicals and chemical analogs. Machine readable databases of chemical testing also allow assessment of the quality of testing data by analysis of repeatedly tested substances  (Hartung, 2016a). Knowledge of testing data reliability also provides a baseline against which to compare computational models. A major advance of the European chemicals legislation is, that key information of registrations on tens of thousands of chemicals are made public, though not in a standardized manner to allow computation. Previously, we used natural language pattern matching to make the public information from the REACH registration process machine-readable  (Luechtefeld et al.
, 2016a). Interestingly, many chemicals have been tested more than once, some shockingly often: For example, one of the oftenchallenged animal tests is the Draize rabbit eye test, where for more than 70 years now, test chemicals are administered into rabbit eyes. Two chemicals were tested more than 90 times, 69 chemicals were tested more than 45 times, shows the database  (Luechtefeld et al. , 2016c). This excessive and redundant animal testing facilitated an assessment of the reproducibility of OECD guideline tests, based on hundreds of chemicals for each endpoint, presented here in a comprehensive manner for the first time. Notably, the 9 most frequently done animal tests analyzed here consumed 57% of all animals for toxicological safety testing in Europe 2011 (http://ec. europa. eu/environment/chemicals/lab_ animals/reports_en.
Success in modeling chemical hazards in earlier work prompted 2 developments to support a Toxicology for the 21st century  (Hartung, 2009). First, the demonstration of the predictive power of big data led us to focus on generating larger databases. Our data integration pipeline pulls chemical property data from PubChem, ECHA, and an NTP-curated acute oral toxicity dataset. The combined data continues to grow but at present contains 833 844 chemical property values used for modeling across 80, 908 chemicals for an average of approximately 10 properties per chemical. Second, a simple method of automating read-across was created to model chemical properties. Tentatively named read-across structure activity relationships-RASAR was created and presented here for the first time. RASAR combines conventional chemical similarity with supervised learning.
Chemical similarity is done by generating a binary fingerprint for each chemical and using Jaccard distance (similarity ¼ 1-distance) on fingerprints. Supervised learning methods then provide a statistical model of the insights deliverable from chemical similarity. Due to automation, the approach can be applied to large datasets and thus validated according to common statistical methods such as cross-validation. Supervised learning models built on chemical similarity also allow assignment of confidence to individual predictions. Similar approaches using the large datasets from robotized testing within ToxCast have been recently reported  (Shah et al. , 2016; Zhu et al. , 2016). We demonstrate a "simple" RASAR which trains a logistic regression model to predict chemical hazards from the similarity to the closest chemical tested negative (maxNeg) and similarity to the closest chemical which has tested positive (maxPos).
Pairwise Evaluation of OECD Guideline Test Reproducibility The generation of the machine-readable REACH registration database has been described earlier  (Luechtefeld et al. , 2016a)  using language pattern matching, database and web manipulation packages (mongodb, htmlunit and beautifulsoup). It contains data for 9801 unique substances, 3609 unique study descriptions and 816 048 study documents. To evaluate guideline study repeatability, results must be assigned to each study. Every OECD guideline dossier reports a "submitters_conclusions" field, from which a text result was mapped to a controlled term for each related test. To evaluate repeatability each test result was mapped to either "positive" or "negative" and potencies were ignored. The reproducibility evaluations used all chemicals with multiple results for each of the listed guidelines.
RASAR Database A database was created combining the REACH database from prior work with PubChem and an NTP-curated acute oral toxicity dataset. The portion of the database used in this publication contains 80 908 chemicals with sometimes missing information on 74 properties resulting in 833 844 chemical labels. • European Chemical Agency Classification and Labeling: UN GHS hazards derived from submissions to the REACH chemical regulatory program. ECHA prohibits the re-publication of these data but has made registration data available for download (https:// iuclid6. echa. europa. eu/reach-study-results; last accessed June 30, 2018). In agreement with ECHA, the database is available from the authors for collaborative projects. • PubChem: UN GHS hazards derived from HSDB, ECHA C&L, and other sources.
Noteworthy, at the time of this writing, PubChem only reports positive hazard results, thus adding a skew towards positive results to this data. Some balancing of the dataset for training was therefore necessary and is described in the implementation section. A Supplementary Material is available that describes each of the hazard labels used in this work. The labels used include the UN GHS health hazards H300-H399, the UN GHS chemical properties H200-H300, and an NTP label for acute oral toxicity. The labels also include simple functions of the aforementioned labels termed here "dependency labels". Dependency labels capture well-defined relationships between UN GHS hazards. For example H300-H305 describes different potencies of acute oral toxicity. The dependency label "acute_oral_binary" is true if any H300-H305 is true and answers the question "is this chemical an acute oral hazard or not?" Currently discordance in a chemical label is handled by selecting the most hazardous value (aka the precautionary principle).
Unsupervised Step In the unsupervised learning step distances between all chemicals in the modeled database are built. Currently we do this exhaustively by comparing every chemical to every other chemical (an O[n 2 ] operation), but it can be improved using locality sensitive hashing methods. After building chemical similarities a local graph can be constructed for each modeled compound. This local graph describes distances to each of the chemicals surrounding the compound of interest. Finally, the unsupervised step applies an aggregation function on the local graph to generate a feature vector. K-nearest neighbors (KNNs) can be treated as an aggregation function on local networks. KNN creates an n-dimensional vector with a count of the number of times each of n labels occurs in the k closest neighbors.
RASAR Implementation Details-Spark Pipeline The RASAR algorithms are constructed with Apache Spark (https://spark. apache. org/docs/latest/index. html), an opensource cluster-computing framework, originally developed at the University of California, Berkeley's AMPLab, the Spark codebase was later donated to the Apache Software Foundation. The entire training process takes place on an Amazon EC2 cluster, which is primarily necessary for the construction of the large adjacency matrix in the unsupervised step of both RASAR methods. The endpoints evaluated here include 9 binary hazards: acute oral binary, acute dermal binary, acute inhalation binary, acute aquatic binary, skin sensitization binary, skin corrosion binary, eye irritation binary and mutagenic binary, all of which we consider "dependency labels", because they are dependent on simple functions of other labels (ie, acute oral binary is true whenever any UN GHS hazard for acute oral toxicity is true).
The other trained models are enumerated in the Supplementary Table  1. In the unsupervised step, the Spark pipeline builds descriptive feature vectors. This is the most computationally expensive part of the process and is done across a computing cluster using a custom built spark "User Defined Aggregation Function". In the final step of the RASAR algorithm, unsupervised features are used to build supervised learning models for 51 of the 74 labels. This means that the RASAR algorithm is the composition of one unsupervised step and 51 supervised steps. The supervised step consists of data sampling and model training.
Data Sampling Both RASAR algorithms perform oversampling and undersampling. Many of the tracked UN GHS hazards have an imbalanced ratio of positives and negatives. The sampling method oversamples the low-prevalence class up to 5Â and undersamples the high-prevalence class down to one-third. This means that a hazard with 100 positives and 1000 negatives will have positives resampled up to 500 and negatives randomly removed down to 500. Balanced datasets are important for many learning algorithms, particularly in the absence of very large datasets. Care is taken to perform resampling within the cross-validation circuit to prevent model evaluation on chemicals used in model training.
Model Training The Simple RASAR (2 aggregation features) uses a different supervised learning model than the Data Fusion RASAR (222 features) due to differences in the feature vectors. The Simple RASAR uses the spark. ml Logistic Regression model with a maximum of 300 000 iterations of training, a tolerance for convergence of 1E-12 and a regularization parameter of 1E-4. The Data Fusion RASAR uses the spark. ml. RandomForest model with 20 trees and 10 minimum instances per leaf node and otherwise default features.
Visualization of Chemical Universe The most demanding step of model training is the evaluation of chemical similarity pairs. To visualize this process on large datasets a proprietary force layout algorithm was built at ToxTrack LLC. We applied this algorithm to an adjacency matrix built from approximately 10 million compounds in PubChem (50 trillion comparisons). In this process, a "cross-join" is performed on a Spark computing cluster to compare all chemicals with each other. Currently this is an O(n 2 ) operation (n ¼ number of compounds). Similarities <70% are dropped. A similarity is calculated by the number of PubChem 2D features shared by 2 chemicals divided by the total number of PubChem 2D features in both compounds (Tanimoto or Jaccard similarity). The RASAR database contains 81 089 chemicals with label data, which alone require 3.
3E9 choose-2-comparisons. The millions of structures in PubChem require approximately 10 14 comparisons. This was done on a large computing cluster on the Amazon cloud. Specifically, the task of similarity calculation was divided into many parts across 20þ spot instances running Apache Spark with Yarn resource manager, the method for setting up this cluster is described by Berkeley Amplab at https:// github. com/amplab/spark-ec2, last accessed June 30, 2018. Once this large adjacency matrix has been calculated, visualization of the chemical space remains a challenge. ToxTrack LLC's proprietary graphical layout algorithm applies the force layout algorithm on massive datasets and generates the visualizations shown here (Figure  2 ).
Overview Three main results are presented herein. Due to the number and complexity of the workflow, Figure  3  provides an overview of these 3 results presented in Tables 2-4. The first workflow "A. OECD Reproducibility" is an evaluation of the reproducibility of animal tests performed according to OECD guidelines. This evaluation is done by evaluating how well 1 animal test can predict a repeated animal test. The second workflow "B. Simple RASAR Evaluation" evaluates a simple RASAR. This RASAR is built and evaluated on chemical classification and labeling data detailed in the Database section. It is distinguished from a "Data Fusion RASAR" by the simplicity of the aggregation features generated prior to supervised learning. These features capture the similarity to the closest negative and positive analog for the endpoint of interest.
Animal OECD Test Reproducibility The machine-readable REACH database includes many replicate tests  (Luechtefeld et al. , 2016c). All available testing data must be registered by the consortia called Substance Information Exchange Forum, a mandatory requirement to register jointly ("one substance, one registration" principle of REACH), which leads for the first time to the compilation of essentially all available studies. The extent of repeated tests is often surprising. For example, chemicals tested for acute eye irritation guideline 405 are tested on average 2. 91 times. Chemicals tested for acute oral toxicity guideline 401 have on average 3. 56 tests. The medians for both guidelines are 1 indicating a skew due to some chemicals with many repeat tests. The average OECD guideline test is repeated 2.
As reproducibility is substance-dependent (nontoxic and highly toxic substances are more reproducible in their biological effect), modeling of a repeat test was calculated for each chemical, for which multiple OECD guideline tests were available, and then averaged for the study type. Table  2  shows the sensitivities, specificities and respective overall accuracies, based on conditional probabilities if the result is true and asking for the correspondence of the second draw. For each animal test several hundred retested chemicals were available (361-718). Incidences of low sensitivity (eg, TG 402) indicate that a substance tested positive in the first test, would often test negative in the second. The higher specificity is owed to the fact that overall far more nontoxic than toxic substances were found among the retested ones in the ECHA database.
This reflects the general somewhat surprising finding that toxic hazards are less frequent in the database than might be expected, typically below 20% of chemicals for any given health hazard label  (Luechtefeld et al. , 2016a). This is probably due to the selection bias of nontoxic substances for use in products, ie, the mostly high-production volume chemicals registered in 2010 and 2013. These results would be even worse if the reproducibility of potency classes would be included, but as benchmarks are needed here for a tool for hazard identification, all weak, moderate, strong, etc. effects were combined simply as positive outcomes. Noteworthy, the ECHA database includes  potency information (Supplementary Figure  1 ), which has not yet been exploited for analysis of reproducibility or prediction.
Simple RASAR Models Can Estimate Chemical Hazard Visualize similarity. To demonstrate that chemicals tend to create rich adjacency matrices due to complex relationships on the possible structural combinations, we built a force layout diagram from approximately 10 million compounds in PubChem (50 trillion similarities). The visualized graph (built with a proprietary graphical package from ToxTrack LLC) shows large numbers of highly similar chemicals and clustering at multiple zoom levels. The figure zooms into a part of the map, which reflects shared functional groups (Jaccard similarity on PubChem 2D vectors) of minimum 70% by connecting lines and the exact similarity by distance of the substances. Simple rasar feature evaluation. Following the vision toward a read-across-based prediction of hazard and its validation  (Hartung, 2016a) , an expanded database was curated.
The RASAR database contains 80 908 chemicals with hazard labeling data. This database allowed now to establish a probability of hazard based on the proximity (similarity) to toxic substances and similarly a probability of nonhazard based on the proximity to nontoxic ones. The Simple RASAR generates feature vectors for each chemical by recording similarities to the closest positive analog and closest negative analog. Figure  4  is a local graph for 1-DECENE ("target") and shows positive analogs ("positive" and small dots) and negative analogs (in negative). The closest analogs (large nodes) are used to build the Simple RASAR feature vector. Figure  5  demonstrates the value of the similarity to the closest positive (termed maxPos) and similarity to closest negative (maxNeg). In this work maxPos and maxNeg are cubed, which has the effect of emphasizing larger similarities.
Conservative choices lead to very good predictions but for less chemicals. The manual setting of these thresholds (Table  3 , columns 5 and 6) aimed to optimize sensitivity, specificity and coverage and in the current implementation the metrics give a sensitivity of 80þ % with specificities of 50þ % and 65þ % coverage. The database includes between 5 and 15 thousand chemicals with animal test-based classifications (Table  3 , column 4). This allowed now making predictions for each of them in a leaveone-out cross-validation. The achieved accuracies are shown in Table  3 (columns 7  and 8 ). This shows that while choosing 80þ % sensitivity, and maintaining specificities between 51% and 69%, the approach worked for on average 82% of substances (73%-88%). It should be noted that the Simple RASAR approach achieves significantly lower specificities than animal reproducibility shows.
Development of a data fusion RASAR Data fusion integrates multiple data sources to achieve more consistent, accurate, and useful information than the individual datasets. Although the Simple RASAR makes only use of one type of hazard information, the data fusion approach uses all labels of the neighboring chemicals. There were 74 labels considered including the UN GHS labels, NTP acute oral toxicity nontoxic label and dependency labels, which are simple functions of the former. There were 23 features no longer considered due to their extreme label imbalances. A feature vector combining 3 kinds of features (known labels for the chemical in question, Jaccard similarities to the closest positive and negative analog) for every label is created to combine different kinds of hazard data. The RASAR algorithm builds feature vectors for every compound in the unsupervised step and then fits the resulting vectors with Random Forest models for 51 chemical hazard/ property labels.
Results are shown here for 9 binary (toxic vs. nontoxic) hazards: acute oral toxicity, acute dermal toxicity, acute inhalation toxicity, acute-and chronic-aquatic toxicity, skin sensitization, skin corrosion, eye irritation and mutagenicity. Model accuracy metrics have been assessed in 5-fold crossvalidation given in Table  4. The evaluation metrics for modeling approaches in Tables  3  and 4  compares well with reproducibility metrics from Table  2. This provides encouraging evidence for the ability of computational models to provide valuable predictions on untested chemicals. There are 2 potential reasons for the strength demonstrated in our Data Fusion RASAR. First, the data fusion approach can handle noise in the data and potential activity cliffs via its integration of information on many analogs across many chemical properties.