Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to evaluate the clustering solution? #1

Open
gulraizchoudhary opened this issue May 4, 2022 · 0 comments
Open

How to evaluate the clustering solution? #1

gulraizchoudhary opened this issue May 4, 2022 · 0 comments

Comments

@gulraizchoudhary
Copy link
Owner

gulraizchoudhary commented May 4, 2022

Centroid Index is used to evaluate the clustering solution if the ground truth is available. CI=0 means that you have found the optimal partitioning with your clustering solution.
You need two arrays. The first one LABELS contains the partition labels generated by your clustering solution and the other array GT contains the ground truth.

LABELS = np.asarray([1, 2, 3, 1, 2, 3, 3, 4, 4, 4])
GT = np.asarray([1, 2, 3, 1, 4, 2, 2, 4, 3, 1])
Whereas the k=3 is the number of clusters.
CI = CentroidIndex(LABELS1,GT)
print("Centroid Index: "+str(CI))
CI=0 means that you have found optimal partitions, CI>0 shows the number of cluster having mismatch with the ground truth.
Please report it if you find any bug.

@gulraizchoudhary gulraizchoudhary changed the title F&Q How to evaluate the clustering solution? May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant