dataesr/scientific-paragraphs-categorization huggingface dataset:
Discussion By breaking the diffraction barrier, super-resolution fluorescence microscopy is providing optical access to microanatomical structures in live brain tissue. This has allowed geometric analysis of dendritic spines and axons, providing new insights into their biological function  (10; 31). However, geometric analysis of dendritic spines in super-resolution images is currently still a manual process, which inevitably introduces variability and bias, and is very time-consuming. Here, we introduce SpineJ, a new software to extract geometric information about nanoscale details of dendritic spines. The strength of SpineJ lies in its ability to analyze spine neck geometry in a quick and reproducible manner, returning measurements in absolute units of size, which was not possible before.
The software is based on a structured workflow design, where all user inputs are related to spine selection, after which automatic measurements are directly obtained from the original image. This sequence separation of spine selection and analyses provides a strong protection against user bias, as validated by the low variability of measurements performed by different users. We validated the performance of SpineJ by comparing it with manual analysis. Importantly, SpineJ systematically reported a smaller minimal neck width than manual analysis, reflecting the fact that SpineJ systematically measures neck width all along the full extent of the neck and thus can reliably find the true minimal value, unlike manual analysis, which is a more "hit-ormiss" approach. In addition, the high variability associated with manual analysis of spine heads shows that elliptical shapes are a poor representation for spine heads.
Users could use the hand-drawn ROI tool to properly account for discontinuous borders, but the task would then become even more complex and lengthy. By contrast, SpineJ achieves a robust estimation of spine heads without making any assumptions about their shapes. Finally, combining robust image processing techniques with very simple user-interactions (a few mouse clicks) and instant visual feedback (preview, overlay, statistics) minimizes the time spent on analyzing each spine. While this gain in time was already significant during our tests with a rather small dataset (30 spines in 3 dendritic segments), it would surely increase with user fatigue when analyzing hundreds of spines. Contrary to manual analysis, which is designed for a specific task and cannot be easily extended, the workflow used in Spi-neJ allows going beyond measurements used in the literature.
Furthermore, our approach also goes further in model learning by proposing the generation of dependency graphs. The latter show in a simple way the directional dependencies observed among components. We believe that this kind of graph completes the behavioural models and will be helpful to evaluate different kinds of model properties, e. g. , testability or security. In the paper, we define component dependency over three expressions formulating these situations: direct component requests, nested requests and data dependency. This definition aims to avoid the inference of ambiguous dependency relations involving one component to several potential components. We performed an empirical evaluation based on event logs collected from 9 case studies to assess the precision of the models and of the dependency graphs.
THE CKTAIL APPROACH Given an event log, collected by monitoring tools on a system under learning denoted SUL, CkTail extracts traces, generates one IOLTS for every component or software of SUL involved in the communications and builds its dependency graph. Here, an IOLTS aims at generalising the behaviours encoded in event logs with inputs and outputs showing the messages received and sent by a component. The ability of CkTail to infer models is dependent on several realistic assumptions made on SUL: • A1 Event log: the communications among the components can be monitored by different techniques, on components, on servers, by means of wireless sniffers, etc. But, event logs have to be collected in a synchronous environment made up of synchronous communications. Furthermore, the messages have to include timestamps given by a global clock for ordering them.
A trace gathers messages exchanged between components interacting together in a limited time delay (A1). And, a chain of messages sharing the same data expresses a data dependency among several components. This chain of messages must be kept in the same trace (A2). During this process, the component interactions are also analysed for detecting component dependencies. These dependencies are given under the form of component lists c 1 c 2. c k expressing that a component c 1 depends on a component c 2 , which itself depends on another component and so on. The set Deps gathers these component lists. The example of set Deps of Figure  1  captures several dependencies. For instance, d 1 G is given by req1 as c 1 directly calls G. d 1 Gd 2 is given from the nested requests req1req3, showing that d 1 calls G, which itself calls d 2 before answering to d 1.
PRELIMINARY EVALUATION Our approach is implemented in Java and is released as open source at https://github. com/ Elblot/CkTail. With this implementation, we conducted some experiments in order to provide answers for the following questions: • RQ1: can CkTail derive models that capture correct behaviours of SUL? RQ1 studies how the models accept valid traces, i. e. traces extracted from event logs but not used for the model generation, compared to the model learning tools specialised for communicating systems; • RQ2: can CkTail build models that reject abnormal behaviours? This time, RQ2 investigates how the models accept invalid traces; • RQ3: is CkTail able to detect accurate dependencies among components?.
We also extracted a log from another IoT system denoted Con f 7, where 8 sensors send data to a gateway. We were unable to build models from any of these configurations with CSight after 5 hours of computation, which was our limit for each experiment. We observed that the first steps of CSight 4. 2 RQ1: Can CkTail derive models that capture correct behaviours of SUL? To measure model correctness, we used a cross validation process, which partitions the event logs of every configuration Conf1 to 7 in one training set for the model generation and one testing set. We limited the process to one round, as segmenting an event log cannot arbitrarily be done: we choose to separate an event log into two parts with an approximative ratio of 70% and 30%, taking care not to separate actions that belong to the same session thanks to our knowledge of the configurations.
We show that our approach outperforms available alternatives under all circumstances, with a greater power to detect phenotypic differences across species group when they exist, and a low risk to improperly detect inexistent differences. Finally, we provide an empirical illustration of our pMANOVA on a geometric-morphometric dataset describing mandible morphology in phyllostomid bats along with data on their diet preferences. Our approach, implemented in the R package mvMORPH, provides efficient multivariate phylogenetic regression tools for understanding what shapes phenotypic differences across species.
Along with other areas of biological sciences, the study of phenotypic traits is experiencing the omics revolution: the "phenome", which describes the various phenotypic characteristics of organisms, is defined by a large number of multivariate anatomical and behavioral traits  (Deans et al. 2015). For instance, high resolution morphological datasets are becoming increasingly available across the tree of life thanks to computerized tomography techniques (e. g. ,  Cooney et al. 2017; Cross 2017; Felice and Goswami 2018). These datasets have the potential to dramatically improve our understanding of the factors that influence species phenotypes over macroevolutionary time scales. While high-dimensional phenotypic datasets are being collected at an ever-increasing scale, the statistical machinery necessary to analyze such datasets is lagging behind.
phylo function implemented in "geiger"  (Harmon et al. 2008). This approach uses the conventional (non-phylogenetic) MANOVA to fit the regression model and compute associated multivariate test statistics (e. g. , the Pillai's trace, Wilks' ߣ, Lawley-Hotelling, and Roy's largest root tests; see a detailed review in  Rencher 2002) ; the significance of the test is then assessed using simulations under the multivariate Brownian process (BM). To the best of our knowledge, maximum likelihood estimation of the multivariate PGLS regression model for testing the effect of continuous explanatory variables, pMANOVA for testing the effect of categorical independent variables (grouping of species), and pMANCOVA for testing the effect of categorical independent variables while accounting for the effects of other continuous variables (covariates), are not implemented in the popular R language.
In highdimensional settings (as the number of traits p approaches or exceeds the number of species n) the situation becomes even worst, as the evolutionary (or trait) variance-covariance matrix is singular, which prevents the use of likelihood-based techniques  (Clavel et al. 2019). Evolutionary biologists circumvent these current limitations for treating highdimensional phenotypic datasets in two ways. A first approach consists in "reducing" the data to its principal component axes (PCs), after which the simulation-based approach on a reduced set of axes (p<n) and/or univariate phylogenetic regressions on individual axes are performed. The PC axes are obtained using either conventional (i. e. non-phylogenetic) or phylogenetic principal component analyses  (PCA or pPCA, Revell 2009; Uyeda et al.
Indeed, the Euclidean distance approach sums the Sum of Squares (SS) across traits without accounting for Cross Products (CP) between traits. As a result, distance-based approaches using Euclidean distances are expected to be sensitive to unequal variances across the response variables and to the relationship between dispersion and effect change (e. g. the direction of variation across groups in relation to the main axis of variance) in the multidimensional space  (Anderson 2001; McArdle and Anderson 2001; Warton et al. 2012). Using other distances -such as generalized or Mahalanobis distances  (Mahalanobis 1936 ) -would avoid these issues, but would require inverting the evolutionary (traits) variance-covariance matrix, which would be possible only in low dimensional settings. In addition to these limitations, current implementations of the approach assume Brownian evolution and might be sensitive to departures from this assumption and/or to measurement errors that are likely to arise in large datasets.
Recently, we developed a framework, inspired from regularization techniques often used in conventional multivariate statistics (e. g. ,  Friedman 1989; Hoffbeck and Landgrebe 1996; Warton 2008; Witten and Tibshirani 2009) , for fitting a variety of trait evolutionary models (BM, Pagel's lambda, Orstein-Uhlenbeck, Early Burst) to high dimensional phenotypic data  (Clavel et al. 2019). Our approach uses penalized likelihood (e. g. ,  Fan and Li 2001; Warton 2008; van Wieringen and Peeters 2016)  to estimate evolutionary variancecovariance matrices under these models. Here, we build on this promising framework to develop phylogenetic regression techniques and associated tests (multivariate pGLS, pMANOVA, pMANCOVA) that can be applied to high-dimensional phenotypic datasets, while accounting for the amount of phylogenetic covariations actually present in the model residuals (e.
g. by jointly estimating Pagel's ߣ  (Pagel 1999) ). We implement this approach in the mvMORPH package  (Clavel et al. 2015). We also implement similar functions to perform multivariate pGLS, pMANOVA and pMANCOVA models using maximum likelihood inference when p<n. We use extensive simulations to compare the performance of our approach to current alternatives, using the MANOVA as a case study. We illustrate the utility of the proposed method by analyzing the relationship between diet preferences and a geometric morphometric dataset describing mandible morphology in phyllostomid bats  (Monteiro and Nogueira 2011). Previous analyses on a subset of PC axes suggested that phyllostomid bats have evolved into well differentiated ecomorphs  (Monteiro and Nogueira 2011). Here we revisit these results using both our phylogenetic regularized MANOVA and the distance-based approach on the full multivariate superimposed Procrustes coordinates.
Multivariate Phylogenetic Regressions and Associated Tests We aim to test the potential effect of predictors (continuous and/or categorical) on p continuous traits from a comparative dataset comprised of a (ultrametric or non-ultrametric) phylogeny of n species (extinct or extant) with associated measured traits (mean trait value for each species). These tests can be performed by fitting generalized least squares (GLS) linear models of the form: ൌ બ (1) Where Y is the ݊ ൈ ‫‬ matrix of observed traits (response variables), X is a ݊ ൈ ‫ݍ‬ design matrix constructed from the observed predictors (e. g. each continuous predictor is encoded in one column in X, each categorical predictor is encoded in one or several columns using dummy variables, and there can be an additional column of 1 for the intercept), B is a ‫ݍ‬ ൈ ‫‬ matrix of unknown coefficients describing the dependencies of traits to the predictor variables (slopes and intercepts for continuous predictors and mean traits for categorical predictors), and બ is a ݊ ൈ ‫‬ matrix of errors distributed according to a matrix-normal distribution ࣧࣨ , ሺ0, , ሻ  (Gupta and Nagar 1999).
Following  Clavel et al. (2019) , we find the optimal value for ߛ and the estimator ሺߛሻ by maximizing the leave-one-out cross-validated (LOOCV) log-likelihood corresponding to a "ridge" penalized log-likelihood (Appendix 1). Inverting ሺߛሻ provides us with a regularized estimate of from which the test statistics are computed. Finally, we approximate the distribution of a given test statistic using a permutation procedure, following the general approach of permuting the residuals under the reduced model  (Freedman and Lane 1983; Anderson and Braak 2003)  and borrowing ideas from bootstrapping procedures (e. g. ,  Pennell et al. 2015; Khabbazian et al. 2016). We simulate several (999 in what follows) new datasets ൌ ۱ ଵ ଶ ⁄ ઢ ෩ where each ઢ ෩ is a matrix of permuted residuals obtained by permuting the rows of ઢ ൌ ۱ ିଵ ଶ ⁄ ൫ െ ൯, and compute the test statistic corresponding to each of these datasets using our penalized likelihood procedure.
This procedure provides an approximate distribution of the test statistic which is used to assess statistical significance (see also  Hall and Wilson 1991  for general guidelines on non-parametric estimation of null distribution). In addition to this procedure, where ߛ, , , and are optimized by maximizing the LOOCV on each of the permuted datasets, we consider a more efficient (approximated) procedure that consists in first transforming the "tests" and "training" samples used in the LOOCV, similar to the one used by  Warton (2008). This approach (detailed in Appendix 2) is approximate as it assumes that is fixed across the permuted datasets; here we take to be the penalized likelihood estimate obtained from the empirical data.
Implementation We implemented the fit of the multivariate phylogenetic least squares in the mvgls function in the R-package mvMORPH publicly available on CRAN  (Clavel et al. 2015)  and on gitHub (https://github. com/JClavel/mvMORPH). The option "method" allows a user to fit the linear model either by likelihood (when ‫‬ ݊ െ ‫,ݍ‬ "LL") or by penalized likelihood ("LOOCV"). The linear hypothesis tests are implemented in a separate function called manova. gls. This function takes as input an object of class "mvgls", output of the mvgls function, and allows performing the parametric (when ‫‬ ݊ െ ‫ݍ‬ ,) as well as the (exact and approximate) permutation-based hypothesis testing. The user can also perform general linear hypothesis testing by specifying specific matrices in the "L" (contrasts coding matrix) and "rhs" (righthand side matrix) options (Supplementary Material).
We also offer the possibility to perform parallel calculus (forking) using the base package "parallel" in R to compute the permutationbased distribution of the test statistic. The functions mvgls and manova. gls are structured as the lm and manova functions from the stats base R-package (R Development Core Team 2016). In our simulations, we used Pagel's ߣ phylogenetic model for computing C  (Pagel 1999) , with a unique lambda common to all traits. This phylogenetic model is useful from a statistical point of view as it can be seen as a mixed model where both a Brownian motion diffusing along the branches of the tree and random independent noise contribute to interspecies trait variation  (Housworth et al. 2004 , see also the Supplementary Material in  Clavel et al. 2019). This flexibility should allow accommodating a range of phylogenetic signal compared to methods that rely exclusively on Brownian motion and has been shown to reduce the risk of model misspecification in univariate phylogenetic regressions  (Revell 2010).
pgls had an error in the permutation procedure that lead to very high type I errors (results not shown) and iv) the regularized PL-MANOVA we developed here (with both the exact and the approximated permutation strategies). We also used the simulationbased MANOVA on datasets that were reduced to their three first PC (prcomp in R) and phylogenetic pPC axes (phylo. pca in phytools, Revell 2009;  Uyeda et al. 2015). Finally, we performed as a benchmark the conventional (non-phylogenetic) MANOVA based on ordinary least-squares  (Rencher 2002)  using the lm and manova R base functions. In our simulations we fixed the number of species to ݊ ൌ 32 and varied the number of traits p from 5 to  100 (p=5, 15, 25, 31, 50, 100). We simulated phylogenetic trees under a pure-birth process, scaled to unit height, using the pbtree function in "phytools"  (Revell 2012).
We considered three different values of ߣ, held identical across traits ሺߣ ൌ 0, 0. 5, 1ሻ. These values represent scenarios ranging from traits showing no phylogenetic signal (ߣ ൌ 0) to traits having evolved by Brownian motion (ߣ ൌ 1). We simulated random covariance matrices R with varying degree of average correlation between traits (ߩ ൌ 0. 2, 0. 5, 0. 8): we sampled matrices from a Wishart distribution with degree of freedom fixed to ݂݀ ൌ 100 ݊ and parameter matrix Σ ൌ ఘ /݂݀, where ఘ is a p by p matrix with off-diagonal entries ߩ and diagonal entries 1 using the rwishart function in the "dlm" package  (Petris 2010 ). In comparison with previous approaches (e. g. in  Uyeda et al. (2015)  and  Clavel et al. (2019) ), this approach allows controlling for the average amount of correlation between traits.
3 (0. 6 for convenience in the first scenario; see details of the procedure in the Supplementary Material). We also considered two alternative scenarios for the distribution of the binary predictor with respect to the phylogenetic relationships (Fig  1e, f ). In the first scenario, the first 16 species (in the tip. label "ape" phylo object in R) were assigned mean vector ଵ , and the 16 last species the mean vector ଶ. Given that pure-birth trees tend to produce balanced topologies, this first strategy imposes a strong phylogenetic structure in the distribution of the binary predictor (Fig  1e ). In the second scenario, the group labels were alternated across consecutive tips leading to a more dispersed distribution of the binary state predictor on the tree (Fig  1f). We simulated 1000 datasets for each parameter set  [p=(5, 15, 25, 31, 50, 100) , ߣ ൌ ሺ0, 0.
5, 1ሻ and ߩ ൌ ሺ0. 2, 0. 5, 0. 8ሻ ] and scenario [no difference, shift along the first, second, or all eigenvectors, and phylogenetic structure of the binary predictor]. Finally, we performed the various tests on each dataset and recorded the number of datasets for which a significant difference between groups was found. When ‫‬ ݊ െ ‫,ݍ‬ this resulted in 8 tests per dataset. When ‫‬ ݊ െ ‫,ݍ‬ only the distance-based MANOVA, the simulation-based MANOVA on PC (and pPC) axes, and the regularized PL-MANOVA were performed (4 tests). Importantly, our GLS-MANOVA (when ‫‬ ݊ െ ‫)ݍ‬ and PL-MANOVA (when ‫‬ ݊ െ ‫,ݍ‬ or ‫‬ ݊ െ ‫)ݍ‬ estimate phylogenetic signal in the model residuals using Pagel's ߣ when performing the tests. The other tests assume either no phylogenetic signal (conventional MANOVA based on OLS), or Brownian motion (the distance-based and simulation-based approaches, as well as approaches using pPC axes computed using phylo.
pca). All the analyses were performed on a Linux platform with R version 3. 4. 4 (R Development Core Team 2016). Species are colored according to Grouping 1 (high mastication in orange, low-mastication in blue). The two groups are well separated on the third axis of variation of the size-shape dataset. c) Illustration of the landmarks (in red) and semilandmarks (in green) used for describing the mandible shape in  Monteiro and Nogueira (2011).
Empirical Illustration: the evolution of the mandible in phyllostomid bats We applied our PL-MANOVA on a high-dimensional comparative dataset ( ‫‬ ݊ െ ‫ݍ‬ ) describing mandible form (size and shape) for 49 species of phyllostomid bats (leaf-nosed bats) with respect to their diet. We used the phylogenetic tree and mandible data from  Monteiro and Nogueira (2011)  which consists of 11 anatomical landmarks and 25 semilandmarks for 2D coordinates (aligned by Procrustes Generalized Analysis; see Figure  2 ), as well as the logarithm of the condylobasal length used as a proxy for size (totaling 73 variables forming a size-shape space;  Mitteroecker et al. 2004 ). In their original study,  Monteiro and Nogueira (2011)  used five different diet categories (frugivores, insectivores, carnivores, nectarivores, and sanguivores).
DISCUSSION We developed new regularized multivariate statistics and associated tests (PGLS, phylogenetic MANOVA and MANCOVA) for assessing the effect of continuous and/or categorical predictors on high-dimensional phenotypic datasets in a phylogenetic context. We focused on the MANOVA to test the performance of these tests using simulations and expect the performance of the other tests to be similar, as they rely on the same penalized-likelihood framework. The penalized-likelihood tests outperform current alternatives in both low ( ‫‬ ݊ െ ‫ݍ‬ ) and high ( ‫‬ ݊ െ ‫ݍ‬ ) dimensions. They are more powerful for detecting differences among groups, in particular when these differences do not only occur on the first axis of variation. By estimating the amount of phylogenetic signal from the data, they also avoid false positives that can occur when ignoring phylogenetic signal (e.
g. using nonphylogenetic multivariate statistics) or when overestimating this signal (e. g. assuming a Brownian structure in the residuals). Applying these new methods to phyllostomid bats, we found a significant effect of diet on mandible morphology that would not have been detected by other methods. We highlighted two main aspects of multivariate comparative datasets that impact the ability of current statistical tests to detect the effect of predictors on trait data and the Type I error rate associated with these tests. First, the direction of the variation matters (Fig. 1 ); previous studies that have investigated the statistical performances of phylogenetic multivariate linear regressions or MANOVA  (Goolsby 2016; Adams and Collyer 2018a, b)  have focused on scenarios where differences between groups or relationships between explained and explanatory variables are expressed along the main axis of variation (e.