kNN classification error on numeric data
이전 댓글 표시
I'm trying to use kNN classification on a dataset with following data structure:
-39.687 38.54 -3.1409 -1.611 -3.1381 'bear'
I'm getting the following error
>> y = fitcknn(ds,'category');
Error using classreg.learning.FullClassificationRegressionModel.prepareDataCR (line 129)
X must be a numeric matrix.
Error in classreg.learning.classif.FullClassificationModel.prepareData (line 455)
[X,Y,W,dataSummary] = ...
Error in classreg.learning.FitTemplate/fit (line 205)
[X,Y,dataPrepOut{1:this.NDataPrepOut}] = ...
Error in ClassificationKNN.fit (line 842)
this = fit(temp,X,Y);
Error in fitcknn (line 267)
this = ClassificationKNN.fit(X,Y,varargin{:});
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Nearest Neighbors에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!