dataesr/scientific-paragraphs-categorization huggingface dataset:
2010 ). When possible, modalities with less than 10% of prevalence were grouped with others based on medical relevance. As a result, both the Smoking (8. 3% with smoke = Yes) and Alcohol intake (5. 2% with alco = Yes) variables were ruled out to cluster data and were only used for a posteriori clusters description. Moreover, some modalities were aggregated for the 2 following variables: • Glucose (gluc): modalities 2 (above normal, 8. 8%) and 3 (well above normal, 9. 5%) were grouped into one modality 2 (above normal) • BMI (BMI): modalities "underweight" (0. 5%) and "normal" were grouped into one modality "underweight & normal". Finally, the dataset used to perform MCA contains a total number of 9 categorical variables (age, BMI, high sbp, high dbp, hypertension, gluc, gender, cholesterol, physical activity).
12; related percentage of variance explained: 9. 8%). Moreover and for interpretation purposes, eigenvalues were corrected using the Benzécri correction 21 to consider that the binary coding scheme used in MCA creates artificial factors and therefore reduces the inertia explained  (Greenacre 1984). The top 3 components gather 99. 9% of inertia after correcting with Benzécri method (more details in Appendix in section C). 21 One may prefer the Greenacre adjustment to Benzécri correction, which tends to be less optimistic than the Benzécri correction. Please note that both methods are not currently implemented in the proposed R packages and must therefore be implemented by data scientists if desired. R code for Benzécri correction is provided in Appendix in section B.
Parameters specification The CLARA algorithm was used through the pamk() function in the FPC R package (version 2. 2-5), a reliable package for flexible procedures for clustering, and with the following main parameters: • Distance measure: dissimilarity matrix was computed using the Manhattan distance. The latter is more robust and less sensitive to outliers than the standard Euclidean distance  (Jin et al. 2010 ). • Number K of clusters: From 3 to 11. -The number of clusters was optimized on the Average Silhouette Width (ASW) quality measure, that is an internal validity metric reflecting the compactness and separation of the clusters. The ASW is based on Silhouettes Width that were calculated for all patients in the best sample, i. e. , the one used to obtain cluster medoids and generate clusters  (Rousseeuw 1987 ).
-The range of clusters to be tested was determined to enable the identification of phenotypically similar subgroups while not generating an excessive number of subgroups for interpretation. • Number of samples and sample size: 100 samples of 5% study population size (1,706 patients). -Experiments have shown that 5 samples of size 40+2C (with C the number of variables in input) give satisfactory results  (Kaufman et al. 1990 ). However, increasing these numbers is recommended (if feasible), to limit sampling biases and favor converging toward the best solution. Equally, the higher the sample size is, the higher it is representative of the entire dataset. We therefore recommends to pretest on his own material up to what parameters values the computation times are acceptable considering the size of the input dataset and the other steps of the workflow (including the clusters stability evaluation step, the most time consuming).
Other parameters include the non-scaling of the input data to not modify the observation space obtained from MCA. Results: The optimal ASW was obtained for a pool of 3 clusters (ASW: 0. 42, see Figure  5 ). Homogeneity and separability of clusters were further studied by analyzing Silhouettes Width of patients in the best sample used to generate the clusters' medoids, using the fviz silhouette() function in the factoextra R package. As a reminder, the Silhouette Width characterizes both the cohesion of the cluster and its separation to the other clusters: a positive (respectively negative) Silhouette Width for a patient is in favor of a correct (respectively incorrect) affiliation to its own cluster. The Figure  6  shows a high level of intra-cluster cohesion and inter-clusters separability as only few patients (in clusters 2 and 3) have negative Silhouettes.
• Bootstrap approach: -This approach consists in performing the clustering as described in section 4. 2. 3 on B = 50 bootstrapped data (i. e. random sampling with replacement  (Efron 1979 ; Efron and R. J. Tibshirani 1994)), using the clusterboot() function in the FPC R package (version 2. 2-5). -The Jaccard similarity metric is used to compute, for each cluster, the proximity between the clusters of patients obtained on the modified population and the original clusters. It is given by the number of patients in common between the new cluster (modified population) and the original cluster divided by the total number of distinct patients considered (i. e. present in either the new or the original cluster). -For each cluster, the following results are provided: * the mean of the Jaccard similarity statistic * the number of times the cluster has been "dissolved", defined as a Jaccard similarity value ≤ 0.
Results: Clusters are all the more stable as the Jaccard similarity statistics and the number of recovered clusters are high, and as the number of dissolved clusters are low. The results of the data perturbation step are: • For the bootstrap approach, clusters 1, 2 and 3 have all 100% of Jaccard similarity statistics over 50 iterations. The 3 clusters were recovered for 100% of bootstrapped iterations, which characterizes a very high stability to resampling with replacement. • For the noise approach, clusters 1, 2 and 3 have at worst (for 2% of noise) 100%, 98%, 96% of Jaccard similarity statistics respectively over 50 iterations. The 3 clusters were recovered for 100% of iterations and regardless of the level of noise (from 1% to 10%), which characterizes a very high stability to noise. Regardless of the method used, the results seem therefore to be very robust and can certainly be explained by the large database's size and the small number of clusters retained in a context of synthetic data.
Equally, in the case of very large data, CLARA algorithm may be too time-consuming to be calculated as we still need to maintain enough samples and observations per sample for representativeness. For all these reasons, one suggests simply analyzing a random sample of the original dataset that is likely to be very representative of the latter while allowing the use of the Qluster workflow. Please note that PCA() and FAMD() are known to take more time for computation than MCA(). As a consequence, the notion of "large" data may depend on the nature of data  (continuous, categorical, mixed). One also suggests (when possible) in a data preparation step to converge into one type of data (continuous only or categorical only). This is especially true for mixed data where the upstream scaling of the data can be challenging, and where the computation times by FAMD are more important.
Alternatives may consist in not using the proposed workflow but algorithms which go fast on (very) large data such as Mini Batch K-means used on continuous variables or on one-hot-encoded categorical variables. However, in addition to the fact that it relies on the Euclidean distance only, these strategies may not allow the beforehand use of factor analysis because of data's size, as well as to easily and properly assess clusters' stability, which hinders confidence and support in results. One therefore recommends the first option. Generalizability of this workflow to missing data Missing values are not covered in this workflow, and it is therefore assumed that no missing values are present in the dataset. Indeed, both factor methods (PCA, MCA, FAMD) and proposed clustering methods (PAM, CLARA,.
) require data without missing values. However, this workflow can be easily generalized to missing data, using the same missMDA package as for performing the selection of the optimal number of dimensions in factor analysis, in order to impute in a first step missing values using factor methods. The latter are state-of-the-art methods for handling missing values (e. g. function imputePCA(), imputeMCA() and imputeFAMD() for simple imputations  (Audigier et al. 2013) ) and can thus easily be integrated and/or used in an automated workflow to handle missing data. In addition, this R package makes it possible to perform multiple imputations (MIPCA(), MIMCA() and MIFAMD()) for assessing incertitudes from imputed values and increasing confidence in results  (Josse, Pagès, et al. 2011). In this sense, the Qluster workflow is therefore adapted for handling missing data (see below in Fig.
e. , hard partitioning), -suitable to the Manhattan distance, a less sensitive to outliers distance, unlike its counterpart on the euclidean distance (K-means), -requiring few parameters to set up (e. g. conversely to HAC and DBSCAN, see Fahad et al. (  2014 )), -very well implemented within a recognized reference R package (the FPC package) facilitating its use within a complete and robust clustering approach, -usable within the same R function (pamk()) regardless of the volume of data, Yet, it is clear that other algorithms than the ones chosen could be routinely used instead, including those present in the FPC R package to facilitate its integration within the workflow (e. g. DBSCAN, Mixture model and HAC). In particular, it is well known that with non-flat geometry and/or uneven cluster size, DBSCAN is more appropriate than K-means and PAM.
Equally, if the final goal is to obtain a hierarchy rather than a unique hard partition, the user will be encouraged to prefer an algorithm such as HAC, which can easily be used with the proposed packages in this workflow. However, the presence of additional parameters to tune and the lack of compatibility with massive data would require the workflow to become more complex. Equally, the user may want to benchmark several clustering algorithms as suggested in Hennig (2020). Such strategy is directly implemented in the clusterbenchstats() function from the FPC R package or in the clValid() function of the clValid R package. However, as our goal is to propose a simple-to-use workflow, this complexification -which would greatly impact computing times and memory capacities -is left to the user's discretion.
Discussion on the clusters' stability assessment step Bootstrapping and noising methods were chosen in the workflow for both their availability in the same function clusterboot() from the same package as for pamk(), and for their complementarity as suggested by  Hennig (2007). Nevertheless, other methods may also be used as sensitivity analyses, including those proposed in the same FPC package. Finally, although this step allows for the clusters to be assessed, data scientists should keep in mind that stability is not the only important validity criterion -clusters obtained by very inflexible clustering methods may be stable but not valid, as discussed in  Hennig (2008). Discussion on the types of data that are supported by the Qluster workflow Although general, the Qluster workflow does not cover all types of data and it is clear that for medical imaging data, omics data or data in the form of signals, dedicated approaches must be considered.
Discussion and recommendation on the practical use of the workflow Use of clusters stability as a criterion to be optimized Cluster stability assessment could be considered as a criterion to be optimized, by iterating on this step in order to make this property an integral part of the clustering process itself. Attention should be paid, however, to the fact that the bootstrap and noise methods are more computationally and thus time-consuming than simple methods such as deleting variables one by one (methods used on biological measurements and proposed in the ClValid R package). Also, it may not be obvious to optimize the clustering on clusters' stability if the 2 proposed methods do not give similar results. For example, relatively to the noising method, the bootstrap method is more likely to give stable results with the increase in the volume of the dataset in the case of PAM, and the increase in the % of representativeness of the samples in the case of CLARA.
Hence, it is recommended that an analysis of patients with negative Silhouettes be included in the workflow to better assess whether they are a reflection of "bad" clustering or the key to better understanding the disease. What if the optimum number of clusters is the minimum of range K? In the case where the optimal number of clusters is the minimum of the range of K (as in our example in section 4), we recommend (if appropriate) that data scientists be testing for lower values of K to challenge the obtained optimum. Equally, if the optimum is obtained for K = 2, data scientists should test whether the dataset should be split into two clusters, using the Duda-Hart test that tests the null hypothesis of homogeneity in the whole dataset. This can be done using the same pamk() function by setting up the minimum of K to 1, or directly using the dudahart2() function (also in FPC R package).
Conclusion In this article, we propose a (1) complete, (2) generic and (3) easy-to-implement workflow for clustering data of various nature and volume, either for standard practice (with possible automation) and/or for data scientists who wish to quickly master a single complete clustering approach to be applied in many situations. It therefore does not rely on any innovative approach per se, but rather on a careful selection and combination of state-of-the-art clustering methods for practical purposes and robustness. The Qluster workflow has the advantage to rely on a limited number of carefully selected methods, and reliable software packages and functions. The Qluster workflow also attempts to combine statistically relevant and parsimonious methodological choices to help the data scientist achieve "robust" clustering, particularly through: a) Factor analysis: the upstream factor analysis stage, which, in addition to addressing collinearity, noise, and high dimensionality issues, as well as facilitating the clustering work, supports converting data of all types (including categorical and mixed) into continuous data.
The choice to favor on non-large data is the selection of the number of components by a robust approach, based on cross-validation (missMDA package). Otherwise, the commonly used scree plot is proposed. b) Partitioning Around Medoids: the recommendation to favour a Manhattan distance over the Euclidean distance because it is less sensitive to outliers. In the case of large data, we suggest the use of the CLARA algorithm, which operates on database samples of configurable sizes, enabling the user to manage both the time and storage capacity constraints. c) Stability assessment: the choice to evaluate the stability of clusters through 2 methods recommended for their complementary namely bootstrap and noising. Finally, this workflow can be fully operationalized, using either scripted tools or a Data Science platform supporting the use of R packages.
min, ncp. max] range end Retrieve the optimal number of dimensions Copt from Fncp Define the Mopt matrix as M restricted to Copt components P = pamk(Mopt), with usepam = TRUE (PAM), criterion = "asw", scaling = FALSE, and setting at convenience krange Let K the optimal number of clusters in P end S = clusterboot(Mopt), with bootmethod = c("boot", "noise"), krange = K, clustermethod = "pamkCBI" and the same parameters as in the previous step. Loop on the noise level parameter to test different noise levels Return all useful results in Q 4 Detailed workflow methodology through a step-by-step example 4. 1 The Cardiovascular Disease dataset and the objective.
Acknowledgment The team would like to thank  Dr. Martin Montmerle  for initiating the scientific study that led to this research work. The team would also like to thank  Dr. Martin Montmerle ,  Vincent Martenot ,  Valentin Masdeu ,  Pierre Tang  and  Sam Ekhtiari  for their careful review of the article. Finally, the team would like to thank  Quinten  for providing the opportunity to conduct this work.
Abstract. Advanced data assimilation (DA) methods, widely used in geophysical and climate studies to merge observations with numerical models, can improve state estimates and consequent forecasts. We interface the deterministic ensemble Kalman filter (DEnKF) to the Lagrangian neXt generation Sea Ice Model, neXtSIM. The ensemble is generated by perturbing the atmospheric and oceanic forcing throughout the simulations and randomly initialized ice cohesion. Our ensemble-DA system assimilates sea ice concentration (SIC) from the Ocean and Sea Ice Satellite Application Facility (OSI-SAF) and sea ice thickness (SIT) from the merged CryoSat-2 and SMOS datasets (CS2SMOS). Because neXtSIM is computationally solved on a timedependent evolving mesh, it is a challenging application for ensemble-DA. As a solution, we perform the DEnKF analysis on a fixed and regular reference mesh, on which model variables are interpolated before the DA and then back to each member's mesh after the DA.
Introduction Sea ice is a critical component of the Earth's climate system. The evident loss of Arctic sea ice both as sea ice extent (SIE) and volume (SIV) over recent decades has been abundantly discussed (e. g. ,  Meier, 2017). Predicting the Arctic sea ice conditions from near-term to decadal timescales is becoming increasingly important due to their importance for both the Earth's climate and local human activities such as shipping Published by Copernicus Publications on behalf of the European Geosciences Union. that require accurate sea ice forecasts  (Bertino and Holland, 2017; Wagner et al. , 2020). Like other climate system components, sea ice forecasting relies on numerical models and observational data. Sea ice models are sensitive to both initial and boundary conditions, which can be constrained by observations using data assimilation (DA, e.
CS2SMOS sea ice thickness for assimilation The CS2SMOS provides a daily SIT product that merges weekly Cryosat-2 altimeter data with daily Soil Moisture and Ocean Salinity (SMOS) radiometer data. The Cryosat-2 SIT is retrieved from the freeboard (the ice and snow height above sea level) and measured by altimetry satellites, which can only detect thick ice. In contrast, the SMOS SIT is more reliable for thin ice. It is derived from microwave brightness temperatures in the L band. The two datasets are projected on the Equal-Area Scalable Earth 2 (EASE2) 25 km grid  (Brodzik et al. , 2012 ) by optimal interpolation. The CS2SMOS data provide mapping errors as uncertainty estimates, including the uncertainty of ice thicker than 1 m from Cryosat-2 and the uncertainty of ice thinner than 1 m from SMOS.
Thick multi-year ice usually shows high uncertainty. The existence of sea ice is marked by the OSI-SAF icetype product in CS2SMOS. We use the reprocessing mode CS2SMOS version 203 product, which uses the OSI-SAF OSI-430-b ice concentration product to identify grid cells filled with more than 15 % ice, and separate the first-year ice from multi-year ice. The dataset is available for the Arctic winter from October to April, whereas it is unavailable for the melting summer season due to wet surface interference in both Cryosat-2 and SMOS. As a merged dataset, the CS2SMOS is subject to different interpretations because Cryosat-2 provides the absolute thickness over the ice cover, defined as the sea ice volume divided by the ice-covered area fraction in the grid cell. In contrast, SMOS provides the "effective" thickness, similar to the state variable used in neXtSIM for SIT.
OSI-SAF sea ice drift for validation As an independent dataset, we use the OSI-SAF OSI-405 SID product to validate the SID forecast. The product is a daily product obtained from the measurements of passive and active microwave instruments that have a horizontal resolution varying from 10 to 15 km in the Arctic. The SID is retrieved by the continuous maximum cross-correlation method  (Lavergne et al. , 2010)  and is provided on a polar stereographic regular grid of 62. 5 km resolution every 48 h. We only validate the model ice drift against this product when uncertainties in the observation-based estimates are lower than 2. 5 km every 2 d in the winter period. The discarded high-uncertainty observations are primarily located near the North Pole due to fewer observations and near the ice edge where ice drifts so fast that it reaches the limit that the continuous maximum cross-correlation method can handle.
Perturbations of atmosphere, ice, and ocean forcing As a crucial component of the ensemble-DA system, the forecast ensemble is generated by neXtSIM through randomly perturbed atmospheric forcing and model parameters (ice cohesion in the present case), plus randomly perturbed oceanic forcing. The former two perturbations have been investigated in the  Cheng et al. (2020)  study, which shows that the modeled SID is less sensitive to the initial model state than to the atmospheric forcing applied throughout the run. In addition, uncertainties from the ocean processes (the TOPAZ4 data) are also considered in this study. In the atmospheric forcing dataset, we perturb the horizontal 10 m wind velocities, the downward longwave radiation, and the snowfall rate that are considered to be domi-nant factors for a winter period.
In the ocean forcing dataset, the SSS and SST are perturbed since they are known to impact SIC and SIT through thermodynamic processes. Using the same perturbation system as TOPAZ4  (Sakov et al. , 2012) , the perturbations are spatiotemporally correlated with a decorrelation timescale of 2 d and a horizontal decorrelation length scale of 250 km, with the random field generator introduced by  Evensen (2003). The random perturbation fields have standard deviations of √ 3 m s -1 for wind speed, √ 50 W m -2 for the longwave radiation, 100 % for snowfall rate (using an unbiased lognormal distribution), 0. 1 • C for SST, and 1 PSU (practical salinity unit) for the SSS. To limit the impact of SST on the ice formation around the ice edge, we multiply the SST perturbations by the open-water fraction in a grid cell.
Following  Sakov et al. (2012) , the perturbations of horizontal wind velocities are derived from a surfacelevel pressure perturbation with a non-divergent constraint. The non-divergent constraint prevents the sea ice cover from breaking up excessively. In addition to perturbing the upstream forcing dataset, the ice cohesion field is initialized as a heterogeneous random field following a uniform distribution between 20 and 40 kPa without spatial correlation  (Cheng et al. , 2020) , which is different for each ensemble member. The cohesion field is kept constant unless a remeshing occurs, in which case the cohesion on the newly created model grid cells is given as the average of their nearest neighbors.
The uncertainty contains the sensor errors, the inverse model representation error, diagnosed observation errors, and the bias (inconsistency) between the CryoSat-2 and SMOS observations. Instead of using the CS2SMOS built-in uncertainty, we define the observation error variance σ 2 obs,SIT , referring to the empirical formula of  Xie et al. (2018) , as an increasing function of ice thickness h ice : https://doi. org/10. 5194/tc-17-1735-2023 The Cryosphere, 17, 1735-1754, 2023 σ 2 obs,SIT = min(0. 2, 0. 02e 1. 8(h ice -3) ), h ice > 3m, max(0. 02, 0. 1e -1. 5h ice ), otherwise. ( The coefficients in Eq. (  2 ) are fine-tuned based on a 3-yearlong dataset of observations.