필터 지우기
필터 지우기

How to use knn classifier properly in this case

조회 수: 1 (최근 30일)
Nico S
Nico S 2016년 1월 26일
답변: Walter Roberson 2016년 1월 26일
Im extracting features from some signal so i can use them as input for k nearest neighbor i already did some search about using knn to classify, some post suggested using matlab function
class = knnclassify(Sample,Training,Group,k,distance,rule)
for example: i have 2 array of extracted signal features. i use one as sample, and the other one as training sample = sampleFeatures(500x14) training = trainingFeatures(700x14)
i use them like this:
Class = knnclassify(sampleFeatures,trainingFeatures,Group,5,'euclidean','nearest');
what i want to know is, is this the right way to classify my data using knn. is there any other knn code in matlab which is far better than this one? maybe like more powerful one ill really appreciate it if someone can provide some useful link about knn classifier in matlab
thanks in advance sorry im new to this

답변 (1개)

Walter Roberson
Walter Roberson 2016년 1월 26일
No, knnclassify() is as powerful as knn gets, other than the fact that it does not have the ability to put in your own distance measure.

Community Treasure Hunt

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

Start Hunting!

Translated by