[MRG+2] Add a test for sample weights for estimators #11558
Fixes the invariant test for sample weights as mentioned in issue #11316 (Refactor tests for sample weights).
What is new?
This is a generic test for estimators that makes sure the sample weights yield consistent results.
What does this implement/fix? Explain your changes.
The test checks if the output of the estimators are the same for
Any other comments?
Pairwise methods are skipped as they require pairwise data.
@jnothman Actually we don't need rtol as 0.5. I just tested with the default value and the tests still passed. No, it only makes sure that the no weighting is equal to unit weighting. If you recommend, I can submit another PR with random weights.