sim neural network with imbalanced data

조회 수: 8 (최근 30일)
Demet
Demet 2023년 1월 27일
답변: Meet 2024년 11월 15일 11:44
Hello,
I have imbalanced data and I want to classify it. I undersampled the data and trained Neural Network with this balanced data and I get a high success. I used patterned () for training and for testing the code is sim().
I want to be able to use this NN in real life and when i used sim() for it the result is really bad as this data is imbalanced. When I make equalize the number of the two groups the result of sim() is really good.
The problem in real life we even don't know the label of the data and i can not equalize before simulation. Is there any way for me to use this NN in real life for imbalanced data?
I would be very happy if anyone has an idea about it.
Thanks.

답변 (1개)

Meet
Meet 2024년 11월 15일 11:44
Hi Demet,
Since you are experiencing poor performance with "sim" on the imbalanced dataset, here are some methods you can consider to improve your model's performance:
  1. Increase the number of instances in the minority class by duplicating samples or using techniques like "SMOTE".
  2. Assign higher weights to the minority class during training to penalize misclassification more heavily, this can be used by adjusting the "Weights" parameter in "fitcensemble" function.
  3. If you manually implement the training loop for your neural network, you can define a custom loss function that applies higher penalties to errors in the minority class, effectively balancing the influence of each class during training.
Hope this helps!!

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by