Cluster Validation (Similarity)
- Read Data:
Read the input data points from the "sample_input" file.
- Define Jaccard Similarity Function:
Define a function to calculate the Jaccard similarity between two sets of labels.
- Define Normalized Mutual Information (NMI) Function:
Define a function to calculate the Normalized Mutual Information between two sets of labels.
- Parse Data:
Parse the input data and extract cluster labels and predicted labels.
- Calculate Similarity:
Calculate both Jaccard similarity and NMI similarity between the cluster labels and predicted labels.