title: Multi labeled image classification with imbalanced data, how to split it?
body: <p>I am working multi labeled image classification. This is my data frame:</p>
  <p>[UPDATED]
  <a href="https://i.stack.imgur.com/xJr2U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xJr2U.png" alt="enter image description here" /></a></p>
  <p>As you can see images labeled with 26 features. &quot;1&quot; means exist, &quot;0&quot; means not exist.</p>
  <p>My problem is in many of label has imbalanced data. For example:</p>
  <pre><code>[1] train_df.value_counts('Eyeglasses')
  
  Output:
  
  Eyeglasses
  0    54735
  1     1265
  dtype: int64
  
  [2] train_df.value_counts('Double_Chin')
  
  Output:
  Double_Chin
  0    55464
  1      536
  dtype: int64
  </code></pre>
  <p>How can I split it  both of for training and validation data as a balanced?</p>
  <p>[UPDATE]</p>
  <p>I tried to</p>
  <pre><code>from imblearn.over_sampling import SMOTE
  smote = SMOTE()
  from sklearn.model_selection import train_test_split
  X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, 
                                                          random_state=42)
  
  X_train_smote, y_train_smote = smote.fit_sample(X_train, y_train)
  </code></pre>
  <blockquote>
  <p>ValueError: Imbalanced-learn currently supports binary, multiclass and
  binarized encoded multiclasss targets. Multilabel and multioutput
  targets are not supported.</p>
  </blockquote>