Tag: K nearest neighbors

08
Nov
2017

Machine Learning in MATLAB: KNN

dataset=csvread(‘F:\Machine Learning Training\OneDrive-2017-10-28\Datasets\clusterincluster.csv’,1,0); label = dataset(:,3); dataset = dataset(:, 1:2); rng(2); Mdl =fitcnb(dataset, label, ‘CrossVal’, ‘on’,’kfold’,10); Mdl…