Body: <p>I'm working on a binary classification problem where I have some missing data. My initial idea was to use MiceForest. I'm also using stratified k fold technique (Data is imbalanced). I also want to minimize data leakage.</p>
  <ol>
  <li>When should I impute missing values using MiceForest? For each fold? Or to the whole dataset in the beginning?</li>
  <li>Should I use SMOTE to address class imbalance in each fold as I'm getting a lot of false positives (when using only stratified k fold without oversampling).</li>
  <li>I get really good performance when I do mice imputation to the whole dataset, address class imbalance with smote and then do cross validations. I feel like this is overfitting? Is this because data leakage?</li>
  </ol>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-16T13:11:39.033Z
Comments.Text: Can you please put your main question in the title? If you have multiple distinct questions, you should ask them in separate posts.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-16T18:55:23.677Z
Comments.Text: Is the imbalance really a problem in need of remedy? [Statistics mostly says otherwise.](https://stats.stackexchange.com/q/357466/247274)
Comments.UserDisplayName: Dave
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-18T05:38:35.467Z
Comments.Text: Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
Comments.UserDisplayName: Community
Tags: <machine-learning><classification><python>
Title: Cross validation and MICE imputation
UserDisplayName: chapu
ThreadText: # Cross validation and MICE imputation
  
  (Asked by: username_0 on 2024-07-15)
  
  I'm working on a binary classification problem where I have some missing data. My initial idea was to use MiceForest. I'm also using stratified k fold technique (Data is imbalanced). I also want to minimize data leakage.
  
  1. When should I impute missing values using MiceForest? For each fold? Or to the whole dataset in the beginning?
  2. Should I use SMOTE to address class imbalance in each fold as I'm getting a lot of false positives (when using only stratified k fold without oversampling).
  3. I get really good performance when I do mice imputation to the whole dataset, address class imbalance with smote and then do cross validations. I feel like this is overfitting? Is this because data leakage?
  
  **Tags:** machine-learning, classification, python
  
  > **Comments:**
  > **username_1**: Can you please put your main question in the title? If you have multiple distinct questions, you should ask them in separate posts.  
  > **username_2**: Is the imbalance really a problem in need of remedy? [Statistics mostly says otherwise.](https://stats.stackexchange.com/q/357466/247274)  
  > **username_3**: Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.  
  
  ---
  
  ## 0 answers
  
  