How do I deal with different class sizes when classifying data with a petternnet?
2 次查看(过去 30 天)
显示 更早的评论
I want to classify datasets using a patternnet. I have 2 classes (labelled 1 and 2). However, class 2 is significantly smaller than class 1 (ratio 1:9). The patternnet always classifies every sample into class 1, reaching 90% accuracy with it.
Is there any way to weigh or prioritize my classes so that this is not viewed as the best solution? (e.g. a cost matrix like for a decision tree (fitctree))
4 个评论
MaHa
2021-3-17
I see I misunderstood sorry. What happens if you reduce the number of labbelled 1 to the number of labbelled 2 ? Does it still classes everything in L1 ?
采纳的回答
Shravan Kumar Vankaramoni
2021-3-25
Hi Anne,
Have a look at the below thread. Hope that answers your question
更多回答(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!