Answers.Body: <p>You can use the technique of <strong>Transfer Learning</strong> to fine-tune your model. You can take the weights from the pre-trained model and then use them as initializations for your own model.</p>
  <p>Yes!, It is common practice to make a balanced dataset when training a machine learning model, as this can help prevent the model from <strong>overfitting</strong> to one class or the other. A model trained on a balanced dataset would be more accurate at predicting the classes.</p>
  <p>In your case, if you have more data from <code>class 1</code> than <code>class 2</code>, you may want to downsample the <code>class 1</code> data so that both classes are represented equally. You can then train your model on this balanced dataset and see if it improves performance on the test set.</p>
  <p>There is a great deal of research has been conducted on the topic of data balancing and its impact on machine learning models. few papers on the topic include</p>
  <ul>
  <li><p><a href="https://www.researchgate.net/publication/220392058_On_the_effectiveness_of_preprocessing_methods_when_dealing_with_different_levels_of_class_imbalance" rel="nofollow noreferrer">On the effectiveness of preprocessing methods when dealing with different levels of class imbalance</a></p>
  </li>
  <li><p><a href="https://www.semanticscholar.org/paper/Learning-from-Imbalanced-Data-He-Garcia/6a97303b92477d95d1e6acf7b443ebe19a6beb60" rel="nofollow noreferrer">Learning from Imbalanced Data</a></p>
  </li>
  <li><p><a href="https://www.researchgate.net/publication/336305785_A_review_on_data_preprocessing_methods_for_class_imbalance_problem" rel="nofollow noreferrer">A review on data preprocessing methods for class imbalance problem</a></p>
  </li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-19T19:09:17.330Z
Answers.LastActivityDate: 2022-10-19T19:09:17.330Z
Answers.UserDisplayName: Faizy
Body: <p>I have trained a CNN in a binary classification problem, however the original problem has 6 different classes, of which, I am only interested in classifying one, so if it is that certain class or not.in this case, let's say class 2.</p>
  <p>After looking closely into the model's performance on test dataset, I have found that the model confuses class 2 with class 1 often. Is it common practice, to make a balanced dataset from the data that I have only from class 1 and class 2, and further train the model on that dataset? Are there any pieces of research/papers on this? If no, what other possible solutions would there be, of course other than making a new model?</p>
  
Tags: <deep-learning><fine-tuning><imbalanced-datasets>
Title: Fine tuning a Deep Learning model post training
UserDisplayName: NeuroEng
ThreadText: # Fine tuning a Deep Learning model post training
  
  (Asked by: username_0 on 2022-10-19)
  
  I have trained a CNN in a binary classification problem, however the original problem has 6 different classes, of which, I am only interested in classifying one, so if it is that certain class or not.in this case, let's say class 2.
  
  After looking closely into the model's performance on test dataset, I have found that the model confuses class 2 with class 1 often. Is it common practice, to make a balanced dataset from the data that I have only from class 1 and class 2, and further train the model on that dataset? Are there any pieces of research/papers on this? If no, what other possible solutions would there be, of course other than making a new model?
  
  **Tags:** deep-learning, fine-tuning, imbalanced-datasets
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-10-19. Score: 1
  
  You can use the technique of **Transfer Learning** to fine-tune your model. You can take the weights from the pre-trained model and then use them as initializations for your own model.
  
  Yes!, It is common practice to make a balanced dataset when training a machine learning model, as this can help prevent the model from **overfitting** to one class or the other. A model trained on a balanced dataset would be more accurate at predicting the classes.
  
  In your case, if you have more data from `class 1` than `class 2`, you may want to downsample the `class 1` data so that both classes are represented equally. You can then train your model on this balanced dataset and see if it improves performance on the test set.
  
  There is a great deal of research has been conducted on the topic of data balancing and its impact on machine learning models. few papers on the topic include
  
  * [On the effectiveness of preprocessing methods when dealing with different levels of class imbalance](https://www.researchgate.net/publication/220392058_On_the_effectiveness_of_preprocessing_methods_when_dealing_with_different_levels_of_class_imbalance)
  * [Learning from Imbalanced Data](https://www.semanticscholar.org/paper/Learning-from-Imbalanced-Data-He-Garcia/6a97303b92477d95d1e6acf7b443ebe19a6beb60)
  * [A review on data preprocessing methods for class imbalance problem](https://www.researchgate.net/publication/336305785_A_review_on_data_preprocessing_methods_for_class_imbalance_problem)
  
  
  ---
  
  