Comparison of values and classification
3 ビュー (過去 30 日間)
古いコメントを表示
I have a excel spreadsheet with 14 Columns and 1084 rows. I have to comapre the data in each row to eachother. Would it also be possible to do any of these and if so how would i do it.
Mdl = fitcdiscr(Tbl,ResponseVarName)
Mdl = fitcnb(Tbl,ResponseVarName)
Mdl = fitcknn(Tbl,ResponseVarName)
Mdl = fitctree(Tbl,ResponseVarName)
Im not sure how to go about doing this and i am very lost so any help is appreciated.
0 件のコメント
回答 (1 件)
Kevin Holly
2023 年 4 月 25 日
Generate table:
matrix = rand(1084,4); % making 4 columns because I don't feel like creating 14 column names
Tbl = array2table(matrix);
Tbl.Properties.VariableNames = {'Example','VariableName','Thisone','Anotherone'}
Chose Response Variable
ResponseVarName = 'Thisone';
Mdl = fitcknn(Tbl,ResponseVarName)
参考
カテゴリ
Help Center および File Exchange で Database Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!