dataesr/scientific-paragraphs-categorization huggingface dataset:
Near-infrared spectroscopy/scanning At days 3, 6, 9, 12 and 15, mosquitoes were killed with triethylamine or chloroform before scanning (for all strains except CSU-G3). CSU-G3 were killed via freezing at -20 °C for approximately 30 min, and then left for another 30 min to equilibrate to room temperature (~25 °C). Our NIRS set-up and data processing largely follows previously published methodology  [25]. Mosquitoes were placed on their dorsal side on a spectralon plate, and their head/thorax was scanned with a LabSpec4i spectrometer with a 3 mm bifurcated reflectance probe at a height of 3 mm (#ASD-135320-RevE -ASD Inc. , Boulder, CO, USA). We centered the scan on the head/thorax to limit the effects of the blood meal itself on the spectra, though note there are significant changes to protein expression and other factors with blood-feeding  [38].
Data analysis and model creation Spectra were converted to text using ViewSpec Pro version 6. 2 (ASD Inc. ) as wavelength vs Log(1/R). Spectra were manually viewed using the IQ Predict software, and any spectral profiles that lacked distinct absorbance peaks due to poor positioning or poor quality of the specimen were discarded from analysis (0-3. 9% of samples depending on dataset). Six different sample sets were created (Additional file 1: Table  S1 ) to represent a range of collection locations and groupings. These included two datasets that were combinations of field mosquito datasets (DS5) and field mosquito datasets plus the recently colonized strain dataset (DS6). The CSU-G3 dataset (DS4) was left out of these mixed datasets due to the difference in knockdown technique (freezing vs chemical anesthesia).
Only the region from 500 to 2350 nm was utilized in analyses to remove regions of poor sensor sensitivity, and all spectra were pre-processed via mean centering using the 'caret' package in R version 3. 3. 2 using the RStudio 1. 0. 44  [39] [40] [41]. A range of regression (providing numeric values) and classification (grouping into a descriptive class of age of 'young' or 'old') algorithms were utilized for sample analyses (see Table  1  for a list of all algorithms used). Additionally, we included the use of full-spectrum PLS as it has been most commonly utilized for the agegrading of insect species. All algorithms are assessed for accuracy using the root mean squared error metric (RMSE), which allows for assessment of overall predictive accuracy in a value with interpretable units (i. e.
"days"). The partial least squares (PLS)  [42] , support vector machine using a linear kernel (svmLinear)  [43] , and oblique random forest (ObliqueRF)  [44]  algorithms were implemented using the 'caret' package. The number of latent variables (nLV) used in PLS models was chosen based upon the lowest root mean squared error of 5-fold crossvalidation with a maximum of 10 latent variables. The parameters for svmLinear and ObliqueRF were tuned using the adaptive resampling search in 'caret'. The interval PLS (iPLS)  [45, 46]  algorithm was implemented using the 'mdatools' package  [47]. This method uses intervals of 60 nm across the full spectra (500-2350 nm), maximizing accuracy while keeping the fewest intervals possible based on Wold's R criterion. The ensemble PLS (enPLS) algorithm with variable selection was performed using the 'enpls' package in R  [48].
In enPLS, the most informative wavelengths were chosen via Monte-Carlo uninformative variable elimination as in Cai et al. [46, 49, 50]  (Additional file 2: Figure  S1 ). Additionally, two methodologies were analyzed that use the model population analysis framework for chemometrics  [51] , in which sub-regression models are created to analyze the importance of variables (wavelengths) and samples (to evaluate outliers). The first, Model Adaptive Space Shrinkage-PLS (MASS) provides simultaneous variable selection and outlier detection, and was implemented in MATLAB R2015a (The MathWorks, Inc. , Natick, Massachusetts, USA) using author-provided code with 10-fold cross-validation  [52]. Variable Combination Population Analysis (VCPA) which provides more aggressive variable selection, was also implemented in MATLAB with author provided code and 5fold cross-validation  [53].
The results of the root mean squared error of calibration (RMSEC, the self-prediction of the full dataset), the root mean squared error of crossvalidation (RMSECV, the average prediction of 5 or 10fold cross-validation where 80 or 90% of the model predicts the 20 or 10% left out that allows for parameter tuning to improve prediction), the root mean squared error of validation (RMSEV, the error of prediction of the 20% of the spectra left out prior to model creation that the parameters are not tuned on), and the root mean squared error of prediction (RMSEP, the error of a fully independent test set collected on different days) are presented for all the regression models presented. Finally, we included three classification-based models (classifying mosquito ages of 3 and 6 days as "young" and days 9, 12 and 15 as "old").
This was done to recapitulate the < 7 or > 7 day grouping method used in other mosquito-age prediction NIRS literature  [25]. These algorithms were chosen to compare the more commonly utilized algorithm (PLS), an alternative linear classifier (svmLinear), and a tree-based classifier reported to have success with spectral data (ObliqueRF)  [54]. All R and MATLAB code and unprocessed spectral files are available for download at the link provided in the "Availability of data and materials" section below.
Validation and independent test sets Validation sets (Additional file 3: Table  S2 ) were created by choosing ~20% of the spectra to leave out of the training set prior to model creation using the "Pick me!" random file selection software (Matías Nahuel Carballo)  [55]. As above, we attempted to hold sample sizes consistent across days. Means for each day were calculated and analyzed via an analysis of variance (ANOVA) test with Tukey's multiple comparisons adjustment with GraphPad Prism v6. 1 (GraphPad Software, San Diego, CA). Classification models were tested using Acc > NIR metric of McNemar's Chi-square test in the 'caret' package. Independent test sets (Additional file 4: Table  S3 ) were utilized to determine overall prediction accuracy on a non-biased sample set  [25]. These samples were considered to be independent as they were reared separately, and were from unique collection days and/or locations relative to samples in the calibration dataset  [35, 56].
Feature/variable selection and outlier detection Four of the methods investigated reduced the variable space from the maximum 1851 spectral wavelengths (i. e. 500-2350 nm) via a range of approaches. VCPA had the most aggressive selection approach, reducing the variable space to 10-12 wavelengths. MASS tended to keep the largest number of variables of these selection methods (140-482 wavelengths) (Table  2 ). In general, the region from 500 to 1000 nm was represented most heavily in the majority of datasets, though few wavelengths or sets of wavelengths were consistent between all algorithms or datasets (Fig. 1 ). However, while the iPLS predictions for datasets 3 and 4 chose the same interval as having the lowest RMSE value in crossvalidation (740-799 nm), there was no ability of these models to predict each other (data not shown).
In general, the prediction accuracy of the feature reduction methodologies was higher than that of PLS, though not necessarily other full-spectra prediction algorithms such as svmLinear (Table  2 ). Outlier detection was available in two of the six methodologies investigated. Few outliers were marked by either method, with a maximum of 3. 03% removed in dataset 6 with enPLS (Table  2 ). Methodologies with outlier detection did not appear to have an obvious increase in prediction accuracy over other methods with our datasets.
Accuracy of calibration, cross-validation, and validation set prediction Calibration sets allow for an initial assessment of model fit, and for a value to compare cross-validation accuracy to have an indication of overfitting. If not generated natively via the algorithm, this value was not presented (svmLinear). Of the other five algorithms, enPLS had the lowest RMSEC for each of the 6 datasets, followed by MASS. In cross-validations, the root mean squared error varied from 1. 05-3. 50 days depending on the dataset and algorithm used (Table  2 ). Additionally, the R 2 value, calculated based on the actual vs predicted values for each of the ages, followed the RMSE (i. e. lower RMSE has higher R 2 ). The highest errors were predominantly found in the multi-source datasets (DS5 and DS6), likely due to the increase in genetic variation and sampling locations included in these sets.
Of the six algorithms investigated, PLS was the least accurate, having the highest root mean squared errors among algorithms in the cross-validation testing set (Table  2 ). The most accurate algorithm for cross-validation sets was enPLS for 5 of 6 sets tested. The root mean squared error of the validation set was lowest for the enPLS model for 3 of 6 datasets. In general, the validation sets tended to have overpredicted ages of younger mosquitoes (+4. 54 and +1. 93 days for day 3 and day 6 with PLS dataset 6, respectively) (Fig. 2 ), though this difference was reduced by the ensemble PLS algorithm (+2. 50 and +1. 00 days). Older mosquitoes tended to be slightly under-predicted (-1. 78 days for day 12, -2. 62 for day 15, -3. 00 for day 16 with PLS; -0. 65 for day 12, -0. 67 for day 15, and -1.
08 for day 16 with SVM). These under/over-prediction trends follow what has been reported previously with age-classification of insects with NIRS  [25, 33, 34]. Classification algorithms accurately grouped validation sets at a minimum of 70. 7% to a maximum of 98. 0% correctness (Table  3 ). For dataset 6, accuracy was highest with Oblique Random Forest and svmLinear (85. 4% and 83. 7% classified correctly, respectively).
Accuracy on independent test set 1 Independent test set 1 consisted of 69 mosquitoes collected as wild-caught larvae, with 57 of 69 being fully or partially blood-fed. Accuracy for the three independent test sets varied considerably based on which set and model was used. The lowest root mean squared error of prediction for independent test set 1 was with the VCPA model built on dataset 6 (Table  2 ). This level of error allowed for discrimination between young and old mosquito ages (3 and 6 compared to 9 and 12 days post-emergence), though this difference was only significant between Days 3 to 12, 6 to 9, and 6 to 12 via Tukey's multiple comparisons test. This was predominantly due to an overprediction of Day 3 mosquitoes (+4. 15 days) and an under-prediction of Day 12 mosquitoes (-2. 43 days).
The regression model with the clearest delineation between young and old mosquitoes from the independent test set was the ensemble PLS model created from dataset 6 (Fig. 3b ). With classification algorithms for independent test set 1, the svmLinear model had the best accuracy (Table  3 ). Misclassification (being classed as "old" for days 3 and 6 or "young" for days 9 and 12) was spread relatively evenly across days (37. 5% misclassified Day 3, 29. 6% Day 6, 15. 4% Day 9, and 38. 1% Day 12). Accuracy on externally validated independent test sets (independent test sets 2 and 3) In total, 40 nulliparous, 39 parous, and 40 sporozoite positive (all P. falciparum) An. gambiae were used for independent test sets. These numbers were chosen to roughly keep classes the same size, with the sporozoite positive samples being the limiting sample set (due to a 1.
5-5. 1% sporozoite positive rate in samples tested)  [58]. Of these, 28/40 of the nulliparous are non-blood-fed, 27/39 of parous are non-blood-fed, and 8/40 of the sporozoite positive are non-blood-fed (Additional file 5: Table  S4 ). As these are field mosquitoes caught as   adults, the exact ages of these samples are unknown. Due to this, we are unable to calculate the RMSEP, and instead compare mean age predictions for each class (i. e. nulliparous, parous, or sporozoite positive) using the regression algorithms with the highest prediction accuracies for independent test set 1 (all dataset 6 models except iPLS due to poor predictive power on ITS2) (Table  2 ). None of the regression models used predicted a difference in means between nulliparous and sporozoite positive mosquitoes via Sidak's multiple comparisons test (Fig.
Discussion In this study we assessed the use of NIRS for the agegrading of wild-caught mosquitoes whose age had been externally validated by existing approaches. Accuracy for cross-validation and validation datasets indicated that there may be some loss in accuracy due to high complexity present in the datasets (i. e. the highest RMSECV and RMSEV values were found in datasets 5 and 6). This slight decrease in self-predictive accuracy would be expected as models trained on a diverse set of data should not capture all of the diversity present, otherwise they would be over fit to the data  [61]. The best measure of success then should come through independent test sets that are not generated from calibrated data (i. e. not the 20% left out for validation or the 5/10-fold crossvalidation sets used for model parameter tuning).
Unfortunately, we found difficulty in accurate prediction of most of the independent test sets including wildcaught mosquitoes reared to known ages (independent test set 1, ITS1), and mosquitoes whose age had been externally validated by parity or presence of sporozoites (independent test sets 2 and 3, ITS2 and 3). Using the full-spectrum PLS algorithm, there was limited predictive power with any of the six datasets for ITS1, ITS2 or ITS3, except for PLS-classification on ITS1. Alternative algorithms such as VCPA and MASS had some improvement on these test sets for regression-based prediction, largely on independent test set 1 (Table  2 ), however overall accuracy was low with all algorithms. The best delineation between points came with the largest dataset (dataset 6) discussed further below.
It was then the hope that the datasets presented here that spanned a range of years, capture locations, and larval conditions, while keeping the instrument parameters stable, would allow for the creation of a robust model with broad predictive power. We did attempt to time blood-feeds to be roughly 8-12 h before the scan, as this would be analogous to the primarily blood-fed wild-caught vectors collected via aspiration. A caveat to sampling is that we did include some partially blood-fed or non-blood-fed mosquitoes in models to increase numbers for sporozoite detection as this is a low prevalence population, and also for ease in parity dissection. While it is possible this somewhat limits predictive power, controlling for blood-fed status did not increase predictive power (Additional file 6: Table  S5 ; Additional file 7: Figure  S2 ).
Additionally, use of natural water sources for mosquito rearing (datasets 1 and 2) was used to limit the confounding factor of larval diet and geographical factors for prediction. As models built on dataset 6 had the highest test set prediction accuracy, accounting for these factors may be important. Future models could also include very young (day 1) mosquitoes, though as it was unlikely that these recently emerged mosquitoes would be collected with the trapping methods used in this study, they were not included  [62]. Other possible confounders limiting predictive power may be due to the external validators themselves. It is possible that through a late first blood meal or heterogeneity in gonotrophic development  [63] , some mosquitoes may be old but nulliparous. Additionally, if mosquitoes very rapidly feed post-emergence and have already been inseminated which has been shown to be common in nulliparous mosquitoes  [64] , they may become parous early in life causing overlap with nulliparous mosquitoes.
1 , which shows that there was limited overlap between feature/variable selection algorithms with and between datasets. There was some clustering in the region from 500 to 1000 nm, though this was not found for every algorithm and dataset (Fig. 1 , VCPA, enPLS and iPLS algorithms). This differs somewhat from what was presented previously in Mayagaya et al. [25]  based on PLS regression coefficients that found a more broad distribution of importance of wavelengths "700, 1000, 1221, 1305, 1412, 1728, 1878, 1947 and 2200 nm". Additionally, the poor predictive ability may not solely be based on wavelength selection via the algorithms, as full spectrum models and models that selected the same wavelengths (i. e. iPLS for datasets 3 and 4) had poor ability to predict other datasets (data not shown).
We attempted in a range of ways to cope with these and other issues in our analytical methodology. The first is that through using methods that provide variable selection we could help to address the "small n, large p" problem in which we have relatively few sample numbers but many predictors which can easily lead to overfitting of models  [67]. However, while the variable selection methods had more accuracy than PLS alone, overall they were unable to create a parsimonious model that had robust and broad predictive success. Due to this failure, we would suggest in future experiments that dataset complexity be reduced prior to model creation as much as possible. As it has been previously reported  [25] , members of An. arabiensis and An. gambiae (s. l. ) can be delineated via NIRS. Mosquitoes from 2013's calibration model (DS1) were able to be identified, with 68.
With this in mind, future studies could be improved by accounting for this variation, and the recent species delineation of An. gambiae (s. s. ) and An. coluzzii  [69]. To our knowledge, there has been no publication demonstrating the ability to distinguish An. gambiae (s. s. ) and An. coluzzii with nearinfrared spectroscopy, though this would possibly allow for the avoidance of more laborious PCR-based identification. Additional measures that could be added are data pre-processing methods that may improve predictive performance  [70]. Unfortunately there is no easy way to simplify determination of which combinations of preprocessing and algorithms will provide best results for datasets as has been popularized by the phrase there is "no free lunch" to model selection  [71]. Finally, while the same machine was utilized for all scanning performed, the samples were scanned "on location" and thus there may be some temperature or other differences year-toyear and day-to-day between groups which could impact results  [34].
89 0. 81 na 2. 13 4. 60 Dataset 3 PLS 160 1851 2. 05 0. 80 2. 61 0. 70 10 2. 85 5. 53 iPLS 160 60 1. 97 0. 81 2. 41 0. 78 10 2. 29 5. 61 enPLS 158 350 0. 76 0. 97 1. 44 0. 90 na 1. 96 4. 29 MASS 158 441 1. 24 0. 93 1. 59 0. 88 10 2. 06 4. 17 VCPA 160 10 1. 95 0. 82 2. 05 0. 80 8 2. 55 3. 40 svmLinear 160 1851 na na 1. 94 0. 82 na 2. 23 3. 76 Dataset 4 PLS 200 1851 2. 10 0. 76 2. 60 0. 64 10 2. 43 5. 18 iPLS 200 60 1. 71 0. 84 2. 17 0. 80 10 2. 41 4. 05 enPLS 195 350 0. 85 0. 96 1. 32 0. 90 na 1. 49 3. 56 MASS 196 140 1. 55 0. 87 1. 78 0. 82 10 1. 98 3. 95 VCPA 200 11 2. 28 0. 71 2. 39 0. 69 7 2. 72 6. 44 svmLinear 200 1851 na na 1. 99 0. 77 na 1. 74 4. 32 Dataset 5 PLS 334 1851 2. 94 0. 50 3. 16 0. 43 10 3. 42 3. 57 iPLS 334 180 2. 50 0. 64 2. 76 0. 58 10 2. 72 6. 70 enPLS 330 200 1. 77 0.
82 2. 07 0. 75 na 3. 10 4. 69 MASS 329 466 2. 20 0. 71 2. 36 0. 67 10 3. 10 3. 67 VCPA 334 12 2. 82 0. 54 2. 89 0. 51 8 3. 70 4. 79 svmLinear 334 1851 na na 2. 66 0. 63 na 2. 81 3. 70 Dataset 6 PLS 494 1851 3. 24 0. 43 3. 50 0. 34 10 3. 29 3. 43 iPLS 494 120 3. 21 0. 44 3. 36 0. 41 8 2. 99 5. 01 enPLS 479 300 1. 76 0. 83 2. 21 0. 73 na 2. 77 3. 33 MASS 492 482 2. 58 0. 64 2. 83 0. 56 10 3. 08 2. 96 VCPA 494 10 3. 43 0. 47 3. 15 0. 46 10 3. 43 2. 48 svmLinear 494 1851 na na 2. 68 0. 61 na 2. 78 3. 49 Note: eEach of the six datasets were used to generate models using six regression algorithms. The root mean squared error (RMSE) is presented for the calibration, cross-validation and validation sets, and independent test set 1. This measure (with units of "days") allows for an approximation of how much error is present across the range of ages present in each dataset Abbreviations: No.
7913 0. 7727 (0. 6216-0. 8853)** 0. 5507 0. 5625 0. 5128 ObliqueRF 0. 8649 0. 7955 (0. 647-0. 902)*** 0. 5652 0. 625 (0. 5096-0. 7308)* 0. 5128 svmLinear 0. 8422 0. 8636 (0. 7265-0. 9483)*** 0. 6232 (0. 4983-0. 7371)* 0. 6232 (0. 4983-0. 7371) * 0. 5128 Dataset 2 PLS 0. 9165 0. 8421 (0. 6875-0. 9398)*** 0. 4493 0. 6 (0. 4844-0. 708)* 0. 5385 ObliqueRF 0. 9354 0. 8684 (0. 7191-0. 9559)*** 0. 4058 0. 55 0. 5385 svmLinear 0. 9356 0. 8947 (0. 752-0. 9706)*** 0. 4348 0. 6 (0. 4844-0. 708)* 0. 5769 Dataset 3 PLS 0. 95 0. 878 (0. 738-0. 9592)*** 0. 5072 0. 4625 0. 4872 ObliqueRF 0. 9687 0. 9756 (0. 8714-0. 9994)*** 0. 5942 0. 55 0. 4744 svmLinear 0. 9562 0. 9756 (0. 8714-0. 9994)*** 0. 5217 0. 5375 0. 4872 Dataset 4 PLS 0. 895 0. 88 (0. 7569-0. 9547)*** 0. 4928 0. 5 0. 5128 ObliqueRF 0. 97 0. 98 (0.
8935-0. 9995)*** 0. 5072 0. 525 0. 4615 svmLinear 0. 945 0. 96 (0. 8629-0. 9951)*** 0. 5362 0. 55 0. 4744 Dataset 5 PLS 0. 7726 0. 7073 (0. 5965-0. 8026)*** 0. 5942 0. 55 0. 5385 ObliqueRF 0. 8442 0. 7805 (0. 6754-0. 8644)*** 0. 6667 (0. 5429-0. 7756)** 0. 525 0. 4872 svmLinear 0. 8232 0. 8049 (0. 7026-0. 8842)*** 0. 6812 (0. 5579-0. 7883)** 0. 5875 0. 5769 Dataset 6 PLS 0. 7348 0. 748 (0. 6617-0. 8219)*** 0. 6812 (0. 5579-0. 7883)** 0. 55 0. 4872 ObliqueRF 0. 8502 0. 8537 (0. 7786-0. 9109)*** 0. 6232 (0. 4983-0. 7371)* 0. 625 (0. 5096-0. 7308) * 0. 5256 svmLinear 0. 8518 0. 8374 (0. 7601-0. 8978)*** 0. 6957 (0. 5731-0. 8008)** 0. 5625 0. 5 *P < 0. 05, **P < 0. 01, ***P < 0. 001 Abbreviations: CV cross-validation, V validation, ITS independent test set, LV latent variables used if applicable.
Therefore so far the best way is still to proceed interactively with an 1D NMR spectra viewer. To fulfill this need, we have been developing NMRProcFlow, an open source software that greatly helps spectra processing (Fig. 1 ). It was built by involving NMR spectroscopists eager to have a quick and easy tool to use and even for non-expert users. Although an open source software such as R (R Development Core Team 2005), can be leveraged to develop a comprehensive 1D NMR spectra processing, its command-line interface is a genuine barrier for metabolomics researchers with little or no programming background. Knowing that the processing of a set of NMR spectra may be long and tedious, the purpose of NMRProcFlow is to assist users in processing 1D NMR spectra by leveraging of an easy and intuitive Graphical Unit Interface (GUI).
Implementation NMRProcFlow has been developed as two separate applications (NMRspec and NMRviewer), each of them embedded in Docker images, sharing a data volume and communicating together through AJAX web services (Fig. 2 ). The Docker (https://www. docker. com/) technology was chosen to facilitate the setting up of the software. NMRspec, the NMR spectra processing application has been implemented using mainly the open source software language R (R Core Team 2013, http://www. R-project. org/), and some processing algorithms have been implemented in C++ using the Rcpp package  (Eddelbuettel and Francois 2011)  within an internal module called Rnmr1D. The NMRspec GUI has been implemented using the 'R shiny' (http://shiny. rstudio. com/) framework based on event-driven programming. NMRviewer is based on a client-server architecture.