i used KNN search for nearest neighbour classification- the size of image is big and i select only 1000 rows-
[EG_Training,idx_GS1]=datasample(enhance1_GS_random,1000);
K=33;
[KNN D]= knnsearch(EG_Training, EG_Testing, 'K',K ,'Distance', 'euclidean');**
EG_Training is 1000 random rows only- now i have a address(index)of each value in KNN and idx_GS1- my question is how to link these indexes in order to have a segmented image for further evaluation- many thanks
To get back indices into the original signal
enhace1_GS_random
, you canBTW, using
datasample
you get 1000 samples with replacement meaning you might have identical rows inEG_training
.