4-Nearest Neighbor on iris recognition using randomized partitioning.

版本 1.0.0.0 (2.0 KB) 作者: lavya Gavshinde
Matlab Script to find the 4 - nearest neighbors (kNN) for IRIS dataset
1.5K 次下载
更新 2012/8/15

查看许可证

% 1: Load iris.mat file which contains Iris data and its label
% seperately.
% 2: Randomize the order of data for each iternation so that new sets of
% training and test data are formed.
%
% The training data is of having size of Nxd where N is the number of
% measurements and d is the number of variables of the training data.
%
% Similarly the size of the test data is Mxd where M is the number of
% measurements and d is the number of variables of the test data.

% 3: For each observation in test data, we compute the euclidean distance
% from each obeservation in training data.
% 4: We evalutate 'k' nearest neighbours among them and store it in an
% array.
% 5: We apply the label for which distance is minimum
% 5.1: In case of a tie, we randomly label the class.
% 6: Return the class label.
% 7: Compute confusion matrix.

引用格式

lavya Gavshinde (2026). 4-Nearest Neighbor on iris recognition using randomized partitioning. (https://ww2.mathworks.cn/matlabcentral/fileexchange/37827-4-nearest-neighbor-on-iris-recognition-using-randomized-partitioning), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2012a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Statistics and Machine Learning Toolbox 的更多信息
致谢

参考作品: K Nearest Neighbors

版本 已发布 发行说明
1.0.0.0