[MRG] scorer: add sample_weight support (+test)

 Wraps up #3098 (a part of #1574), ready for review.

Initial description by @ndawe:
> This is part of the larger #1574 and adds support for sample weights in the scorer interface.
You are right, if you are testing all score_functions, that doesn't make 
any sense.


On 07/16/2014 05:23 PM, Vlad Niculae wrote:
>
> In sklearn/metrics/tests/test_score_objects.py:
>
> > +    sample_weight = np.ones_like(y_test)
> > +    sample_weight[:10] = 0
> > +
> > +    # get sensible estimators for each metric
> > +    sensible_regr = DummyRegressor(strategy='median')
> > +    sensible_regr.fit(X_train, y_train)
> > +    sensible_clf = DecisionTreeClassifier()
> > +    sensible_clf.fit(X_train, y_train)
> > +    estimator = dict([(name, sensible_regr)
> > +                      for name in REGRESSION_SCORER_NAMES] +
> > +                     [(name, sensible_clf)
> > +                      for name in CLF_SCORER_NAMES])
> > +
> > +    for name, scorer in SCORERS.items():
> > +        try:
> > +            weighted = scorer(estimator[name], X_test, y_test,
>
> The 'expected thing' would need to be manually computed for each 
> different scorer, right?
>
> That would be just like coming up with a different hand-crafted test 
> for each scorer, which I could do, if you insist.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/scikit-learn/scikit-learn/pull/3401/files#r15004137>.
>