# Clustering of a Health Dataset Using Diagnosis Co-Occurrences
## 4 Discussion
However, as shown in the results section, the Jaccard measure is not efficient to produce good results with the proposed quality indicators here. Furthermore, the RR measure takes better account of the marginal propensities of each diagnosis and it has a more profound probabilistic interpretation, where the value 1 can be interpreted as probabilistic independence between the occurrences of diagnoses, here on a patient ED episode of visits. Unexpectedly, [PERSON]'s Q coefficient provided good results, but is harder to interpret than the RR measure. This suggests that it can also adequately capture the association due to positive matches, although not being focussed on this aspect. The choice of clustering algorithm leads to the strategy to group data in clusters and the design of the measure of cluster quality. This process depends on the nature of the data, their similarities, their distribution in space, if it has one, and on the nature of the desired cluster. Most traditional algorithms expect data to be in a Euclidean space with a distance function, respecting the triangle inequality between three elements (\(\mathrm{d}(\mathrm{a},\mathrm{c})\leq\mathrm{d}(\mathrm{a},\mathrm{b})+\mathrm{ d}(\mathrm{b},\mathrm{c})\)). With categorical data, this assumption is not verified and the use of pseudo-distance [29], or the embedding of the categorical data in a Euclidean space, is possible, but is not appropriate for the statistical comparison of diagnoses for two main reasons. Firstly, the interpretation of clustering quality from the use of pseudo-distance is quite difficult and generally considers each diagnostic label entity with the same importance for the clustering, whereas their occurrences in the data can be drastically different. Secondly, the embedding of diagnoses in a Euclidean space would result in a loss of information because the statistical relationship between two diagnoses suggests, but does not imply, any relationship with others diagnoses, contrary to a distance link, which would bound the distance with other entities based on the triangle inequality. Embedding diagnoses with Multiple Correspondence Analysis is therefore inappropriate. Furthermore, it does not produce valuable results in our context and was designed initially to analyze surveys [37], which do not capture the specificity of diagnosis variables with the importance of positive matches. The design of the clustering algorithm also depends on the use of valid quality indicators and on the choice of type of clusters. Our design of a non-distance-based HAC approach is the first to propose a dedicated and coherent quality indicator for this type of approach. Indeed, contrary to numerical and categorical clustering, no usual quality metrics currently exist to measure the compactness and separation of this type of cluster. Comparable studies rely on an empirical inspection of the dendrogram to determine the number of clusters, without describing the statistical quality of the cluster found, e.g., [PERSON] et al. who used clinical criteria [20]. A methodology such as the one used here with the RR measure could be used to construct quality metrics from the Jaccard coefficient or Yule's Q, but this is beyond the scope of this study. Other methodologies from network clustering could be a source of inspiration for constructing new cost functions like MR. Particularly, community scoring functions combining internal and external connectivity, such as conductance [38], could be adapted for graphs with weighted nodes and weighted links like the underlying graph of the present study with its diagnoses occurrences and co-occurrences used as weights. The membership ratio MR, constructed here for multimorbidity pattern analysis, can be analyzed at several levels: here at block, cluster, and global level. As such, it has proven to be an efficient way to respond to the problem of clustering diagnostic entities in a meaningful way.