dataesr/scientific-paragraphs-categorization huggingface dataset:
Alternatively, a discriminative model can be trained to distinguish source and target examples. In the specific case of preferential sample selection, this means directly estimating the probability of selection P(S = 1) (cf. Equation A4). In general, the shift is not always due to selection: the source data are not necessarily obtained by subsampling the target population. In this case we denote T = 1 if an individual comes from the target data and T = 0 if it comes from the source data. Then, a classifier can be trained to predict from which dataset (source or target) a sample is drawn, and the importance weights obtained from the predicted probabilities (  [73] , Sec. 4. 3): w(x, y) = P (T = 1 | X = x, Y = y) P (T = 0) P (T = 0 | X = x, Y = y) P (T = 1). ( A5 ) The classifier must be calibrated (i.
e. , produce accurate probability estimates, not only a correct decision; see Niculescu-Mizil and Caruana  [79] ). Note that constant factors such as P(T = 0)/P(T = 1) usually do not matter and are easy to estimate if needed. This discriminative approach is effective because the distribution of (T | X = x, Y = y) is much easier to estimate than the dis-tribution of (X, Y | T = t) : T is a single binary variable whereas (X, Y) is high-dimensional and often continuous. The classifier does not need to distinguish source and target examples with high accuracy. In the ideal situation of no dataset shift, the classifier will perform at chance level. On the contrary, a high accuracy means that there is little overlap between the source and target distributions and the model will probably not generalize well.
g. , demographic variables such as age) are lower-dimensional than the full features (e. g. , high-dimensional images), and dataset shift can be corrected with limited information on the target distribution, with importance weights or otherwise. Moreover, even if additional information Z that predicts selection but is independent of (X, Y) is available, it should not be used to compute the importance weights. Indeed, this would only increase the weights' variance without reducing the bias due to the dataset shift (  [21] , Sec. 15. 5).
Tobacco smoking prediction in the UKBiobank We consider predicting the smoking status of participants in the UKBiobank study to illustrate the effect of dataset shift on prediction performance. Smoking is associated with neuropathologies in patients with schizophrenia, mood or anxiety disorders, substance use and other brain related disorders. A total of 6,000 participants are used in a preliminary step to identify the 29 most relevant predictive features (listed in Appendix B. 1), by cross-validating a gradient boosting model and computing permutation feature importances. We then draw 2 samples of 100,000 individuals from the rest of the dataset that have different age distributions. In the young sample, 90% of individuals come from the youngest 20% of the dataset, and the remaining 10% are sampled from the oldest 20% of the dataset.
In the old sample, these proportions are reversed. We then perform 10-fold cross-validation. For each fold, both the training and testing set can be drawn from either the young or the old population, resulting in 4 tasks on which several machine-learning estimators are evaluated. We use this experiment to compare 2 machine-learning models: a simple one-regularized linear support vector classifier, and a flexible one-gradient boosting. For each classifier, 3 strategies are considered to handle the dataset shift: (i) baseline-the generic algorithm without modifications, (ii) importance weighting (Section "Importance weighting: a generic tool against dataset shift"), and (iii) the (unfortunately popular) non-solution: "regressing out the confounder"regressing the predictive features on the age and using the residuals as inputs to the classifier.
The results are similar to those seen with simulated data in Fig. 1. For a given learner and test population, training on a different population degrades the prediction score. For example, if the learner is to be tested on the young population, it performs best when trained on the young population. Gradient boosting vastly outperforms the linear model in all configurations. Regressing out the age always degrades the prediction; it is always worse than the unmodified baseline, whether a dataset shift is present or not. Finally, importance weighting improves the predictions of the over-constrained (misspecified) linear model in the presence of dataset shift but degrades the prediction of the powerful learner used in this experiment. This is due to the fact that the gradient boosting already captures the correct separation for both young and old individuals, and therefore importance weighting does not bring any benefit but only reduces the effective training sample size by increasing the variance of the empirical risk.
Acknowledgments This work was partially funded by the  National Institutes of Health (NIH)   NIH-NIBIB P41 EB019936 (ReproNim) NIH-NIMH R01 MH083320  (CANDIShare) and  NIH   RF1 MH120021  (NIDM), the  National Institute Of Mental Health  under Award Number  R01MH096906  (Neurosynth), the  Canada First Research Excellence Fund , awarded to  McGill University for the Healthy Brains for Healthy Lives initiative  and the  Brain Canada Foundation  with support from  Health Canada, Health Canada , through the  Canada Brain Research Fund  in partnership with the  Montreal Neurological Institute. This work made used of the  Neuro-Hub platform. This work was funded by  Agence Nationale de la Recherche  project  DirtyData  - ANR-17-CE23-0018.
Acknowledgements The Authors acknowledge many useful discussions with Christophe Arnold. The authors thank  Bruno Berini  for atomic force microscope measurements and  Christèle Vilar  for technical support on electron microscopy. This work is supported by funding from the  French Institute of Physics (INP) , and from the  French national research agency (ANR)  under grant agreement No  ANR-14-CE08-0018  ( GoBN: Graphene on Boron Nitride Technology ). This work also received funding from the  European Union 's  Horizon 2020 research and innovation program  under Grant Nos. 785219  ( Graphene Flagship Core 2 ) and 881603 (Graphene Flagship Core 3). K. W. and T. T. acknowledge support from the  Elemental Strategy Initiative  conducted by the  MEXT, Japan , Grant Number  JPMXP0112101001 ,  JSPS KAKENHI  Grant Number  JP20H00354  and the  CREST  ( JPMJCR15F3 ),  JST.
, 2020]. Using eq. (  3 ), we also calculated the magnitude of the vector (& 6 , & 7 , & 8 ) and estimated a paleointensity of 32 ± 15 µT and 34 ± 11 µT (2 s. e. ) for K-T interface 1 and 2, respectively. The uncertainties on the relative paleodirections (Fig. 1g ) and paleointensities were estimated considering the measurement noise (due to time-dependent drifts of the X-ray beam and the varying resolution of the instrument's electron optics) and the counting statistical uncertainties associated with the limited number of islands included in each XPEEM dataset (supplementary text S4c). Two additional sources of uncertainty were also considered. First, the spatial arrangement of single domain islands in the CZ causes magnetostatic interactions  [Blukis et al. , 2020]  that influence the paleointensity and paleodirection.
Acknowledgments, Samples, and Data We thank the  Harvard Museum of Natural History  for the loan of Miles. We thank  C. I. O. Nichols  for helpful discussions. This research used the  Advanced Light Source , a  Department of Energy Office of Science User Facility  (contract  DE-AC02-05CH11231 ). We thank two anonymous reviewers for their valuable comments, and  M. Korte  for the editorial handling. C. M. and B. P. W. thank the  NASA Discovery Program  (contract  NNM16AA09C ), the  NASA   Emerging Worlds program  (grant  NNX15AH72G ) and  T. F. Peterson ,  Jr. for support. C. M. and B. P. W. conceived the project. C. M. , J. F. J. B. and J. S. conducted the XPEEM experiments. R. V. C. assisted with the XPEEM data acquisition. C. M. analyzed the paleomagnetic data and conducted the SEM-EDS measurements.
MalariaGEN is a data-sharing network that enables groups around the world to work together on the genomic epidemiology of malaria. Here we describe a new release of curated genome variation data on 7,000 Plasmodium falciparum samples from MalariaGEN partner studies in 28 malaria-endemic countries. High-quality genotype calls on 3 million single nucleotide polymorphisms (SNPs) and short indels were produced using a standardised analysis pipeline. Copy number variants associated with drug resistance and structural variants that cause failure of rapid diagnostic tests were also analysed. Almost all samples showed genetic evidence of resistance to at least one antimalarial drug, and some samples from Southeast Asia carried markers of resistance to six commonly-used drugs. Genes expressed during the mosquito stage of the parasite life-cycle are prominent among loci that show strong geographic differentiation.
This presented a number of analytical challenges due to long tracts of highly repetitive sequence and hypervariable regions within the P. falciparum genome, and also because a single infection can contain a complex mixture of genotypes. Once a reliable analysis pipeline was in place, a process was established for periodic data releases to partners, with continual improvements in data quality as new analytical methods were developed. Data from the Pf Community Project were initially released through a companion project called Pf3k, whose goal was to bring together leading analysts from multiple institutions to benchmark and standardise methods of variant discovery and genotyping calling. A visual analytics web application was developed  8  for researchers to explore the data. The open dataset was enlarged in 2016 when multiple partner studies contributed to a consortial publication on 3,488 samples from 23 countries  9.
The Pf Community Project data also provide an important resource for developing and testing new analytical and computational methods. A key area of methods development is quantification of within-host diversity  7, [41] [42] [43] [44] [45] [46]  , estimation of inbreeding  7, 47  , and deconvolution of mixed infections into individual strains  48, 49. The data have also been used to develop and test methods for estimating identity by descent  50, 51  , imputation  52  , typing structural variants  53  , designing other SNP genotyping platforms  54  and data visualisation  8, 55. In a companion study we performed whole genome sequencing of experimental genetic crosses of P. falciparum, and this provided a benchmark to test the accuracy of our genotyping methods, and to conduct an in-depth analysis of indels, structural variants and recombination events which are complicated to ascertain in these population genetic samples  56.
For each of these three genes we discovered many different sets of breakpoints (29, 10 and 3 pairs of breakpoints for mdr1, gch1, and plasmepsin 2/3, respectively), including a large and complex structural rearrangement involving a triplicated segment embedded within a duplication, in which the triplicated segment is inverted ("dup-trpinv-dup")  58  that to the best of our knowledge has not been observed before in Plasmodium species (Supplementary Data; Supplementary Note, Supplementary Tables  4 5 6 ). We also used sequence reads coverage to identify large structural variants that appear to delete or disrupt hrp2 (PF3D7_0831800) and hrp3 (PF3D7_1372200), an event that can cause rapid diagnostic tests to malfunction. The population genetic analyses in this paper are based on the filtered dataset of high-quality SNP genotypes in 5,970 samples.
Genetically mixed infections were also common in Bangladesh (41/77 samples have F WS <0. 95), another area of high malaria transmission and the only South Asian country represented in this dataset, but did not reach the extremely high levels of within-host diversity (F WS <0. 2) observed in some samples from Africa. The average nucleotide diversity across the global sample collection was 0. 040% (median=0. 028%), i. e. two randomlyselected samples differ by an average of 4 nucleotide positions per 10kb. Levels of nucleotide diversity vary greatly across the genome  56  and also geographically (Figure  2b ). Distributions of values were highest in Africa, followed by Bangladesh, but the scale of regional differences was relatively modest, ranging from an average of 0. 030% in Eastern Southeast Asia to 0.
040% in West Africa (median=0. 019% and 0. 028% respectively; Figure  2b ). In other words, the nucleotide diversity of each regional parasite population was not much less than that of Table  1. Count of samples in the dataset. Countries are grouped into eight geographic regions based on their geographic and genetic characteristics. For each country, the table reports: the number of distinct sampling locations; the total number of samples sequenced; the number of high-quality samples included in the analysis; and the percentage of samples collected between 2012-2015, the most recent sampling period in the dataset. Eight samples were obtained from travellers returning from an endemic country, but where the precise site of the infection could not be determined. These were reported from Ghana (3 sequenced samples/2 analysis set samples), Kenya (2/1), Uganda (2/1) and Mozambique (1/1).
Geographic patterns of drug resistance Classification of samples based on markers of drug resistance. Antimalarial drug resistance represents a major focus of research for many partner studies within the Pf Community Project, and this dataset therefore contains a significant body of data that have appeared in previous reports on drug resistance. Readers are referred to these publications for more detailed analyses of local patterns of resistance  [9] [10] [11] [12] [13] [14] [16] [17] [18] [19] [20] [21] [22]  and of resistance to specific drugs including chloroquine  16, 21  , sulfadoxine-pyrimethamine  16, 19, 21  and artemisinin combination therapy  [9] [10] [11] [13] [14] [15] 17, 18, 21, 22. Here we have classified all samples into different types of drug resistance based on published genetic markers and current knowledge of the molecular mechanisms (see www.
malariagen. net/resource/26 for details of the heuristic used). Table  2  summarises the frequency of different types of drug resistance in samples from different geographical regions. Overall, we observed higher prevalence of samples classified as resistant in Southeast Asia than anywhere else, with multiple samples resistant to all drugs considered. Note that samples were collected over a relatively long time period (2002-15) during which there were major changes in global patterns of drug resistance, and that the sampling locations represented in a given year depended on which partner studies were operative at the time. To alleviate this problem, we have also divided the data into samples collected before and after 2011 (Supplementary Data; Supplementary table  10 ), but temporal trends in aggregated data should be interpreted with due caution.
Below we summarise the overall profile of drug resistance types in the regional sub-populations: this is intended simply to provide context for users of this dataset, and should not be regarded as a statement of the current epidemiological situation. The Supplementary Notes (Supplementary Data) contain a more detailed description of the geographical distribution of haplotypes, CNV breakpoints, interactions between genes, and variants associated with less commonly used antimalarial drugs. In the accompanying data release, we also identify samples with mdr1, plasmepsin2/3 and gch1 gene amplifications that can affect drug resistance. Chloroquine resistance. Samples were classified as chloroquine resistant if they carried the crt 76T allele. As shown in Table  2 , this was found in almost all samples from Southeast Asia, South America and Oceania.
Resistance to artemisinin combination therapy. We classified samples as artemisinin resistant based on the World Health Organization classification of non-synonymous mutations in the propeller region of the kelch13 gene that have been associated with delayed parasite clearance  71. By this definition, artemisinin resistance was confined to Southeast Asia but, as previously reported, this dataset contains a substantial number of non-synonymous kelch13 propeller SNPs occurring at <5% frequency in Africa and elsewhere  9. The most common ACT formulations in Southeast Asia are artesunate-mefloquine (AS-MQ) and dihydroartemisinin-piperaquine (DHA-PPQ). We classified samples as mefloquine resistant if they had mdr1 amplification  72  or as piperaquine resistant if they had plasmepsin 2/3 amplification 25.
Mefloquine resistance was observed throughout Southeast Asia and was most common in the western part. Piperaquine resistance was confined to eastern Southeast Asia with a notable concentration in western Cambodia. Elsewhere  11, 13  we describe the kel1/pla1 lineage of artemisinin-and piperaquine-resistant parasites that expanded in western Cambodia during 2008-13, and then spread to other countries during 2013-18, causing high rates of DHA-PPQ treatment failure across eastern Southeast Asia: since the current dataset extends only to 2015 it captures only the first phase of the kel1/pla1 lineage expansion.
Discussion This open dataset comprises sequence reads and genotype calls on over 7,000 P. falciparum samples from MalariaGEN partner studies in 28 countries. After excluding variants and samples that failed to meet stringent quality control criteria, the dataset contains high-quality genotype calls for 3 million polymorphisms including SNPs, indels, CNVs and large structural variations, in almost 6,000 samples. The data can be analysed in their entirety or can be filtered to select for specific genes, or geographical locations, or samples with particular genotypes. This is twice the sample size of our previous consortial publication  9  and is the largest available data resource for analysis of P. falciparum population structure, gene flow and evolutionary adaptation. Each sample has been annotated to show its profile of resistance to six major antimalarial drugs and whether it carries structural variations that can cause RDT failure.
The classification scheme is heuristic and based on a subset of known genetic markers, so it should not be treated as a failsafe predictor of the phenotype of a particular sample. Our purpose in providing these annotations is to make it easy for users without specialist training in genetics to explore the global dataset and to analyse any subset of samples for key features that are relevant to malaria control. Samples were collected by independent groups that were operative at a given time and in a given place with distinct objectives; while care needs to be taken when interpreting results spanning multiple years and geographical settings (e. g. aggregated trends of drug resistance prevalence), this heterogeneity also allows for the exploration of a wide range of epidemiological and transmission settings.
An important function of this curated dataset is to provide information on the provenance and key features of samples associated with each partner study, thus allowing the findings reported in different publications to be linked and compared. Data produced by the Pf Community Project have been analysed in more than 50 publications (refs 5-55) and a few examples will serve to illustrate the diverse ways in which the data are being used. An analysis of samples collected across Africa by Amambua-Ngwa, Djimde and colleagues found evidence that parasite population structure overlaps with historical patterns of human migration and that the P. falciparum population in Ethiopia is significantly diverged from other parts of the continent  12. A series of studies by Amato, Miotto and colleagues have documented the evolution of a multidrugresistant lineage of P.
Thus, the next few years are likely to see major advances in both the scale and information content of parasite genomic data. The practical value for malaria control will be greatly enhanced by the progressive acquisition of longitudinal time-series data, particularly if this is linked to other sources of epidemiological data and translated into reliable, actionable information with sufficient rapidity to allow control programmes to monitor the impact of their interventions on the parasite population in near real time. The Pf Community Project provides proof of concept that systems can be developed for groups in different countries to share data, to analyse it using standardised methods, and to make it readily accessible to other researchers and the malaria control community. Standard laboratory protocols were used to determine DNA quantity and proportion of human DNA in each sample as previously described  7, 56.
Variants with a VQSLOD score ≤ 0 were filtered out. Functional annotations were applied using snpEff 90 version 4. 1. Genome regions were annotated using vcftools version 0. 1. 10 and masked if they were outside the core genome. Unless otherwise specified, we used biallelic SNPs that pass all quality filters for all the analysis. We removed 69 samples from lab studies to create the release VCF files which contain 7,113 samples. VCF files were converted to ZARR format and subsequent analyses were mainly performed using scikit-allel version 1. 1. 18 and the ZARR files. We identified species using nucleotide sequence from reads mapping to six different loci in the mitochondrial genome, using custom java code (available at https://github. com/malariagen/ GeneticReportCard). The loci were located within the cox3 gene (PF3D7_MIT01400), as described in a previously published species detection method  91.
Population-level analysis and characterisation We calculate genetic distance between samples using biallelic SNPs that pass filters using a method previously described  9. In addition to calculating genetic distance between all pairs of samples from the current data set, we also calculated the genetic distance between each sample and the lab strains 3D7, 7G8, GB4, HB3 and Dd2 from the Pf3k project. The matrix of genetic distances was used to generate neighbour-joining trees and principal coordinates. Based on these observations we grouped the samples into eight geographic regions: South America, West Africa, Central Africa, East Africa, South Asia, the western part of Southeast Asia, the eastern part of Southeast Asia and Oceania, with samples assigned to region based on the geographic location of the sampling site.
Five samples from returning travellers were assigned to region based on the reported country of travel. F WS was calculated using custom python scripts using the method previously described  7. Nucleotide diversity (π) was calculated in non-overlapping 25 kbp genomic windows, only considering coding biallelic SNPs to reduce the ascertainment bias caused by poor accessibility of non-coding regions. LD decay (r 2 ) was calculated using the method of Rogers and Huff and biallelic SNPs with low missingness and regional allele frequency >10%. Mean F ST between populations was calculated using Hudson's method. Allele frequencies stratified by geographic regions and sampling sites were calculated using the genotype calls produced by GATK. F ST was calculated between all 8 regions, and also between all sites with at least 25 QC pass samples.