简体   繁体   中英

imbalanced dataset with Keras deep learning

I have a datasets that looks like this: Training (Class 0: 471, Class 1: 986) Testing (Class 0: 177, Class 1: 246. I split my data as 80% for training and 20% for validation. I know that is an imbalanced dataset, and I have tried Class_weight but the problem remains. I have retrained my Baseline CNN and I always have a result like as attached in the picture. Could someone help me? 我训练后的结果

I faced a similar problem while classifying events in 5 imbalanced categories. I found this loss function that implement a weighted categorical cross-entropy: https://gist.github.com/noparade/aaa8584e6e90ad64936e333e4e08ca5f Combined with the Nadam optimizer, it allowed me to get over 95% true positive for all my categories.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM