dataesr/scientific-paragraphs-categorization huggingface dataset:
Data analysis. Raw-sequencing data were computationally processed with AdapterRemoval  26. We removed sequence duplicates with Prinseq 27 and performed taxonomic classification of metagenomic reads with Kraken2 28 and a custom database of complete bacterial, viral, archaeal, mitochondrial DNA (mtDNA) and plastid genomes from the NCBI RefSeq database (https://www. ncbi. nlm. nih. gov/refseq/) masked for low-complexity regions with Dustmasker  29. For comparative analysis, we used the custom Kraken2 database for taxonomic classification of ancient and modern dental calculus as well as modern dental plaque shotgun sequencing data from the literature (Supplementary Table  S2 ). Kraken2 reports were combined in taxonomic read abundance tables with Recentrifuge  30. Since we used a database of complete bacterial and archaeal genomes, we normalized the species read abundances of all the datasets, from this study and from the literature, for genome length by dividing them for the size (in Gb) reported in the NCBI RefSeq.
1, -l 1000), and we assessed the post-mortem damage with mapDamage  32. Abundance tables of Bacteria and Archaea normalized for genome length and library size were filtered to include only taxa >0. 02%, and were used to calculate Bray-Curtis dissimilarities at the species, genus and family level in R, with the vegan library. We plotted the Bray-Curtis dissimilarities with the unweighted-pair group method with arithmetic means (UPGMA) using the ape library in R. Support values were estimated with the R package pvclust. Normalized abundance data at the phylum level were displayed with stacked bar plots using barplot in R. Finally, to identify bacterial and archaeal taxa that distinguish the main groups identified in the UPGMA we used LEfSe  33  , and Kruskal-Wallis test and Wilcoxon rank sum test in R with the package dplyr.
Box plots of phyla abundance were generated with ggpubr in R. To further corroborate our results, we tested taxa differential abundances with DESeq2 34 at the phylum, family and genus level. To provide a more thorough investigation of food consumption and potential diet sources, we used Centrifuge  35  , an alignment-based metagenomic classifier that enables classification of sequences from plants, animals, fungi and many other eukaryotes, and the NCBI nt database. Centrifuge output reports were visualized with Pavian  36.
Results Quality filtering and data authentication. After quality filtering and adapters trimming, 7-21% of the reads in the ancient baboon mummies could be assigned to a taxon using the Kraken2 custom database. After removing contaminants potentially stemming from the laboratory, the depositional context, soil and skin (Supplementary Text), between 0. 2 and 10. 4% of the classified reads (with a maximum of 23,614 classified reads in BB11) likely represented endogenous content (see Supplementary Table  S3 ). The results of the Sourcetracker analysis showed that before filtration the ancient baboon calculus samples contained reads mostly stemming from the laboratory controls, and that after filtration microbial DNA of oral origin ranged from 27% to 98% in 13 baboon mummies (see Fig. 1 , Supplementary Fig.
3 and 4%) and in the Egyptian sample BB08 (3. 6%) (Supplementary Table  S11 ). Among other putative oral pathogens that were found in the dental calculus of the ancient Egyptian baboons, Rothia mucilaginosa possessed the highest frequencies (up to 1. 6% in BB08). Additionally, the ancient baboons showed higher proportions of Streptococcus mitis, Stretococcus mutans and Veillonella parvula than the two historical specimens. To explore the origin of the bone lesions observed on the baboon skulls in more depth, we investigated whether they could have been caused by actinomycotic infection, which is commonly associated with lesions in the oral cavity, the temporal bone and the skull base in humans  38. We made a competitive alignment of the reads against available reference data (complete genomes, contigs and scaffolds) of 34 Actinomyces species deposited in GenBank.
To further corroborate the presence of this Archaea species in the oral microbiome of the ancient baboon BB06, we aligned the reads against the reference genome (230 reads in total)   and detected post-mortem damage typical of aDNA molecules (deamination >25% at the 5′-and 3′-ends). The results were further supported by a competitive alignment against 13 Methanobrevibacter genomes deposited in GenBank, confirming that the majority of the reads in the historical and in the mummified baboon BB06 sample (53% and 38% respectively) aligned to M. oralis.
Dietary analysis with Centrifuge. Results of the Centrifuge analysis were mostly characterised by spurious classifications of reads to plant and animal taxa, as they were widely represented in the negative controls. At the family level, we observed the highest number of hits with Poaceae (grasses) and Fabaceae (legumes, peas and beans) taxa. After excluding all potential spurious hits represented by >10 reads in the negative controls, both the Centrifuge and the Kraken2 analysis detected cucumber (Cucumis sativus, 259 and 51 reads respectively) and watermelon (Citrullus lanatus, 24 and 11 reads respectively) in sample BB11. As further means of verification, we used BLASTn to classify the reads assigned to cucumber by Kraken2 (purportedly matching mtDNA and/or plastid reference sequences) against the NCBI nt database, and found unique hits to a Cucumis species in 51 of 59 reads (86%), with Cucumis sativus as first best hit in all the instances (scores ranging 63-126).
More extensive analysis of oral ecology in non-human primates may help to fill this knowledge gap in the future. Diet in ancient Egyptian baboons. Shotgun metagenomic datasets have recently been used for ancient dietary analyses, but are often problematic due to spurious hits causing false positive signals, and as a result of limitations and assumptions associated with the use of modern reference sequences that may not reflect ancient taxa  50. The analysis of plant taxa conducted on our shotgun dataset mostly returned hits to the families Fabaceae (legumes, peas, beans) and Poaceae (grasses), but in most instances no further investigation at deeper taxonomic levels was possible due to the concurrent presence of spurious hits in the negative controls. The analysis with the custom database in Kraken2, the nt database in Centrifuge, and NCBI nt Blast, detected the presence of cucumber (Cucumis sativus) and watermelon (Citrullus lanatus).
The low level of deamination of the DNA molecules mapping to cucumber suggests that they may originate from some unknown source of contamination. Cucumber is native to the Indian subcontinent, and current linguistic and iconographic evidence support its introduction in Africa in Medieval times  51. Watermelon, on the other hand, is native to Africa, and iconography and seeds found in contexts as old as more than 4,000 years point to Northeast Africa as the original centre of domestication  52. However, the damage patterns could not be assessed due to the limited number of hits, and we cannot exclude that the reads assigned to watermelon belong to different ancient species not yet represented in the databases. We stress that extreme caution is needed when inferring food sources from shotgun reads, in particular without authentication strategies or other sources of evidence.
However, we stress that multiple factors may have shaped the oral microbiome of the baboons in captivity, from health and diet, to host genome, interaction with humans or other unknown factors. Our study represents a first dataset of non-human primates oral microbiomes in captivity, and future analyses of dental calculus of archaeological and modern wild baboons, as well as other primates, will help to gain a more thorough understanding of the effects of captivity conditions on the animal oral ecology.
Acknowledgements We acknowledge the  Musée des Confluences (Lyon, France) , especially  Didier Berthet  for his ongoing support and permission to sample the archaeological material. This research was carried out within the framework of the " Baboons Project " supported by the  Ministère de la Culture et de la Communication (France) ; the  Royal Belgian Institute of Natural Sciences in Brussels (Belgium)  and the  Agence Nationale de la Recherche  from the " Investissement d' Avenir" program   ANR-11-LABX-0032-01  LabEx ARCHIMEDE (Montpellier, France). We wish to thank  Thomas Haverkamp  for discussion of preliminary data, and  Elena Marinova  for her help in the interpretation of the dietary analysis. ATO was funded by the  Center for Evolution and Medicine Postdoctoral Fellowship at Arizona State University.
Data Processing. The wavelengths and intensities of the acquired CL spectra were calibrated, and intensity spikes were removed. Principle component analysis (PCA) was then applied to reduce the noise of the spectra in Figures  2 3 4. The analysis was performed with the open source Python library HyperSpy V0. 8. 1. 40 The spectral response of the CL spectrometer at different wavelengths was sequentially corrected. Finally, the background noise was subtracted from the spectra by taking the reference from the vacuum area. The experimental CL spectra extracted along taper shafts were summed over a width of 3 pixels (∼70 nm) in order to enhance the signals. FDTD Simulations. A charge broadening scheme, as described elsewhere, was introduced to mimic the electron probe. 41 The whole simulation domain has been discretized by unit cells of 1.
Global information helps in modeling the spatiotemporal evolution of long-term activities, hence, their spatial and temporal localization. Moreover, the local dynamic information incorporates complex local motion patterns of daily activities into the models. Our proposed method is evaluated using realistic datasets captured from observation rooms in hospitals and nursing homes. The experimental data on a variety of monitoring scenarios in hospital settings reveals how this framework can be exploited to provide timely diagnose and medical interventions for cognitive disorders, such as Alzheimer's disease. The obtained results show that our framework is a promising attempt capable of generating activity models without any supervision.
These methods classify the generated temporal segments either in the form of sliding windows in multiple scales  [4] [5] [6]  or another external proposal mechanism  [7, 8]. These methods infer the occurring activity by exhaustively applying trained activity classifiers at each time segment. Although they achieve encouraging performances in short actions and small-scale datasets, these computationally expensive methods can not be applied conveniently to large-scale datasets and complex activities, such as ADLs. These methods are not capable of precisely predicting flexible activity boundaries. Temporal scale variability of the activities can be dealt with by using multiple-scale sliding window approaches, however, such methods are computationally expensive. To compensate the high computational cost of these methods, a class of methods  [4, 8, 9]  influenced by advancements in the field of object detection  [10] [11] [12]  have been developed in which instead of exhaustive scanning, perform a quick scan to single out candidate activity segments.
For example,  [9]  uses an LSTM to encode Convolution3D (C3D)  [17]  features of each segment and classifies it without requiring an extra step for producing proposals. However, their model is still dependant on hand-crafted features. In order to resolve the problem of short dependencies in RNN based methods, time-series models, such as Temporal Convolutional Networks (TCN)  [53, 54] , employ a combination of temporal convolutional filters and upsampling operations for acquiring long-range activity relations. However, applying convolutional operations on the local neighborhood for detecting long-range dependencies is not efficient in terms of computational time. Moreover, many methods use the concept of Actioness  [55]  to produce initial temporal activity proposals. Actioness indicates the likelihood of a generic activity localized in the temporal domain.
Reliability of the Actioness hinges upon the correctness of distinguishing the background. Unlike conventional activity datasets which contain many background segments, long activities in ADL datasets are usually linked through short background intervals. Accordingly, methods  [2, 56]  which are relied on Actioness cannot effectively determine the temporal boundary of ADLs in such datasets. The methods used in  [57] [58] [59] [60] [61]  explore the videos to detect activities in spatial and temporal domains simultaneously. Some methods  [61, 62]  employ a supervoxel approach to perform spatiotemporal detection, while others use human detectors  [60, 63]  and treat the detection problem as a tracking problem  [57, 59]. Most of these approaches require object detection for a more accurate detection and therefore, demand exhaustive annotation of objects in long videos which is a tedious and time-consuming process.
K-means algorithm is used for the clustering where the optimal value of K is calculated based on the Bayesian Information Criterion (BIC)  [82]. We define a scene model as a set of scene regions (topologies) at different resolutions: SceneModel =< Topology highlevel , Topology midlevel , Topology lowlevel >. We create a model with topologies at three levels, each aims to describe the scene at a high, medium and low degree of abstraction. Figure  2  depicts an example of the calculated scene regions in a hospital room in Centre Hospitalier Universitaire de Nice (CHU) dataset (https://team. inria. fr/stars/demcarechu-dataset/).
5. The similarity score of the created HAM and trained HAM models are calculated and the activity with the highest score is selected as the target activity. Once the activity models are trained, to find the one that matches with an activity in a test video, we follow a Bayesian scheme. We choose the final label using the Maximum A Posteriori (MAP) decision rule. If Ω = {ω 1 ,. , ω S }, where S = |Ω| represent the set of generated activity models and given the data for an observed test video, ω , we select the activity model, ω i , that maximizes the likelihood function (Equation (  16 )): p(ω |ω i ) = p (ω ) p (ω i |ω ) p (ω i ) , ( 16 ) where p (ω i |ω ) denotes the likelihood function defined for activity models ω 1 ,. , ω s in model set Ω. We assume that the activity models are independent.
GAADRD Dataset The GAADRD  [84]  activity dataset consists of 25 people with dementia and mild cognitive impairment who perform ADLs in an environment similar to a nursing home. The GAADRD dataset is public and was recorded under the EU FP7 Dem@Care Project (http://www. demcare. eu/results/ datasets) in a clinic in Thessaloniki, Greece. The camera monitors a whole room where a person performs directed ADLs. The observed ADLs include: "Answer the Phone", "Establish Account Balance", "Prepare Drink", "Prepare Drug Box", "Water Plant", "Read Article", "Turn On Radio". A sample of images for each activity is presented in Figure  7  (top row). Each person is recorded using an RGBD camera of 640×480 pixels of resolution. Each video lasts approximately 10-15 min. We randomly selected 2/3 of the videos for training and the remaining for testing.
CHU Dataset This dataset is recorded in the Centre Hospitalier Universitaire de Nice (CHU) in Nice, France. The hospitals collecting the dataset have obtained the agreement of an ethical committee. Volunteers and their carers have signed informed consent. Data have been anonymized and can be used only for research. It contains videos from patients performing everyday activities in a hospital observation room. The activities recorded for this dataset are "Prepare Drink", "Answer the Phone", "Reading Article", "Watering Plant", "Prepare Drug Box", and "Checking Bus Map". A sample of images for each activity is illustrated in Figure  7  (middle row). Each person is recorded using an RGBD Kinect camera with 640 pixels × 480 pixels of resolution, mounted on the top corner of the room. The hospital dataset is recorded under the EU FP7 DemCare project (https://team.
DAHLIA Dataset The DAHLIA dataset  [85]  consists of a total of 153 long-term videos of daily living activities (51 videos recorded from three different views) from 44 people. The average duration of the videos is 39 min containing 7 different actions (and a Neutral class). The considered ADLs are: "Cooking", "Laying Table", "Eating", "Clearing Table ", "Washing Dishes", "Housework", and "Working" (Figure  7i-l ). To evaluate this dataset, we followed a cross-subject protocol in order to compare our results with existing literature.
Evaluation Metrics We use various evaluation metrics on each dataset to evaluate our results and compare it with other approaches. For the GAADRD and CHU datasets, we use Precision and recall metrics. True Positive Rate (TPR) or recall is the proportion of actual positives which are identified correctly: TPR = TP TP+FN. The higher the value of this metric, the better is the performance. Similarly, Positive Predictive Value (PPV) or precision is defined as: PPV = TP TP+FP. We also use F-score in our comparisons. The detected intervals are compared against the ground-truth intervals and an overlap higher than 80% of the ground-truth interval is considered as a True Positive detection of that activity. For evaluation of the unsupervised framework, as the recognized activities are not labeled, there is no matching ground-truth activity label for them.
RA is the set of recognized activity instances and GT shows the set of ground-truth labels. We evaluate the performance of the framework based on the inferred labels. These labels are used for calculating the Precision, Recall, and F-Score metrics. COR(RA, GT) =       In order to evaluate the DAHLIA dataset, we use metrics based on frame level accuracy. For each class c in the dataset, we assume TP c , FP c , TN c , and FN c as the number of True Positive, False Positive, True Negative, and False Negative frames, respectively. Therefore, Frame-wise accuracy is defined as: FA 1 = ∑ c∈C TP c ∑ c∈C N c , where N c is the number of correctly labeled frames compared to the ground-truth. F-Score is defined as: F -Score = 2 |C| ∑ c∈C P c ×R c P c +R c where P c and R c are precision and recall metrics of class c, respectively.
Results and Discussion First, the results and evaluations of the three datasets are reported and then compared with state-of-the-art methods. Different codebook sizes are examined for the Fisher vector dictionaries: 16, 32, 64, 128, 256, and 512. Table  1  and Figure  8  show the accuracy of activity detection based on Precision and Recall metrics using the feature type with the highest accuracy. In the case of the GAADRD dataset, the best result achieved with incorporated Motion Boundaries Histogram in Y axis (MBHY) descriptor in the activity models with codebook size set to 256. Based on the obtained results, there is no special trend regarding the codebook size. For some features (MBHY and TDD spatial), the performance increases with an increase in the codebook size and drops when the codebook size becomes much bigger.
For TDD temporal feature, performance increases linearly with the codebook size. For the geometrical features, particularly for the Angle feature, there is a big drop of performance with bigger codebook sizes. For others (HOG, HOF), medium-size codebook performs the best. Finding an optimal codebook size is challenging. Small datasets usually work better with smaller codebook size, and as the datasets' size grows, the codebook performs better. Regardless of the codebook size, MBHY descriptor performs better than other features in this dataset. The MBH descriptor is composed of X (MBHX) and Y (MBHY) components. As the activities involve many vertical motions, MBHY descriptor is able to model the activities better compared to the other dense trajectory descriptors and even deep features. It can be noticed that the performance of temporal deep features gets better as the codebook size gets bigger.
On CHU dataset, the unsupervised framework achieves promising results (Table  2  and Figure  9 ). Similar to the GAADRD dataset, the effect of codebook size is different for different descriptor types. For MBHY descriptor, the accuracy increases as codebook size grow, whilst, it has the opposite effect on TDD appearance features. Differently, the accuracy increases and then decreases for TDD temporal feature. It can be observed that a bigger codebook size results in better performance. This trend is different from GAADRD dataset and the reason might be because of the larger size of this dataset. TDD temporal features demonstrate a better performance than deep appearance features (TDD spatial). Similarly, due to the similar background of the activities, temporal information shows better results.
MBHY achieves the best performance on this dataset. The abundance of vertical motions in the performed activities helps the MBH descriptors to reach better recognition performance. Among appearance features, HOG descriptor shows a better performance since it can encode the appearance information efficiently, where it even outperforms deep appearance features. Detailed analysis (Figure  10 ) indicates that the framework has difficulty in recognition of "Watering Plant" activity. It confuses this activity with all the other activities. The short duration of this activity leads to insufficient capture of local dynamic information resulting in recognition issues. The reason for the confusion of the other activities lies mainly on similar motion patterns of the sub-activities. Moreover, this dataset consists of activities recorded from subjects lateral view which makes recognition of those classes of activities challenging.
Comparisons This section summarizes the evaluations and comparisons conducted on GAADRD (Section 4. 5), CHU (Section 4. 6), and DAHLIA (Section 4. 7) datasets. The results obtained from our proposed framework on GAADRD and CHU datasets are compared with the supervised approach in  [75] , where videos are manually clipped. Another comparison is made with an online supervised approach that follows  [75]  using a sliding window scheme. The activity models are evaluated with another version of the models  [86]  that does not embed local dynamic information (in this version, the score of the local descriptor attribute is omitted and not considered in the final score). A further comparison is performed with a Hybrid framework  [87]  that combines supervised and unsupervised information in the HAM models.
GAADRD Dataset Table  3  represents the comparison of our results with the reported performance on GAADRD dataset. In all approaches that use body motion and appearance features, the feature types with the best performances are selected. It can be noticed that using models equipped with both global and local motion features, the unsupervised obtains high sensitivity and precision rates. Compared to the online version of  [75] , thanks to the learned zones and discovered activities, we obtain better activity localization, thereby a better precision. Using only dense trajectories (not global motion) this online method fails to localize activities. For the "Watering Plant" this method can not detect any instances of this activity in the test set, hence, the Precision, Recall, and F-Score rates are zero.
On this dataset, the unsupervised method always performs better than the "Online Supervised" approach and significantly outperforms the sequential statistical boundary detection (SSBD) method. It also outperforms another unsupervised version of the framework while no descriptor information is used in the activity models. Only the supervised methods surpass our unsupervised models. The reason is that the supervised method works with pre-clipped activity videos and overlooks the challenging task of temporal segmentation of activity samples from the original video flow.