Index of chosen Nearest Neighbor from Classification Learner kNN Function
이전 댓글 표시
Hi,
I created a trained kNN Classification model using the Classification Learner App in order to classify new data sets and then exported it as a function and implemented it into my code.
Training of model:
[trainedClassifier, validationAccuracy] = trainClassifier(training_data);
Classification of new data:
new_data = trainedClassifier.predictFcn(new_data);
Is there a way to extract the chosen NNs for each newly classified data point in addition to the resulting classification from the "trainedClassifier" model?
Since I'm using the existing functions of the App I'm curious on wether such a response is already possible or can at least easily be implemented into the automatically generated classification trainer function code.
Best regards, Michael
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Nearest Neighbors에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!