pub fn validate_cluster_consistency<F: Float + FromPrimitive + Debug + PartialOrd + Display>(
linkage_matrix: ArrayView2<'_, F>,
cluster_assignments: ArrayView1<'_, usize>,
) -> Result<()>Expand description
Checks consistency of cluster assignments with a linkage matrix
Validates that flat cluster assignments are consistent with the hierarchical structure defined by the linkage matrix.
§Arguments
linkage_matrix- The linkage matrixcluster_assignments- Flat cluster assignments for each observation
§Returns
Result<()>- Ok if consistent, error otherwise