Body: <p>I am working on an object detection model and have thought of looking into stratified splits for the dataset.</p>
  <p>Now since I am doing object detection I have a variable number of &quot;labels&quot; for every image because in each image there is variable number of occurrences for each object I am looking for (car, truck, motorbike, etc.).</p>
  <p>Obviously single-label stratification does not apply.</p>
  <p>From what I understand multi-label stratification is only applicable if there are basically label &quot;features&quot; that we know are always present, which does not seem the case here.</p>
  <p>My question is... is there a way to perform stratified split in this case so that in each split there is roughly the same number of cars/trucks/bikes/etc.? (Or is it going to actually improve the results at all?)</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-30T14:20:32.460Z
Comments.Text: group them on the basis of the feature of the multilabel
Comments.UserDisplayName: Rithik Banerjee
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-07-31T05:04:06.440Z
Comments.Text: @RithikBanerjee can you please explain in more detail? The very definition of multilabel seems to be that there are multiple features which can be considered labels.
Comments.UserDisplayName: Rares Dima
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-18T23:05:59.807Z
Comments.Text: @RaresDima Did you find an optimal solution?
Comments.UserDisplayName: Sadra
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-11T16:08:16.070Z
Comments.Text: @SadraNaddaf no. There isn't one. The best you can do is consider this as a partitioning problem and approach it in a greedy way because of the massive amount of data.
Comments.UserDisplayName: Rares Dima
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-12T03:21:26.917Z
Comments.Text: @sadranaddaf  If you explain and clarify your question I can post my experience/code as an answer here. If you have roughly split each label to train/dev/test with 70%/10%/15% so then you have ended up with a different number of images in each set but they roughly have an equal % of each class label. Is it the same as what you want? I did a similar thing on my OD task.
Comments.UserDisplayName: Sadra
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-15T06:27:40.003Z
Comments.Text: @RaresDima I should have mentioned you in previous comment
Comments.UserDisplayName: Sadra
Tags: <datasets><data-preprocessing>
Title: Multilabel stratified split for images/object detection
UserDisplayName: Rares Dima
ThreadText: # Multilabel stratified split for images/object detection
  
  (Asked by: username_0 on 2020-07-30)
  
  I am working on an object detection model and have thought of looking into stratified splits for the dataset.
  
  Now since I am doing object detection I have a variable number of "labels" for every image because in each image there is variable number of occurrences for each object I am looking for (car, truck, motorbike, etc.).
  
  Obviously single-label stratification does not apply.
  
  From what I understand multi-label stratification is only applicable if there are basically label "features" that we know are always present, which does not seem the case here.
  
  My question is... is there a way to perform stratified split in this case so that in each split there is roughly the same number of cars/trucks/bikes/etc.? (Or is it going to actually improve the results at all?)
  
  **Tags:** datasets, data-preprocessing
  > **Comments:**
  > **username_1**: group them on the basis of the feature of the multilabel  
  > **username_0**: @RithikBanerjee can you please explain in more detail? The very definition of multilabel seems to be that there are multiple features which can be considered labels.  
  > **username_2**: @RaresDima Did you find an optimal solution?  
  > **username_0**: @SadraNaddaf no. There isn't one. The best you can do is consider this as a partitioning problem and approach it in a greedy way because of the massive amount of data.  
  > **username_2**: @sadranaddaf  If you explain and clarify your question I can post my experience/code as an answer here. If you have roughly split each label to train/dev/test with 70%/10%/15% so then you have ended up with a different number of images in each set but they roughly have an equal % of each class label. Is it the same as what you want? I did a similar thing on my OD task.  
  > **username_2**: @RaresDima I should have mentioned you in previous comment  
  
  ---
  
  ## 0 answers
  
  