Hi Shawin,
I see you are encountering an error while using ‘confusionmat’. This issue arises because MATLAB’s ‘confusionmat’ function requires both input vectors—the true labels and the predicted labels—to have the same length and to correspond to the same set of data samples. Since you do not have the true labels for your test set, it is not possible to use ‘confusionmat’ to evaluate your results in this case.
Please refer to documentation of ‘confusionmat’ for more information: https://in.mathworks.com/help/stats/confusionmat.html
Instead, you can consider using internal validation metrics such as the silhouette score or the Davies-Bouldin index.
Please refer to below documentation links to know about silhouette score and Davies-Bouldin index:
- https://in.mathworks.com/help/stats/clustering.evaluation.silhouetteevaluation.html
- https://in.mathworks.com/help/stats/clustering.evaluation.daviesbouldinevaluation.html
Hope this helps!
