clustering accuracy

Version 1.0.0 (1.41 KB) by Dong Dong
Find the clustering accuracy of a prediction, given the true labels
132 Downloads
Updated 28 Jun 2020

View License

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 Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0