matlab 常用机器学习算法的实现时间:2024-03-11 12:46:15 1. KNN 分类 load fisheriris X = meas; Y = species; % 3 分类问题 % 通过训练集进行训练 Mdl = fitcknn(X, Y, \'NumNeighbors\', 4); % 对 mean of dataset 进行预测 flwr = mean(X); % an average flower flwrClass = predict(Mdl,flwr)