How do I deal with different class sizes when classifying data with a petternnet?

1 view (last 30 days)
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))

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!