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!