dataesr/scientific-paragraphs-categorization huggingface dataset:
The CO 2 gas samples were then analysed by isotope mass spectrometry (Optima) in comparison with a calibrated reference gas to determine the isotopic ratio  18  O/  16  O of the sample. For all stable oxygen isotope measurements a working standard (Burgbrohl CO 2 gas) was used, which was calibrated against the Vienna Pee Dee Belemnite (V-PDB) standard by using the NBS 19 standard. Analytical standard deviation is about 0. 05‰ (±1σ). The chronology of the core was established by tuning the δ 18 O benthic foraminifera signal to the reference LR04 stack  36  with the AnalySeries software  37  and yielded a correlation coefficient of R = 0. 8 for the past 2. 14 Myr. The core is about 36 m long and the sedimentation rate has a mean value of 2 cm per kyr (σ = 0. 91) and is relatively constant. SSTs reconstruction.
About 300 specimens were counted in each level after splitting with an Otto microsplitter. Relative abundances of species were used to perform quantification of SST after an ecological transfer function  43  developed at EPOC. The method used here is based on the modern analogue techniques  44  running under the R software, using the ReconstMAT script developed by J. Guiot (BIOINDIC package, https://www. eccorev. fr/spip. php?article389). The modern database used is composed of 367 core tops and derived from core tops covering the southern Indian Ocean  45  in the MARGO project. Calculations of past hydrological parameters rely on a weighted average of SST values from the best five modern analogues, with a maximum weight given to the closest analogue in terms of statistical distance (that is, dissimilarity minimum)  43, 46.
Letter reSeArCH Extended Data Fig. 5  | Statistical analyses for the ln(Fe/Ca) XRF record and PC1 SST record. a, Spectral power for ln(Fe/Ca) by wavelet analysis realized with a previously published MatLab package  134. The thick contour designates the 5% significance level against red noise. Dashed black lines indicate the variability at the precession, obliquity and eccentricity periods. b, Spectral analysis of ln(Fe/Ca) with REDFIT  135. The red line shows the false-alarm level at the 95% confidence interval. Spectral peaks exceeding the false-alarm level can be considered significant  135. c, Blackman-Tukey cross correlation between ln(Fe/Ca) XRF and eccentricity-tilt-precession (ETP) realized with the Analyseries software  37  for the past 2. 14 Myr. ETP is constructed by normalizing and stacking eccentricity, tilt (obliquity) and negative precession to evaluate coherence and phase (timing) relative to orbital extremes  136.
d, Comparison between the precessional component of the ln(Fe/Ca) record (Gaussian filter frequency 1/23,000; bandwidth: 5 ×10 -6 ) obtained with the Analyseries software  37  and the precession index. Maxima of the ln(Fe/Ca) precession component are in phase with precession index maxima. The precession cycles in the ln(Fe/Ca) record appear particularly strong between about 0. 9 and 0. 6 Ma. e-g, The same statistical analyses as in a-c, respectively, but for the PC1 SST record. In e, dashed white lines indicate the variability at the precession, obliquity and eccentricity periods. The three statistical analyses indicate significant variability at the 100-and 41-kyr periods but not significant power for the 400-kyr and 23-kyr (precession) periods.
Letter reSeArCH Extended Data Fig. 7  | Foraminifera transfer function used for core MD96-2048. a, Location of the modern database, composed of 367 core tops from the south Indian Ocean 45 with present-day SST from the World Ocean Atlas (WOA) 2009  29. b, Test for the modern database  45  yielding to a precision of 0. 8 °C for the annual SST reconstructions. Modern hydrological parameters were obtained from the WOA (1998) database using a previously developed tool (http://www. geo. uni-bremen. de/ geomod/Sonst/Staff/csn/woasample. html).
Acknowledgements T. C. is supported by  CNRS-INSU. Funding from  LEFE-IMAGO CNRS INSU  project SeaSalt is acknowledged. T. C. was partly supported by the  'Laboratoire d'Excellence '  LabexMER  ( ANR-10-LABX-19 ) and co-funded by a grant from the  French government  under the  program 'Investissements d'Avenir' , and by a grant from the  Regional Council of Brittany  (SAD programme). J. A. C. acknowledges funding from the  ERC  project 'STEEPClim'. E. S. and L. D. acknowledge funding through the  DFG Research Center/ Cluster of Excellence  'The Ocean in the Earth System' at  MARUM -Center for Environmental Sciences. A. S. acknowledges funding through the  LaScArBx , a programme supported by the  Agence Nationale de la Recherche  ( ANR-10-LABX-52 ). C. G. -C. was supported by  CREST  (grant number  JPMJCR12A3 ; P.
I. SLS) funded by the  Japan Science and Technology (JST). Core MD96-2048 was collected during the MOZAPHARE cruise of the  RV Marion Dufresne , supported by the  French agencies Ministère de l'Education Nationale de la Recherche et de la Technologie ,  Centre National de la Recherche Scientifique (CNRS)  and  Institut Paul Emile Victor (IPEV). Reviewer information Nature  thanks  C. O'Brien ,  M. Petraglia ,  K. Uno  and the other anonymous reviewer(s) for their contribution to the peer review of this work.
Code availability. The iLOVECLIM source code is based on the LOVECLIM model version 1. 2, for which code is accessible at http://www. elic. ucl. ac. be/modx/ elic/index. php?id=289. The developments of the iLOVECLIM source code are hosted at http://forge. ipsl. jussieu. fr/ludus, but are not publicly available owing to copyright restrictions. Access can be granted on demand by request to D. M. R. (didier. roche@lsce. ipsl. fr) to those who conduct research in collaboration with the iLOVECLIM users group. Data availability. The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request. Source Data for Fig. 2  is provided with the paper.
ugtm is a Python package that implements generative topographic mapping (GTM), a dimensionality reduction algorithm by Bishop, Svensén and Williams. Because of its probabilistic framework, GTM can also be used to build classification and regression models, and is an attractive alternative to t-distributed neighbour embedding (t-SNE) or other non-linear dimensionality reduction methods. The package is compatible with scikit-learn, and includes a GTM transformer (eGTM), a GTM classifier (eGTC) and a GTM regressor (eGTR). The input and output of these functions are numpy arrays. The package implements supplementary functions for GTM visualization and kernel GTM (kGTM). The code is under MIT license and available on GitHub (https://github. com/hagax8/ugtm). For installation instructions and documentation, cf.
Introduction ugtm (v2. 0) is a package for multidimensional space analysis based on the generative topographic mapping (GTM). A complete documentation with API reference and tutorials is available online (https://ugtm. readthedocs. io). GTM is a non-linear manifold-based dimensionality reduction method introduced by Bishop et al  [1]. The ugtm package contains an implementation of GTM, and also kernel GTM (kGTM), the kernel version of the algorithm introduced by Olier et al  [2]. GTM maps are similar to self-organizing maps  [3]  but provide a probabilistic framework that can be used to "color" the map and generate class maps or landscapes. These colored maps can then be used to build regression and classification models. GTM regression (GTR)  [4]  and GTM classification (GTC)  [5]  algorithms are implemented in ugtm.
Considering that scikit-learn  [6]  is now widely used for machine learning tasks, ugtm provides scikitlearn-compatible classes for data transformation (the eGTM transformer), classification (eGTC classifier), and regression (eGTR regressor). Other implementations of the core algorithm of GTM are available online. The netlab package  [7]  implemented in Matlab was the first implementation with published source code. GTMapTool, a software written in Free Pascal, is available as a web application on the website of the Laboratoire de Chémoinformatique in Strasbourg (http://infochim. u-strasbg. fr/mobyle-cgi/ portal. py#forms::gtmaptool). ugtm provides a Python implementation of the core GTM algorithm similar to both netlab and GTMapTool, and also includes predictive modelling frameworks for classification and regression compatible with scikit-learn.
Implementation and architecture (1) Architecture ugtm v2. 0 is a package implemented in pure Python. The API reference is accessible online (https://ugtm. readthedocs. io/en/latest/api. html). The main modules and their relationships are described in Figure  1. The eGTM, eGTC and eGTR classes implemented in ugtm_sklearn inherit from scikit-learn classes TransformerMixin (eGTM), ClassifierMixin (eGTC), and RegressorMixin (eGTR). (.
2) Installation The ugtm package can be downloaded from PyPI using pip, by typing "pip install ugtm" in a terminal. In the Python console, the package can be imported by typing "import ugtm". (3) eGTM: GTM algorithm The basic GTM dimensionality reduction is implemented into the scikit-learn-compatible eGTM class. The eGTM. fit() function fits a GTM model to a data matrix (a numpy array). The eGTM. transform() function uses the fitted model to generate a 2D projection for new data (also a numpy array): The four GTM hyperparameters (regul, k, m, and s) can be tuned: k is used for tuning the GTM resolution (a GTM map is discretized into a grid of [k, k] nodes), m is the number of RBF functions (defining an [m, m] grid), s is the RBF function width factor, and regul is the regularization coefficient.
(4) eGTC and eGTR: classification and regression using GTM The eGTC and eGTR classes implement GTM-based classification and regression algorithms. eGTC and eGTR algorithms are based on class maps and landscapes, which are different ways of coloring a GTM. GTM class maps are constructed using discrete labels and GTM landscapes using continuous labels. New data can be projected onto these colored maps to predict labels. A GTM landscape for the S curve dataset is shown in Figure  2 , and a GTM class map for the UCI handwritten digits dataset  [8]  in Figure  3 , with other data projections using t-distributed stochastic neighbor embedding (t-SNE)  [9] , multidimensional scaling (MDS)  [10]  and locally linear embedding (LLE)  [11]. The visualizations were produced using ugtm, scikit-learn  [6]  and altair  [12].
1. scikit-learn  [6] , a machine learning library that also provides data preprocessing and statistical evaluation functions. 2. numpy and scipy  [13] [14] [15] , the main scientific packages in Python, used here for linear algebra operations and statistics. 3. matplotlib  [16] , used to construct plots. 4. mpld3 (http://mpld3. github. io/), which bridges matplotlib and the javascript library D3. js  [17]  to generate interactive web visualizations.
Quality control Several examples are provided in the online documentation (https://ugtm. readthedocs. io). Unit tests were conducted using the unittest Python package. (3) Reuse potential Support for ugtm is available on GitHub (https://github. com/hagax8/ugtm) -users can post issues through the GitHub platform (https://github. com/hagax8/ugtm/ issues) or contribute directly to the code. The eGTM (data transformation), eGTC (classification) and eGTR (regression) classes implemented in ugtm are fully compatible with scikit-learn and can be used in scikit-learn pipelines for visualization, regression or classification. GTM hyperparameters can be optimized using scikit-learn grid search for regression and classification tasks -examples are provided in the online documentation (https://ugtm. readthedocs.
io). Now that we have access to very large amounts of data, dimensionality reduction methods are becoming more and more popular. It is often necessary to get an overview of a dataset that exists in a space of hundreds or thousands of dimensions (data features). GTM can be a nice alternative to other dimensionality reduction algorithms such as t-SNE, MDS or LLE. It also provides a probabilistic framework that can be used to obtain a comprehensive overview of a dataset. For example, GTM can be useful to visualize and cluster multidimensional data for health research, and investigate very large datasets in chemistry or in genomics -single cell data, genotypes, endophenotypes, or polygenic risk scores. At the moment, t-SNE is very popular for these purposes but presents a major drawback: new data cannot be easily projected onto a pre-trained t-SNE map.
Python >= 2. 7 (tested on Python 3. 4. 6 and Python 2. 7. 14). The amount of required active memory depends on the input data and on the map size (hyperparameters k and m). Dependencies scikit-learn >= 0. 20 numpy >= 1. 13. 1 matplotlib >= 2. 0. 2 scipy >= 0. 19. 1 mpld3 >= 0. 3 List of contributors Héléna A. Gaspar Software location Archive Name: ugtm v2. 0. 0 Persistent identifier: https://doi. org/10. 5281/ The test scripts are zenodo. 1489295 available on GitHub (https://github. com/hagax8/ugtm/ Licence: MIT tree/master/tests). The main test scripts are the core GTM Publisher: Héléna A. Gaspar test (test_ugtm_gtm. py), the workflow test (test_ugtm_ Version published: 2. 0. 0 workflow. py), and scikit-learn compatibility tests (test_ Date published: 15/11/2018 ugtm_sklearn. py): Code repository 1.
Core GTM algorithm (test_ugtm_gtm. py): the core Name: GitHub GTM test checks matrix dimensions, convergence Identifier: https://github. com/hagax8/ugtm of the log likelihood function, and the projection Licence: MIT of new data on the map. If the training set and test Date published: 15/11/2018 set are the same, responsibilities of the training and test sets should also be the same. 2. Scikit-learn-compatible classes (test_ugtm_sklearn. py): these tests check the output dimensions of the eGTM transformer, eGTC classifier and eGTR regres- sor. It also checks for correct projection of new data on the GTM map. 3. Workflow test (test_ugtm_workflow. py): the work- flow test script was designed to test all possible workflows, for label-free data, categorical labels, and continuous labels. Supplementary tests were implemented for plots (test_ugtm_plot.
2 and 4. 4; In the map, sampled countries are colored by continent, and sample sizes are indicated. In the temporal phylogeny, branches are colored to match the most likely geographic location inferred using BASTA. MDR clusters identified in the dataset are highlighted with black background shading. A large black asterisk highlights the branch leading to the DS6 Quebec clade that was used to assess robustness of dating analyses, whereas yellow dots indicate independent introductions of the KZN ancestor to South Africa and South America (see main text for details). L4. 2 consists of a Vietnamese cluster nested within the otherwise strictly European sublineage, whereas an early branching event separates L4. 4 into two clades, one exclusively detected in Vietnam and the other global in its distribution.
Local adaptation and AMR For clonal, nonrecombining organisms such as M. tb, the identification of homoplasic mutations is a powerful way to identify targets of selection  (24). We identified a total of 733 mutations that had emerged more than once in the L4 dataset. As expected, the top-scoring genes included a number of known AMR genes (dataset S2). We also identified a handful of promoter and nonsynonymous gene mutations (codons 3 and 253) in the lactate dehydrogenase gene lldD2 that had evolved independently > 100 times. A recent study demonstrated that lldD2 is important for M. tb replication within human macrophages by enabling the bacillus to use lactate as a carbon source  (25). A screen for positive selection in a smaller dataset covering M. tb lineages 1 to 6  (26)  found that the codon 3 mutation had emerged independently in lineages 1, 2, and 4, whereas the codon 253 mutation had emerged repeatedly in L4 and was present in all but a single L2 isolate.
In L4, we find that lldD2 mutations started emerging well before the age of antibiotics (fig. S9 ) and have emerged across all continents (dataset S3), suggesting parallel local adaptation, most likely to broad changes in host ecology. Last, we assessed the transmissibility of clades with and without lldD2 mutations, both in terms of number of descendants per node age and in terms of transmission across country borders (see supplementary text). These analyses suggested that there were indeed differences between the groups and that strains harboring lldD2 promoter mutations carry a significant benefit in terms of transmissibility. The most serious challenge to TB control efforts is the rise of AMR, which is threatening to reverse the moderate decrease in TB burden obtained over the last decade  (27).
In line with an earlier global study of AMR in M. tb  (28) , we find that MDR-TB has emerged repeatedly and independently across geographic regions (Fig. 1 ). When extracting the geographic location of isolates descending from resistance nodes (i. e. , inherited resistance), we did not identify a single instance of a resistant strain crossing country borders. To understand the underlying cause of this observation, we first investigated whether this reflected a decrease in transmission fitness of resistant strains (see Materials and Methods). This analysis did not indicate any decrease in the transmissibility of resistant strains relative to their susceptible counterparts (Fig. 4 , bottom). We thus hypothesized that the failure of resistant strains to cross country borders in our global dataset might simply reflect the young age of these strains.
Cross-country and cross-continental migration events as a function of node age and the predicted phenotypic resistance of the strain occupying the node were thus quantified. From Fig. 4  (middle), it is clear that cross-border migration was exceedingly rare among descendants of nodes young enough to be resistance nodes, irrespective of susceptibility profile. Only a single node emerging within the age of antibiotics (post 1945) was found to have descendants that had crossed country borders in our dataset. We thus conclude that the young age of resistance nodes, rather than decreased transmission fitness, explains the lack of observed migration of these strains.
Sequencing libraries were prepared as described previously  (39)  and sequenced on an Illumina platform. Inclusion criteria for individual genomes were as follows: (i) The genome was annotated with a minimum of metadata (sampling year and country of origin), or this information could be obtained from the published articles or by correspondence with personnel involved in the sequencing efforts. (ii) The genome had to be L4, as verified by the program TB profiler  (40). Genomes that were determined to be of mixed origin were also excluded. (iii) If a genome was determined to be a duplicate of an already included isolate, then it was not included. (iv) All of the following quality control criteria had to be met: (iv-a) When mapping reads against a H37Rv reference genome, a minimum genome coverage of 90% had to be reached.
(iv-b) The average read depth across the reference had to exceed 20. We allowed sequence data from different Illumina platforms and with different read lengths. A total of 1669 genomes passed all inclusion criteria (dataset S1). Samples from Argentina and from a study of an Inuit community in Quebec, Canada  (31)  were mainly from outbreaks and thus harbored limited within-population diversity. To control for the effect of densely sampled genomes on certain analyses, we additionally created a down-sampled genome collection, where we allowed only five isolates from each of the Argentinian outbreaks (M and Ra) and 10 from the outbreak in Quebec. These genomes were randomly sampled from the full collection by a random number generator. In total, the down-sampled isolate contained 1207 isolates, including the H37Rv reference and an L3 outgroup isolate.
Variant calling The snippy pipeline v3. 1 (https://github. com/tseemann/snippy) was used for variant calling. Briefly, this entailed mapping reads against H37Rv with the BWA mem algorithm (v. 0. 7. 15-r1110) and marking split hits as secondary and then calling variants with SAMtools v1. 3 and including only reads with a mapping quality of 60 or higher. Variants were then filtered further using FreeBayes (v1. 0. 2) with a ploidy of 1 and options to exclude (i) alleles if a supporting base quality is less than 20 or the coverage less than 10, (ii) alignments if the mapping quality is less than 60, and (iii) alleles if the fraction of reads in support of a SNP is not at least 90%. The binomial priors about observation expectations were turned off. The program snpEff v4. 1l was then used to annotate SNPs, turning off downstream, upstream, intergenic, and 5′ untranslated region (5′UTR) and 3′UTR changes.
For individual 68, genotype 1 was deduced by alleles found between 55 and 65% and genotype 2 by alleles found between 35 and 45%. Variants at frequencies of ≥95% were considered fixed between the mixed infecting strains. Variants segregating at other frequencies were treated as ambiguous/ missing data. For individual 92, we also found evidence indicative of a mixed infection; however, we only felt confident with the most called genotype, which comprised >90% of reads. All variants at ≥95% were called. All other sequencing runs from the project were of low coverage and excluded from the analyses. We then used an in-house python script (available at https:// github. com/admiralenola/globall4scripts) to exclude, from the alignment, SNPs matching any of the following criteria: (i) located in a known repetitive region (e.
Initial phylogenetic analysis The program ModelFinder  (42)  as implemented in IQ-TREE was used to infer the optimal substitution model for our genome alignment. A maximum-likelihood phylogenetic tree was then built using the program IQ-TREE v1. 4. 3  (43) , applying the generalized timereversible (GTR) model with four gamma categories for rate variation, ascertainment bias on, and 1000 ultrafast bootstrap replicates  (44). The L3 isolate SRR1188186 (Quebec, Canada) was used as an outgroup.
Population genomic inferences Gene-wise estimates of nucleotide diversity (), Watterson's theta (), and Tajima's D were computed for each gene by parsing the wholegenome alignment into genes using EMBOSS  (48)  and using the python package EggLib (50) on individual gene alignments. F st values were also calculated using EggLib, specifying groups by (i) country and (ii) sublineage as identified by the TB profiler. Within each country, we calculated genomic pairwise Hamming distances using the program snp-dists (https://github. com/tseemann/ snp-dists). For each gene, we additionally calculated the number of homoplasies and number of homoplasic sites using a Fitch downpass algorithm, as implemented in Dendropy  (51). Gene-wise parsimony scores were calculated by identifying homoplasic mutations in each gene and summing the Fitch parsimony scores (i.
None of the randomized runs had rate estimates overlapping with the inference using real sampling dates (fig. S3 ), supporting the robustness of the original inference. We then ran a larger dataset (1207 genomes, after retaining a maximum of five representatives from each of three densely sampled outbreaks from Argentina and 10 from Quebec, Canada) in BEAST v1. 8. 4  (56)  with a fixed substitution rate as estimated above. The MRCA of this tree was inferred to have existed in the year 1157 (HPD intervals not reported due to our application of a fixed rate in this analysis). The overall accuracy of the dating inferences in BEAST was further supported by independent analyses applying Least Squares Dating (LSD) v0. 3  (57) , resulting in an estimated time to MRCA in 1195 CE (95% HPD, 1061 to 1270) for the 1207 genome dataset.