Linked Questions

2 votes
1 answer

Deep learning with Imbalanced classes [duplicate]

I am trying to model a packet data with 1 dimensional CNN but I have a very imbalanced classes in my target. I have 3 classes as class 0 has 53000 cases, class 1 has 300 cases and class 2 has 150 ...
Martin Xristev's user avatar
13 votes
6 answers

Deep network not able to learn imbalanced data beyond the dominant class

I have data with 5 output classes. The training data has the following no of samples for these 5 classes: [706326, 32211, 2856, 3050, 901] I am using the following keras (tf.keras) code: <...
dbm's user avatar
  • 251
10 votes
2 answers

How to plot learning curve and validation curve while using pipeline

I would appreciate if you could let me know in the following example code: ...
ebrahimi's user avatar
  • 1,307
0 votes
1 answer

TypeError: unsupported operand type(s) for *: 'float' and 'dict_values'

I'm attempting to compute the class_weights for an highly imbalanced set of 9 classes based on the examples discussed in How to set class weights for imbalanced classes in Keras?. Here is the code: <...
shiva's user avatar
  • 311
3 votes
4 answers

How to deal with class imbalance in a neural network?

Suppose we have a game and its action space contains two possible actions: A and B. We have a labelled dataset of state-action ...
amin msh's user avatar
  • 171
2 votes
3 answers

Imbalanced Dataset (Transformers): How to Decide on Class Weights?

I'm using SimpleTranformers to train and evaluate a model. Since the dataset I am using is severely imbalanced, it is recommended that I assign weights to each ...
Aventinus's user avatar
  • 213
6 votes
1 answer

Setting class weights for categorical labels in Keras using generator

I'm working on with an imbalanced dataset in Keras, and would like to give a higher weight to the samples from my minority class. The fit() function has a nice <...
DGIB's user avatar
  • 161
2 votes
3 answers

Why MLP only learns bias for unbalanced binary classification?

I just started training a MLP model on a data set which has the following statistics. Notice that both train and validation sets are unbalanced (88.4% negatives). Note: The unbalance isn't caused by ...
Roy's user avatar
  • 289
4 votes
1 answer

How to balance class weights correct for a CNN in Keras, given an unbalanced data set?

I want to use class weights for training a CNN with a imbalanced data set. The question arise if the sum of the weights of all examples have to stays the same? My previous plan was to use the ...
Code Now's user avatar
  • 403
1 vote
1 answer

How to set class weights for imbalanced classes in Tensorflow? [closed]

Do we have an equivalence for the following question, but with tensorflow : How to set class weights for imbalanced classes in Keras? ??
Jeremie's user avatar
  • 33
2 votes
0 answers

Training multi-label classifier with unbalanced samples in Keras

I'm trying to train a keras model that takes in samples, let's say $x_i$ for sample $i$, and predicts multiple independent labels, $\hat{y}_{ij}$, such that $\hat{y}_{ij} = 1$ if the model predicts ...
axolotl's user avatar
  • 121
2 votes
2 answers

Imbalanced training set vs smaller balanced training set?

Say I am using a maximum likelihood approach and my output unit computes a softmax function. My training set is distributed as follows over 6 classes: ...
That Guy's user avatar
  • 215
0 votes
2 answers

When to use GAN over conventional sampling methods?

Let's say I have a dataset from a diabetes hospital which has 30000 Type 2 diabetes and 300 Type 1 diabetes patients. So this dataset has millions and millions of other data points like lab ...
The Great's user avatar
  • 2,575
0 votes
0 answers

Image classification with CNNs

I created an image classification model using CNNs for 235 classes and I got 71% accuracy on the test set. My dataset contains some classes with more than 1000 images and others with 30 images. For ...
Lema Zaidi's user avatar