I've computer a single centroid per class using PROC fastclus in SAS,
proc fastclus data=sample.samples_train mean=knn.clusters maxc=1 *number of clusters* maxiter=100; var &predictors; by class; run;
I'm trying to classify a test set based on the closest one of these centroids created. This i'm doing using PROC discrim in also in SAS.
proc discrim data=knn.clusters test=sample.samples_test method=NPAR k=1 metric=identity noclassify; class class; var &predictors; ods output ErrorTestClass=knn.error; run;
I'm using the euclidean distance measure with the option
The following error is returned.
ERROR: There are not enough observations to evaluate the pooled covariance matrix in DATA= data set or BY group.
This works if I set the number of cluster in fastproc equal to 2.
How do I however preform a 1NN with single centroid per class in SAS?