title: scikit-learn: Random forest class_weight and sample_weight parameters
body: <p>I have a class imbalance problem and been experimenting with a weighted Random Forest using the implementation in scikit-learn (>= 0.16). </p>
  
  <p>I have noticed that the implementation takes a <em>class_weight</em> parameter in the tree constructor and <em>sample_weight</em> parameter in the fit method to help solve class imbalance. Those two seem to be multiplied though to decide a final weight.</p>
  
  <p>I have trouble understanding the following:</p>
  
  <ul>
  <li>In what stages of the tree construction/training/prediction are those weights used? I have seen some papers for weighted trees, but I am not sure what scikit implements.</li>
  <li>What exactly is the difference between class_weight and sample_weight?</li>
  </ul>