'Evaluate predicted target values for X relative to y_true.
Parameters
estimator : object
Trained estimator to use for scoring. Must have a predict_proba
method; the output of that is used to compute the score.
X : array-like or sparse matrix
Test data that will be fed to estimator.predict.
y_true : array-like
Gold standard target values for X.
sample_weight : array-like, optional (default=None)
Sample weights.
Returns
score : float
Score function applied to prediction of estimator on X.'

def __call__(self, estimator, X, y_true, sample_weight=None):

    super(_PredictScorer, self).__call__(estimator, X, y_true, sample_weight=sample_weight)
    y_pred = estimator.predict(X)
    if (sample_weight is not None):
        return (self._sign * self._score_func(y_true, y_pred, sample_weight=sample_weight, **self._kwargs))
    else:
        return (self._sign * self._score_func(y_true, y_pred, **self._kwargs))
