dataesr/scientific-paragraphs-categorization huggingface dataset:
Methods The analysis presented below was performed with Carl Zeiss' ConfoMap as a derivative of Digital Surf's MountainsMap® software. Since the results are not specific to ConfoMap but are valid for any derivative of MountainsMap® featuring the SSFA module, we refer below to "MountainsMap" for simplicity and generality. Note however that the raw 3D surface data and the surface analysis (https://doi. org/10. 5281/zenodo. 6645445), as well as the statistical analyses (https://doi. org/10. 5281/zenodo. 7219855 and https://doi. org/10. 5281/zenodo. 7219884), explicitly mention ConfoMap.
Because the surfaces for the Sheep dataset had already been cleaned of aberrant peaks before (see section 2. 1. 1), steps 3-4 were not applied on these surfaces. The result surfaces (studiables after step 5) were saved manually in the uncompressed SUR format (for version 7. 2 or older). This is crucial as the new compressed format (default when exporting the resulting studiables through templates) is not interpreted correctly by Toothfrax: Asfc value are extremely inflated (> 1000). Note that in this analysis, as in some recent studies (e. g. Arman et al. , 2016; Winkler, Schulz-Kornas, Kaiser, & Tütken, 2019; Ackermans et al. , 2020; Pedergnana, Calandra, Evans, et al. , 2020; Pedergnana, Calandra, Bob, et al. , 2020; Winkler et al. , 2021) , the SSFA was run on scale-limited surfaces because form and measurement noise were filtered out prior to analysis.
80 and 64° for NA = 0. 90). Even accounting for scattering on rough surfaces, slopes > 80° are very likely to result in aberrant points; keeping these aberrant points would artificially increase the fractality. Some surfaces had very high ratios of NMP (≥ 20%). While these surfaces were processed, they were excluded from the statistical analysis (see section 2. 2. 3). For surfaces with less than 20% NMP, it should be noted that the NMP are isolated rather than concentrated (see results on Zenodo). Additionally, we ran the statistical analyses on two sets of surfaces: surfaces with NMP ratio < 5% and surfaces with NMP ratio < 20% (see section 2. 2. 3). Altogether, we argue that this processing ensures data quality by removing aberrant points and does not substantially alter the degree of fractality of the surfaces.
SSFA The SSFA was performed in two software packages: MountainsMap version 8. 2. 9767 with the SSFA module, and the original Toothfrax software. The latter followed the steps detailed in  Scott et al. (2006) , except for the maximum scale of the area-scale computation, which was reduced from 7200 to 1200 µm 2. This setting was modified to avoid erroneous calculations of Asfc when Smfc is very high (> 1200 µm 2 ; see also section 4. 1 below). We did try with a maximum scale of 7200 µm 2 but Smfc was never higher than 300 µm 2. This means that limiting the maximum scale to 1200 µm 2 does not change the results in this case. Since the Tfv parameter is not available yet in MountainsMap, Sfrax was not used. The same settings were used in MountainsMap; all other settings were set to the default values.
Since the SSFA module is relatively new, we provide a more detailed workflow here. First, a length-scale SSFA was conducted on rows; two parameters were calculated: epLsar and NewEpLsar, both calculated at 5° intervals and at the 1. 8 µm scale of observation by default. Second, an area-scale SSFA was conducted on four corners; five parameters were calculated: R 2 , Asfc, Smfc, HAsfc9 (3×3 subregions) and HAsfc81 (9×9 subregions). Note that due to the small size of the analyzed surfaces for the guinea pig and lithic datasets (Table  1 ), HAsfc81 was considered only for the sheep dataset and was excluded from the Bayesian analysis (see section 2. 2. 3). Other HAsfc parameters with splittings from 2×2 to 11×11 are also available but were not used. Both analyses were performed with the full data, i.
e. the option "draft analysis" was deactivated. R 2 is the coefficient of determination for the curve of relative area versus scale. It can be seen as a quality indicator (the higher the value, the better), but it is usually not used in dietary or functional interpretations. The results of the SSFA in MountainsMap for each surface can be freely accessed in both MNT and PDF formats on Zenodo (https://doi. org/10. 5281/zenodo. 6645445).
Descriptive statistics The CSV output files from Toothfrax and MountainsMap were first imported, formatted and merged. Descriptive statistics were then calculated and boxplots were plotted; two surfaces from the lithic dataset (section 2. 1. 3), as well as all surfaces with ≥ 20% NMP (section 2. 2. 1), were excluded for these steps. All statistical analyses were performed in the open-source software R version 4. 1. 2 (R Core Team, 2021) through RStudio version 2021. 9. 1. 372 (RStudio Team, 2021)  for Microsoft Windows 10. The following packages were used: doBy version 4. 6. 11 (Højsgaard & Halekoh, 2021) , ggh4x version 0. 2. 1. 9000 (van den Brand, 2021), ggplot2 version 3. 3. 5  (Wickham, 2016) , openxlsx version 4. 2. 4  (Schauberger & Walker, 2021) , R. utils version 2. 11. 0  (Soler, 2022) , rprojroot version 2.
0. 2  (Müller, 2020)  and tidyverse version 1. 3. 1  (Wickham et al. , 2019). The scripts were written as R markdown (*. Rmd) files and rendered to HTML and GitHub (i. e. Markdown, *. md) documents using the packages knitr version 1. 36  (Xie, 2014 (Xie, , 2015 (Xie, , 2021) )  and rmarkdown version 2. 11  (Xie et al. , 2018 (Xie et al. , , 2020;; Allaire et al. , 2021). The research compendium was created in R using the packages rrtools version 0. 1. 5 (Marwick, 2019 ) and usethis version 2. 1. 3 (Wickham et al. , 2021). The R computing environment (packages and their versions) was incorporated into the research compendium using the package renv version 0. 14  (Ushey, 2021).
Bayesian statistics Overview. In order to test the influence of the different software packages on the surface parameters Asfc, epLsar, HAsfc9, Smfc, R 2 and NewEpLsar, a Bayesian multi-factor ANOVA was applied on each surface parameter. As mentioned in section 2. 2. 2, HAsfc81 is relevant only for the sheep dataset and was therefore excluded from the Bayesian analysis. This method uses models to relate the dependent variables (measurement outcomes, i. e. surface parameters) to the independent variables (factors, i. e. treatments, software, samples; see below) which are assumed to influence the former. It can ultimately be used to compute whether the effects of factors differ significantly. Similar Bayesian statistics have been successfully applied as multilevel and multivariate Bayesian models to explain surface parameter variation measuring micro-topography of bone surfaces  (Martisius et al.
Treatment (diet and cleaning procedures, e. g. clover, dry bamboo, BrushNoDirt) is the second factor x2, and sample is the third factor x3. Three models were built. Different factor combinations were defined for the respective models. The first model examined the differences due to software, considering the effects of treatment and sample, for each of the surface parameters except NewEpLsar. In other words, it looks at the differences due to software for each individual surface within each treatment. It allows us to test whether the two software packages produce statistically identical values. In this model, all three factors (x1, x2 and x3) were considered but not their interactions, as the sample factor (x3) already explains most of the data and our goal was to test whether the software packages differ conditionally on all treatments and samples.
We refer to this model as the "Three-factor model". The second model was used to inspect the differences in treatment due to software. In this case, individual surfaces were not considered anymore. The goal was to compare the discrimination power between treatments of each software package, for each of the surface parameters except NewEpLsar. Thus, the factors software and treatment (x1 and x2, respectively) and their interaction were used. We call this model "Two-factor model". The last model was applied to test whether the NewEpLsar parameter (only calculated in MountainsMap) discriminates treatments in the same way as the standard epLsar (from both software packages) does. A model using only the treatment factor (x2) was used. This is the "NewEpLsar model". All models were run twice: a first time on surfaces with less than 5% NMP ("strong filter"), and a second time on surfaces with less than 20% NMP ("weak filter"; see section 2.
Ivan Calandra et al. In all models, for every single measured surface parameter, the predicted value μ is related to the factors by a linearized model, which is given by (1)  =  0 +  1  1 +  2  2 +  3  3 +  1  12  2 +  1  13  3 +  2  23  3 where all possible terms up to the second order are included. The terms of the equation (  1 ) can be understood as follows: β0 is a real number that indicates the overall order of magnitude of the measured values. β1 is a vector of length 2 that contains the effect strengths of choosing the respective software, while x1 is a vector that indicates the level of factor 1, i. e. x1 is [0, 1] when choosing the first level of factor (Toothfrax) and  [1, 0]  when choosing the second level (MountainsMap). The same applies to β2 and x2, but here with 11 different levels for each treatment (4 diets for the sheep dataset, 3 diets for the guinea pig data and 4 cleaning procedures for the lithic dataset), and to β3 and x3 with 140 levels (40 analyzed surfaces for the sheep dataset, 70 for the guinea pig data and 30 for the lithic dataset).
M12, M13 and M23 are matrices that indicate the effect strength of the particular combination of two factors. Joint modeling of all three datasets in a single large model improves the estimates of quantities that occur in all datasets (e. g. the effect of the software factor), because there are more samples to calculate the posterior with. However, the effects of the treatments were analyzed within each dataset. The predicted value µ is related to the observed value y by (2)  ~ (, , ) where t denotes a Student's t distribution with mean µ, standard deviation σ, and ν degrees of freedom. Priors were chosen so that they cover the whole range of the data. This way, the posterior is mostly influenced by data and not by prior. This was achieved in three steps: (1) by using hierarchical priors, i.
(2016). When performing the sampling, the results have to be checked for consistency based on the trace plots and on the energy plots of Hamiltonian Monte Carlo (see notebooks in the folder "Python_analysis/code/" on Zenodo). All models were also visually inspected by providing prior-predictive (see "prior_predictive" plots in the folder "Python_analysis/plots/" on Zenodo) and posterior-predictive (see "prior_posterior_predictive" plots in the folder "Python_analysis/plots/" on Zenodo) plots. These show the distribution of hypothetical data based on the prior and posterior respectively, thus being easy interpretable. The visual inspection helps in assessing whether the prior indeed covers the whole data range, how well the posterior fits the data, and how large the uncertainty in the parameter estimation is.
By selecting the appropriate terms of the general model shown above and providing prior distributions for all remaining model parameters, the model gets adapted to the question at hand. Kruschke (2015, section 15. 4. 1) provides further insight into model selection for typical analysis questions and was used as guidance. We built three different models: the Three-factor, the Two-factor and the NewEpLsar models (see above). A detailed, graphical description of the models is given in the Supplementary Information 1. In order to compare the levels of the factors, we computed contrasts, i. e. the probability distribution of the difference in posterior between any two levels of a factor. The contrasts are then plotted (see "contrast" and "treatment_pairs" plots in the folder "Python_analysis/plots/" on Zenodo): the x-axis shows the possible values for the difference and the curve gives the probability (technically: probability density) that each of these values is the "true" value.
If 95% of the values are away from 0, i. e. if the 95% high probability density interval (HDI) does not include 0, then the two levels are significantly different. In the three-factor model, the contrast between the two levels of the software factor (β1 in equation (  1 )) was computed, excluding the effects of treatment and sample. In the two-factor model, the contrasts between levels of treatments (β2 in equation (  1 )) belonging to the same datasets were computed, for each software individually, taking the interaction terms (M12 in equation (  1 )) into account as well. Lastly, for the NewEpLsar model, the contrasts between levels of treatments (β2 in equation (  1 )) belonging to the same datasets were computed. For the analysis in the Python programming language version 3. 8. 5 (Van Rossum & Drake, 2010), the following free and open-source software packages were used: ArviZ version 0.
9. 0  (Kumar et al. , 2019) , pandas version 1. 1. 2 (Reback et al. , 2020) , matplotlib version 3. 3. 1  (Hunter, 2007) , NumPy version 1. 19. 2  (Harris et al. , 2020) , seaborn version 0. 11. 0 (Waskom, 2021), and PyMC3 version 3. 9. 3 (Salvatier et al. , 2016). A Docker image of the analysis is available on Zenodo (https://doi. org/10. 5281/zenodo. 7219884).
Results The complete research compendium (including both R and Python analyses) is freely available on GitHub (https://github. com/tracer-monrepos/SSFAcomparisonPaper); for long-term accessibility, a release (version 3. 1) has been uploaded to Zenodo (https://doi. org/10. 5281/zenodo. 7219855). The goal of the present study is not to formally compare the discrimination power among treatments between the Bayesian analysis presented here and the analyses presented in the original publications. Nevertheless, a qualitative comparison is presented in Supplementary Information 2. The three-factor model shows that, when accounting for variations due to treatments (diet for animals and cleaning procedures for lithics) and samples (individual 3D surfaces), Asfc, epLsar, HAsfc9 and R 2 are significantly different when calculated with the two software packages (i.
e. 95% HDIs do not include 0; Figs  1 2 3 4 ). HAsfc81 was not statistically analyzed because it is only relevant for the sheep datasets, for which larger surfaces were analyzed (see sections 2. 2. 2 and 2. 2. 3). Nevertheless, it seems to follow the same trend as HAsfc9 (Fig. 1 ). Smfc could not be analyzed due to a few extremely high values. Graphically, it seems that in general MountainsMap produces values that are higher than Toothfrax. This pattern becomes apparent when some of these extreme values in the sheep and lithic datasets are excluded (see "R_analysis/plots/SSFA_plots-Smfc. pdf" on Zenodo). When analyzing all surfaces with less than 20% NMP, the results vary only slightly: Asfc, epLsar, HAsfc9 and R 2 are again significantly different when calculated with the two software packages (compare files of the "filter_strong" and "filter_weak" runs for the three-factor model in the folder "Python_analysis/" on Zenodo).
HAsfc81 (sheep dataset) and Smfc follow the trends mentioned above. Yet, as shown by the two-factor model (i. e. when samples are not accounted for), these differences did not obscure most of the differences in treatment within each dataset (Fig. 5 ; see also treatment pair plots in the folder "Python_analysis/plots/statistical_model_two_factors_filter_strong/" on Zenodo). Nine of the 60 pairwise comparisons (15 contrasts for each of the four surface parameters) yielded different results between the two software packages, five of which on R 2 (Table  2 ). Additionally, there is no pattern in these different contrasts. In other words, none of the software is better at discriminating the treatments than the other, whether considering any single surface parameter or dataset, or taking all parameters into account.
In summary, even though the two software packages produce significantly different results at the level of individual surfaces, roughly the same significant differences in treatment were found independently of the software used. When analyzing all surfaces with less than 20% NMP, even less differences appear between the discriminations of the two software packages (compare files of the "filter_strong" and "filter_weak" runs for the two-factor model in the folder "Python_analysis/ " on Zenodo). This could result from the noise introduced by the lower quality data (NMP ≥ 5%) blurring the signal. Even though the values for NewEpLsar (calculated in MountainsMap only) are much higher than the values for epLsar (from both software packages; Figs  1 2 3 ), they mostly discriminate the treatments in the same way as the epLsar values do (Fig.
6 ; see also treatment pair plots in the folder "Python_analysis/plots/statistical_model_neweplsar_filter_strong/" on Zenodo). There are six differences out of 15 contrasts, though (Table  3 ). Interestingly, in those six cases, NewEpLsar always gives results different from Toothfrax's epLsar, although it does not always agree with MountainsMap's epLsar (i. e. NewEpLsar sometimes discriminates differently from epLsar in general). When analyzing all surfaces with less than 20% NMP, one more difference appears between the discriminations NewEpLsar compared to epLsar (compare files of the "filter_strong" and "filter_weak" runs for the NewEpLsar model in the folder "Python_analysis/ " on Zenodo). This could result from the noise introduced by the lower quality data (NMP ≥ 5%) "faking" a signal.
Discussion We compared Toothfrax and MountainsMap's SSFA module by analyzing the same surfaces with both software packages using the same settings; Bayesian multi-factor ANOVAs were then used to assess the significance of the divergences. The surfaces are derived from three datasets of experimental samples (guinea pig and sheep teeth, and flint and quartzite flakes) and the values range over several orders of magnitude (epLsar from 0. 00017 to 0. 00917, Asfc from 0. 79 to 68. 22 and HAsfc9 from 0. 07 to 10. 32; Figs  1 2 3 ; see also table "/R_analysis/summary_stats/SSFA_summary_stats. xlsx" on Zenodo https://doi. org/10. 5281/zenodo. 7219855). We therefore assume that it is very likely that the findings will apply to other types of surfaces as well.
Comparing Toothfrax and MountainsMap outputs The results of the three-factor model show that the two software packages do produce divergent results. The effect on Asfc is very large (Fig. 4a ), but the effects on the other parameters are small (Fig. 4bd ). Nevertheless, Asfc, epLsar and HAsfc9 are all significantly higher when calculated with MountainsMap (Figs  1 2 3 ). Different calculations of HAsfc and epLsar in the two software packages could explain the differences on these parameters. HAsfc is normally defined as median absolute deviation (MAD) divided by the median of values  (Scott et al. , 2006) : (3) 𝐻𝐴𝑠𝑓𝑐 𝑑𝑒𝑓𝑖𝑛𝑖𝑡𝑖𝑜𝑛 = 𝑀𝐴𝐷 𝑥 ̃= 𝑚𝑒𝑑𝑖𝑎𝑛(|𝑥 𝑖 -𝑥 ̃|) 𝑥 ̃ with xi being the individual Asfc values for each subregion, and  ̃ being the median of the Asfc values of all subregions. However, in Toothfrax, HAsfc is calculated using the mean instead of the median: (4) 𝐻𝐴𝑠𝑓𝑐 𝑇𝑜𝑜𝑡ℎ𝑓𝑟𝑎𝑥 = 1 𝑥 ̃1 𝑁-1 ∑ |𝑥 𝑖 -𝑥 ̃| = 𝑚𝑒𝑎𝑛(|𝑥 𝑖 -𝑥 ̃|) 𝑥 ̃ HAsfc has been implemented in Mountains Map in the same way as in Toothfrax (eq.
The difference could also be a result of the higher number of points per surface used in MountainsMap's SSFA module, especially at the smallest scales. Toothfrax's point spread settings can be used in MountainsMap's SSFA too, but this is not the default (the default settings were used here). Another potential source of difference is that Toothfrax calculates by default a regression of order 2, while MountainsMap uses a regression of order 1. Although not tested in the Bayesian models due to some very extreme values, it seems that Smfc is higher when computed with MountainsMap than with Toothfrax (Figs 1-3; see also "SSFA_plots-Smfc. pdf" in the folder "/R_analysis/plots/" on Zenodo https://doi. org/10. 5281/zenodo. 7219855). Unlike Toothfrax, MountainsMap has rules to avoid calculating Smfc over an inappropriate range of scales (i.
e. smallest or largest scales). This could explain the different results. We conclude that the complexity (Asfc) and heterogeneity (HAsfc) parameters are calculated at different scales with the two software packages using the default settings. We propose that this difference in Smfc could actually be the source of the differences in Asfc and HAsfc (together with differences in the pavement algorithms, see below). It is therefore possible that the differences in complexity and heterogeneity would disappear if they were calculated at the same scale in both software packages, i. e. if both software packages would calculate Smfc the same way. In MountainsMap, it is possible to manually adjust the range of scales over which the regression is calculated; it could therefore be tested whether the two software packages produce the same Asfc and HAsfc values when Smfc values are identical.
Another potential source of the differences between the two software packages concerns the pavement algorithm in the area-scale method (used for all parameters but epLsar and NewEpLsar). In this method, triangles of a given area are used to cover (i. e. pave) the topography. A general description of this pavement is given in different standards (ASME B46. 1 and ISO 25178-2); however, this description is conceptual and leaves some freedom for the implementation. Depending on the choices of the developers, the results of the area-scale analysis may be slightly different. In MountainsMap and Toothfrax, the pavement starts in one corner and paves the surface in successive bands by placing a south-west-oriented triangle and then a north-east-oriented triangle, these triangles sharing one side. At the end of each band, there is a zone that cannot be covered by triangles because there is not enough space left.
Similarities and differences within each dataset When surfaces are not considered individually anymore but instead grouped within treatments (diets for animals, e. g. clover or dry bamboo, and cleaning procedures for lithics, e. g. BrushNoDirt) in the twofactor model, the values calculated by both software packages usually discriminate the same treatments within each dataset. There are exceptions to this (Fig. 5 , Table  2 ). Nevertheless, these differences concern only nine out of 60 contrasts (15 treatments pairs for four parameters), that is, 15%; when excluding R 2 (not used in functional interpretations), only four out of 60 contrasts (6. 67%) are different. It could be that epLsar is more discrimant when calculated with Toothfrax, and Asfc and HAsfc with MountainsMap (Table  2 ), but this is very speculative with only the four differences.
The effect detected on Asfc in the three-factor model is very large (mean difference in posterior = 2. 3, Fig. 4a ), yet both software packages discriminate the treatments in the exact same way for all but one contrast (Fig. 5a  and Table  2 ). The effects on epLsar and HAsfc9 are much smaller (mean difference in posterior = 0. 00012 and 0. 029 respectively; Fig. 4b-c ), but they still do influence some of the treatment discriminations (Fig. 5b-d ). This means that these differences are large enough to influence the functional interpretations of the results in some cases.