kNN classifier

버전 1.1.0.2 (2.78 KB) 작성자: Mahmoud Afifi
k-NN classifier
다운로드 수: 4.5K
업데이트 날짜: 2019/1/4

라이선스 보기

-k-NN classifier: classifying using k-nearest neighbors algorithm. The nearest neighbors
-search method is euclidean distance
-Usage:
[predicted_labels,nn_index,accuracy] = KNN_(3,training,training_labels,testing,testing_labels)
predicted_labels = KNN_(3,training,training_labels,testing)
-Input:
- k: number of nearest neighbors
- data: (NxD) training data; N is the number of samples and D is the
dimensionality of each data point
- labels: training labels
- t_data: (MxD) testing data; M is the number of datapoints and D
is the dimensionality of each data point
- t_labels: testing labels (default = [])
-Output:
- predicted_labels: the predicted labels based on the k-NN
algorithm
- nn_index: the indices of the nearest training data point (Mx1).
- accuracy: if the testing labels are supported, the accuracy of
the classification is returned, otherwise it will be zero.

인용 양식

Mahmoud Afifi (2024). kNN classifier (https://www.mathworks.com/matlabcentral/fileexchange/63621-knn-classifier), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2015a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Spatial Search에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

KNN_

버전 게시됨 릴리스 정보
1.1.0.2

..

1.1.0.1

.

1.1.0.0

Bug fixed

1.0.0.0