How do I deal with different class sizes when classifying data with a petternnet?
이전 댓글 표시
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일
Did you normalize your data prior to classification ? With normalisation (mapminmax function for example) you will not have a 1:9 ration anymore.
Anne Bernhart
2021년 3월 17일
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 ?
Anne Bernhart
2021년 3월 17일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!