clustering accuracy
Version 1.0.0 (1.41 KB) by
Dong Dong
Find the clustering accuracy of a prediction, given the true labels
function acc=cluster_acc(label,pred)
%Find the clustering accuracy of prediction, given the true labels. The Matlab bulti-in function matchpairs is used to avoid the permutation function.
%Output
% acc = Accuracy of clustering results
%Input
% ytrue = a vector of true labels
% ypred = a vector of the predicted labels
Cite As
Dong Dong (2025). clustering accuracy (https://in.mathworks.com/matlabcentral/fileexchange/77452-clustering-accuracy), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2020a
Compatible with R2019a and later releases
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
