Decision Tree Image Classification

조회 수: 7 (최근 30일)
hendra kurnia febriawan
hendra kurnia febriawan 2018년 10월 24일
답변: Abhipsa 2025년 9월 3일
Hi All,
Currently, I am doing image classification using SVM and DT with the same training data and the same test image. The setting of SVM and DT used the default. There are four classes that I used (A, B, C, D). While in SVM training using Mdl = fitcecoc(trainset,class) it can classify all class, but in DT training using SVModelTree = fitctree(trainset,class) there are only three class A, C, D in the result and seems that the class B is classified as class C. Anycone can help me what causes of that? Thank you in advance.
Hend

답변 (1개)

Abhipsa
Abhipsa 2025년 9월 3일
I understand your concern regarding Decision Tree (fitctree) model not predicting one of the classes (class B) while SVM (fitcecoc) model is correctly classifying all four classes (A, B, C, D).
This almost always comes down to class imbalance and a simple tree. With default settings, a single tree (fitctree) will happily create leaves that never predict a minority class if the splits don’t isolate it cleanly. An SVM (fitcecoc) draws global boundaries and often still carves out some region for that small class, so you see B with SVM but not with the tree.
One of the possible reasons would be that the dataset could have been imbalanced i.e. class B is having a lesser number of samples. To mitigate this issue, bagging methodologies like "random forest" could be used.
You can refer to the below MATLAB documentations for more deatils:
Hope this helps!

카테고리

Help CenterFile Exchange에서 Classification에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by