title: How to determine the class_weights for imbalanced dataset
body: <p>I am working on a dataset which imbalanced. I am trying to build the model with the help of <code>class_weights</code>. So on what basis can, I determine the <code>class_weights</code>.</p>
  
  <p>The labels and its count are as below:</p>
  
  <pre><code>label    Count
  2        47213
  3        2096
  4        2021
  1        737
  0        176
  </code></pre>
  
  <p>So what values should I give for the <code>class_weight</code> variable:</p>
  
  <p><code>model.fit(X_train, Y_train, nb_epoch=5, batch_size=32, class_weight=class_weight)</code></p>