Calculate the silhouette width which provides a metric for evaluating consistency within data clusters.
Value
A data frame containing the sample_id
, platform
,
and the average silhouette width across all clusters, rounded to three decimal places.
Details
The silhouette width calculation involves preprocessing steps including normalization and scaling of the data, PCA for dimensionality reduction, and clustering. The silhouette width is then calculated for a downsampled subset of cells to ensure computational efficiency. This metric helps in assessing the cohesion and separation of the identified clusters, with higher values indicating better defined clusters.