LDA: ordinal vs. categorical response
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi, I would be interested if there is a difference in applying a linear discriminant analysis if the response variable is ordinal (class 3 is better than class 2, class 2 is better than class 1) rather than categorical?
I couldn't find any good advice on that. Thanks for help
댓글 수: 0
답변 (1개)
Ilya
2015년 4월 27일
There is a difference. This choice, ordinal vs nominal, should be driven by what your response variable represents.
If you have a sufficiently recent version of the Statistics Toolbox, use the fitcecoc function for ordinal labels. Set 'Coding' to 'ordinal' and 'Learners' to 'Discriminant'. For categorical (nominal) labels, simply use fitcdiscr; class labels are treated as nominal by default.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Classification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!