Hello All,
I am trying to use feature selection with KNN classifier
fun1 = @(XT,yT,Xt,yt)... (sum((yt ~= knnclassify(Xt,XT,yT)))); [fs,history] = sequentialfs(fun1,XT,yT,'cv',c1,'options',opts,'direction','forward')
But, I am getting an error which says knn classify is not a valid function. Can you suggest any solution for that?

댓글 수: 1

Adam
Adam 2015년 3월 9일
편집: Adam 2015년 3월 9일
Is it on your path? It seems to need the Bioinformatics Toolbox, though you haven't added this to the Products list so I don't know if you have this toolbox or not?
Type:
which knnclassify
to see if it is on your path.

댓글을 달려면 로그인하십시오.

답변 (0개)

질문:

2015년 3월 9일

편집:

2015년 3월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by