train and test data using KNN classifier
조회 수: 23 (최근 30일)
이전 댓글 표시
HI I want to know how to train and test data using KNN classifier we cross validate data by 10 fold cross validation. there are different commands like KNNclassify or KNNclassification.Fit. Don't know how to accomplish task Plz help me Thanks
댓글 수: 1
Kathryn Hollowood
2019년 3월 12일
That he just shared also includes information about predicting the classification using knn. So you use the fitcknn to create the model (Mdl). So it would be like:
class = predict(Mdl, TestCase).
This should hopefully give you what you are looking for.
채택된 답변
Shashank Prasanna
2013년 7월 18일
Have you tried out the examples in the documentation?
I don't think we can help you any better than the examples in the doc. If you have specific questions then we can address that.
추가 답변 (1개)
snehal jaipurkar
2018년 1월 26일
Sir please reply soon.... can we use eucledian distance and hamming distance both in knn classifier at the same time??? I am working on a project where I have to classify gabor features using hamming distance and geometrical features using eucledian distance..... Is it possible sir?????
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!