dataesr/scientific-paragraphs-categorization huggingface dataset:
We also excluded psychiatric admissions from our selection by removing records whose primary diagnosis code was related to mental and behavioural disorders (ICD F00-F99 except F10-F19), leading us to remove the 74,618 records and 18,170 patients who had only psychiatric admissions. We then randomly selected one record of each patient as the index admission and we predicted 30-day readmission after the discharge from the index admission. To define the care episode of the index hospitalization, we connected DAD records that are considered continuation of care, by using the criteria described in Appendix A. From the list of patients with an index admission (n = 428,669), we randomly divided the data into 11 equal parts. One of these was selected for the holdout test set. The remaining 10 pieces were used to perform 10-fold cross-validation for comparing models.
Features based on the twenty most common lab tests were additionally created (Appendix A). Lastly, we identified the presence of four chronic conditions (asthma, hypertension, chronic heart failure, and diabetes) using algorithms validated by Tonelli et al. [32]  that use ICD9-CM/ICD10 codes. We extracted income, employment, housing status, citizenship status, and education level of the first three digits of the postal code of each patient from the 2020 Canadian Census of Population dataset  [33]  using the Postal Code Conversion File [34], but later removed these features as they did not improve model performance.
Machine learned features In addition to the manual features, we extracted feature vectors using machine learning techniques from longitudinal health records of each patient, which cover at least four years prior to their index admissions and originate from various data sources. The number of these records (a proxy for healthcare usage) varies considerably between patients. In this paper, we use Word2Vec  [35]  (from Python's NLTK library, specifically, the Continuous Bag-of-Words implementation), an unsupervised technique borrowed from natural language processing, to encode the longitudinal information. Word2Vec not only summarizes, but also enriches the data by encoding related concepts from different data sources (e. g. , a diagnosis code and a related medication) as similar numeric vectors rather than treating them as incomparable.
In this process, we first created patient "sentences", formed by collecting all medical data entries (ICD codes, ATC codes, codes representing different events such as an emergent admission, etc. ) associated with a patient and sorting them chronologically. In the sentence, each word is a diagnosis code or a procedure code or an ATC code, etc. For example, if a patient accrued "K65", "1. SQ. 52", and "J01DH" in this order in the data, their associated sentence would be "K65 1SQ52 J01DH". More details are available in Appendix B. The Word2Vec learner then effectively creates fixed-length numeric representations of each word (medical code) based on the context within the sentences. Roughly speaking, words that tend to appear together in proximity in sentences receive numeric representations that are close.
Model training We considered learning both logistic regression (LR) and gradient boosting machine (GBM) models for predicting readmission from our patient representations. GBMs encompass ensemble learning techniques that use many base learners, such as decision trees, to build a sequence of prediction models; and later, to predict for a novel instance, it aggregates the predicted outcomes from those individual base models. We note that our main objective is not a thorough comparison of machine learning models and we chose GBM as an example of machine learning models for illustration. GBM has parameters adjusting its training process and we used the default setting of the Python library scikit-learn  [36]  in all of our comparisons. In addition, we used a set of manually selected training parameters that are expected to lead to a better performance  [37] , to observe the impact of training parameters (called GBM Tuned).
The manually selected parameters were: learning_rate = 0. 01, max_depth = 8, and n_estimators = 1000. For definitions of these parameters, please see the scikit-learn GBM documentation  [38]. In addition, an LR model based on the LACE score  [39]  was evaluated as a baseline. The LACE Score was developed and validated using the Canadian Discharge Abstract Database and has been externally validated  [40]  and become the industry standard for readmission risk prediction, which was our motivation to test LACE as a baseline in this study. All classification models described above were implemented in Python using scikit-learn.
Alcohol use disorder (AUD) also called alcohol dependence is a major public health problem, which affects almost 10% of the world's population. Baclofen as a selective GABA B receptor agonist has emerged as a promising drug for the treatment of AUD, however, its optimal dosage varies according to individuals, and its exposure-response relationship has not been well established yet. In this study, we use a principled Bayesian workflow to estimate the parameters of a pharmacokinetic (PK) population model from Baclofen administration to patients with AUD. By monitoring various convergence diagnostics, the probabilistic methodology is first validated on synthetic longitudinal datasets and then, applied to infer the PK model parameters based on the clinical data that were retrospectively collected from outpatients treated with oral Baclofen.
Clinical data In this study, we used the routine clinical data retrospectively collected from 67 adult outpatients with AUD treated with oral Baclofen in the Department of Addictology at Sainte Marguerite Hospital, Marseille, France. Ethics committee approval and patient consent are not compulsory in France to use retrospective therapeutic drug monitoring data, so no informed consent had to be collected. All patients met the DSM-5 criteria for AUD  (American Psychiatric Association, 2013). The data has been thoroughly described and published in a previous study by  Imbert et al. (2015). The clinical event schedule (dosing and measurements) of each subject is specified according to the Nonlinear Mixed Effects Modeling software (NONMEM,  (Beal et al. , 2009) ) conventions. The number of observations is subject-dependant, with a total of 427 recordings.
Synthetic data Using synthetic data for fitting allows us to validate the inference process as we know the ground-truth of the parameters being estimated. Therefore, we can use standard error metrics to measure the similarity between the inferred parameters and those used for data generation. Synthetic data were generated following the same event schedule as empirical clinical data and using a one-compartment population model with first-order absorption (see Eq. (  1 )). The synthetic data was generated using the R package mrgsolve  (Baron, 2022) , which enables simulation from ODE-based hierarchical models, including random effects and covariates. The mrgsolve package  (Elmokadem et al. , 2019)  uses Livermore Solver for Ordinary Differential Equations (LSODE; LSO) of the Fortran ODEPACK library  (Hindmarsh, 1992)  integrated in R through the Rcpp  (Eddelbuettel and Francois, 2011)  package.
Following  Gelman et al. (2014b) , WAIC is given by: WAIC = -2(lppd -p eff ), (6) where lppd is the log pointwise predictive density for a new data point (as the accuracy term 3  ), and p ef f is the effective number of parameters (as penalty term to adjust for overfitting)  4. In practice, we can replace the expectations with the average over the draws from the full posterior to calculate WAIC (for more details see  Gelman et al. (2014b) ). Note that WAIC uses the whole posterior distribution rather than the point estimation used in the classical information criteria such as AIC and BIC. Finally, the relative difference in WAIC is used to measure the level or the strength of evidence for each candidate model under consideration. The lower value of WAIC indicates a better model fit. Following  Burnham and Anderson (2002) , a relative difference larger than 10 between the best model (with minimum WAIC) and other candidate models indicates that an alternative model is very unlikely (i.
Visual predictive checks usually depict the predicted mean and 95% confidence/credibility intervals (2. 5% and 97. 5% empirical quantiles of the posterior predictive draws) confronted with observed data. Note that PPCs are not predictive per se because we are not comparing predicted data to new observations but rather we compare it to the same data that the model was fitted with. Such a process involves double use of the data and is not to be confused with validation prediction which is evaluated on a separate validation dataset or unseen data (e. g. , using WAIC). Systematic discrepancies between model predictions and data would indicate an inadequate model predictive power and in this case, could be investigated to identify model failures.
Solving ODE systems in Stan Linear ODE systems have the virtue of being analytically solvable, which not only provides an exact solution but is also very computationally efficient. The one-compartment linear ODE system (Eq. ( 1 )) was solved analytically as provided by the Torsten library ready-to-use solver. Torsten package  (Zhang et al. , 2021)  is based on Stan software (v2. 27. 0) and provides functions that facilitate the analysis of pharmacometrics data  (Margossian et al. , 2021). The library handles clinical event schedule data written in NONMEM  (Beal et al. , 2009)  conventions and the computation of steady-state dosing 8. A steady-state is reached when the quantity of drug eliminated matches the quantity of drug that reaches the systemic circulation. In the context of a repeat-dose regimen, steady-state concentrations of drugs in the blood will rise and fall according to a repeating pattern as long as the dosing schedule remains unchanged.
Torsten also offers specific functions for oneand two-compartment models for which it implements analytical solutions with matrix exponential in Stan language. ) and is eliminated from the plasma with constant k10 = CL/V (h -1 ). (B) One-compartmentsimulated (in blue) and empirical (in red) data corresponding to plasma drug concentration (mg/L) for a single individual and additional simulated data (in green) from the same dosing schedule.
Bayesian inference on synthetic data In order to validate the Bayesian workflow, a synthetic dataset is generated from a one-compartment population model with first-order absorption, based on the same dosing schedule as the clinical setting, and with population PK parameters as CL pop = 7 (L/h), V pop = 65 (L), k apop = 2. 5 (h -1 ). Inter-individual variations ω = (ω CL , ω V , ω ka ) are equally set to 0. 3, and residual intra-individual variation σ is set to 0. 1. An example of simulated drug concentration data compared to empirical observation for a single individual (for 67-subject) is shown in Figure  1. Bayesian inference of unknown parameters of the underlying data generating process depends on both observed responses and prior information about the underlying generative process. For the generated dataset, we aim to explore the actual sensitivity of the inference process to the level of information encoded in priors.
1: L ∼ lkj_corr_cholesky(η = 1) (11) ω ∼ Half-N (0, 0. 1). Individual parameters (normalised without covariate influence) denoted by θ i = {CL i , V i , k ai } N i=1 are modeled by a Gaussian distribution centered on population parameters θ pop = {CL pop , V pop , k apop }, log(θ i ) ∼ N (log(θ pop ), Ω) ∀i. ( 13 ) Given the parameters θ i for the i th individual, the virtual amount of drug in both absorption and plasma compartments is computed by analytically solving the one-compartment ODE system given by Eq. (  1 ). Here, we employed a ready-to-use one-compartment model solver provided by Torsten package for event schedule specified data  (Zhang et al. , 2021). Estimation of drug concentration in the blood for individual i, with unknown C i underlying observations C i [obs], is given by C i (t) = ŷcentral i (t) V i , with the likelihood of log(C i [obs]) ∼ N (log( C i [obs]), σ).
Moreover, the estimation of posterior density of CL pop is more robust than the other two parameters. The robustness of the sampling of CL pop w. r. t. other parameters was also observed in the ESS plots (Figure  3 ). According to these results, the Bayesian set-up used in model I substantially improved the convergence of the recovery for population PK parameters. Posterior predictive checks. Posterior predictive (or retrodictive) checks are a widely used tool to verify the reliability of the fitted model by monitoring its predictive performance on the fitted dataset. Synthetic datasets (67 individuals, total of 427 observations) of plasma drug concentration are repeatedly drawn from the predictive distribution given by the fitted model (4 chains, each with 2000 draws). Punctual predictions (mean) and the corresponding 95% credible intervals are extracted from the draws and plotted along with the actual observations (see Figure  6 ).
Note that the root mean squared error  (RMSE, Figure B. 11 , and Table 1) as a within-sample predictive accuracy is slightly smaller in model II; this is consistent with the marginal posterior densities (Figure  4 ) where the interaction of the likelihood with more diffuse priors fails to recover the true parameters; hence, the resulting model fits the observed data even better but at the cost of a poor representation of the true data generating process  (Betancourt, 2018; Gelman et al. , 2017). Model selection. Lastly, to select the best Bayesian model considered in this study for the synthetic dataset, we use the widely applicable information criterion (WAIC) as a measure of model evidence. WAIC is an indicator for the comparison of point-wise out-of-sample predictive accuracy of Bayesian models, based on the whole estimated posterior distribution.
Predicted Baclofen plasma concentration datasets (N = 4 chains × 2000 draws) are generated from the estimated predictive distribution (see Figure  8 ). Each shown data-point corresponds to an actual individual observation (in red). The posterior predictive checks are shown for all individual observations (in blue). For every individual observation, the corresponding punctual prediction (mean) and 95% confidence interval over the repeated simulations are also plotted (in light blue). No systematic deviation of predictive simulations from reality is visible, suggesting accurate capturing of plasma concentration by the fitted model's predictive distribution. Covariates. Clinical data includes 18 biological covariates which are detailed in  Imbert et al. (2015). The influence of a continuous covariate (denoted by COVAR) on individual parameter θ i is modeled by θ i,COVAR = θ i COVAR i median(COVAR) ρ.
2000; Buchert & Ostermann 2012; Buchert et al. 2013). Thepackage is based on the relativistic Zel'dovich approximation (RZA) for the evolution of the kinematical backreaction Q D  (Buchert & Ostermann 2012; Buchert et al. 2013) , i. e. the Q D Zel'dovich approximation (QZA)  (Roukema 2018). This approach uses a flow-orthogonal foliation of spacetime and a Cartan co-frame formalism. This allows for an approach that is effectively 'nonlinear' in the context of linear perturbation theory. For example, and the QZA can be used to derive the curvature and density 'Ω' parameter dependence on the expansion rate during dark-matter halo collapse without needing restrictive simplifications such as Birkhoff's law or spherical symmetry  (Roukema & Ostrowski 2019; Vigneron & Buchert 2019; Ostrowski 2020 ).
2017)   4. The package  (Barrera-Hinojosa & Li 2020)  is not yet public, but should be distributable with a CECILL-compatible licence if it is derived from the code  (Teyssier 2002) , since the latter is licensed under CECILL. Accurate modelling of non-linear 3-Ricci (spatial) curvature is a key challenge that all of these software packages need to meet if they are to be used to test the hypothesis that structure formation leads to recently emerging negative mean curvature that physically explains 'dark energy'  (Räsänen 2006; Nambu & Tanimoto 2005; Kai et al. 2007; Räsänen 2008; Larena et al. 2009; Chiesa et al. 2014; Wiegand & Buchert 2010; Buchert & Räsänen 2012; Wiltshire 2009; Duley et al. 2013; Nazer & Wiltshire 2015; Roukema et al. 2013; Barbosa et al. 2016; Bolejko & Célérier 2010; Lavinto et al.
2. 3. 2. Time matching between a pair of original and expected FLRW models is discussed in Sect. 2. 3. 3. The relations for the FLRW scale factor solutions for the perturbed models for the specific codes are given for (Sect. 2. 3. 4) and (Sect. 2. 3. 5). The software details of inserting the perturbations in the codes are briefly described in Sect. 2. 4. 1 for and in Sect. 2. 4. 2 for. Results are presented in Sect. 3. We discuss in Sect. 4 and conclude in Sect. 5. This package aims to be fully reproducible  (Akhlaghi et al. 2021 ), with a source package at zenodo. 5806028 5  and live 6  and archived  7 repositories. This paper was produced with git commit 54398b7 of the source package, which was configured, compiled and run on a Little Endian x86_64 architecture.
Choice of projection The package works with a three-dimensional grid of particles and data fields, scattered across a lattice created by a C++ library 2  (Daverio et al. 2016 ). The biverse nature of the model is built as in standard perturbation theory, as stated above, in the Poisson gauge. In the Poisson gauge, there is an unperturbed background, which we refer to here as the reference model to avoid ambiguity, and in parallel there is a nearly identical, but perturbed, universe. However, the aim of the model of is to evolve the perturbed model in a background-free way, i. e. , independently of the reference model. Whether or not this aim is achieved is a question which the current work partly investigates. An obvious role of the reference-model dependence is that the scale factor evolution of the reference model, r ( ) (or r ( )), is an FLRW solution that in the code is evaluated independent of the evolution of structure in the simulation.
The expected FLRW evolution e FLRW / r is also plotted as a dashed line, but is visually indistinguishable from the numerically measured value. The residual (Eq. (  22 )) shows the numerical differences between these two curves. Top: EdS reference model; bottom: ΛCDM. Plain-text data for this figure and Fig. 4  at zenodo. 5806028/inhomog_scale_factors_EdS. dat, zenodo. 5806028/inhomog_scale_factors_LCDM. dat. mean per-mesh-cell curvature term, allows a flat perturbation that is either decaying or growing, as derived in App. A (the Raychaudhuri equation is derived in App. B). Only one of these two solutions is allowed in. This can be seen as follows. Equations (2. 9) of  Adamek et al. (2016a)  for the older form of the line element, and eq. (  9 ) of  Adamek et al. (2017)  for the form used here, Eq.
Software pipeline We would like the reader to be able to straightforwardly reproduce  (Rougier et al. 2017 ) our results, i. e. , check the method and obtain identical results using precisely identified versions of highlevel software, lower level software libraries, compilers and input values. We provide the full calculation pipeline for this paper using the Maneage template  (Akhlaghi et al. 2021 ; see also  Akhlaghi 2019; Infante-Sainz et al. 2020; Peper & Roukema 2021 ) which aims to provide a solution to the 'reproducibility crisis' in science  (Peng 2015; Baker 2016; Fanelli 2018). Using the free-licensed source package, available as a version of record at zenodo. 5806028 and in live and archived repositories, the aim is that the reader should be able to produce the results of this paper on any Unix-like operating.
Scale factor ratios e Φ i =0 / r for a standard simulation (dotted line); e Φ i =0. 001 / r for a simulation with an initial potential perturbation Φ i = 0. 001 (solid line); and the expected FLRW evolution of e FLRW / r (as defined in Sect. 2. 3. 5; dashed line), for the decaying mode (negative square root in Eq. A9). Top: EdS reference model; bottom: ΛCDM. The sudden increase in value for the perturbed simulation (solid curve) at an early time step is the effect of the Φ i offset being inserted into the simulation, and this datapoint is removed from residuals to improve readability. The expected and actual curves match prior to this initial peak in the curve, by construction. Plain-text data for this figure and Fig. 6  at zenodo. 5806028/gevolution_scale_factors_EdS. dat, zenodo. 5806028/gevolution_scale_factors_LCDM.
dat. system. Git commit hashes are used to identify contributing software sources and the full package itself. In particular, git commit 54398b7 of the source package was used to produce this paper. For each code, we test both an EdS reference model, in which emergent volume growth may match that of the ΛCDM observational proxy, and a ΛCDM reference model itself. While the amount of extra volume growth is not intended to be matched to observations in this paper, since the aim is to test the accuracy of the codes against the known FLRW solution, it is still preferable to use realistic values. Thus, the EdS reference model constants are Ω m r 0 = 1. 0, Ω Λ r 0 = 0. 0, and r 0 = 37. 7 km/s/Mpc, as explained above (Sect. 2;  Rácz et al. 2017; Roukema et al. 2017). The ΛCDM reference model constants are Ω m r 0 = 0.
2. 4. 1 The package  (Roukema 2018; Roukema & Ostrowski 2019 ) is a free-licensed C program and library that implements the relativistic Zel'dovich approximation (RZA) for the evolution of the kinematical backreaction Q D  (Buchert & Ostermann 2012; Buchert et al. 2013) , i. e. the Q D Zel'dovich approximation (QZA)  (Roukema 2018). The core functions of the library calculate the domain-averaged volume evolution represented by D ( ) := D ( ), using the RZA estimate for Q D ( ), given an input of the initial values of the three invariants I, II, III of the extrinsic curvature in a comoving spatial domain in a flow-orthogonal time foliation. This is used in the -body simulation context by generatingbody simulation initial conditions from a power spectrum using -  (Prunet et al. 2008 ) and using the extension of  (Teyssier 2002)  as a front end.
(  15 )). The code is highly modular. The numerical core of is 2, a library containing tools for solving equations of classical lattice field theory. The code runs efficiently either on a personal computer of limited computational power or on a large computer cluster, depending primarily on the particle resolution. The goal of testing is to determine whether the code is currently ( -1. 2-0404c0b) able to handle a global perturbation while intervening only minimally in the internal code structure. In order to test the effect of a spatially uniform global perturbation alone, we first provide an input power spectrum of perturbations with zero amplitude. In the initial cycle of generating the particle distribution, we modify the function generateIC_basic() in the file ic_basic. hpp, adding a step that allows the insertion of a uniform perturbation in the scalar gravitational potential Φ.
The optional insertion of the perturbation and the perturbation's amplitude are controlled in the initial settings file. The code outputs the reference model scale factors and other parameters. A patch file with our exact set of modifications is provided in the reproducibility package of this paper and is archived at Software Heritage 10. When we refer to -1. 2-0404c0b, strictly speaking we mean -1. 2-0404c0b as modified using this patch file. We again calculate the expected FLRW scale factor evolution using a shell script independent from the simulation code being tested, apart from the shared use of Φ i and Φ i. The reasoning is presented above 10 https://archive. softwareheritage. org/ swh:1:cnt:043550246bb1c9c26664a0dbebedb334693033b1 in Sect. 2. 3. 5. 2. The conversion of initial scale factors to obtain e i is given in Eq.