title: What is the difference between sample weight and class weight options in scikit learn?
body: <p>I have class imbalance problem and want to solve this using cost sensitive learning. </p>
  
  <ol>
  <li>under sample and over sample </li>
  <li>give weights to class to use a modified loss function </li>
  </ol>
  
  <p><strong>Question</strong> </p>
  
  <p>Scikit learn has 2 options called class weights and sample weights. Is sample weight actually doing option 2) and class weight options 1). Is option 2) the the recommended way of handling class imbalance. </p>