Comparison of values and classification
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Kevin Holly
on 25 Apr 2023
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)
See Also
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!