(self, labels, pred_scores)
Compute gain of binary classification.
        Parameters
        ----------
        labels: value list. The labels of data set.
        pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
        thresholds: value list. This parameter effective only for 'binary'. The predict scores will be 1 if it larger than thresholds, if not,
                    if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
        Returns
        ----------
        float
            The gain
Compute gain of binary classification.
        Parameters
        ----------
        labels: value list. The labels of data set.
        pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
        thresholds: value list. This parameter effective only for 'binary'. The predict scores will be 1 if it larger than thresholds, if not,
                    if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
        Returns
        ----------
        float
            The gain
Compute gain of binary classification . Parameters ---------- labels : value list . The labels of data set . pred_scores : pred_scores : value list . The predict results of model . It should be corresponding to labels each data . thresholds : value list . This parameter effective only for binary . The predict scores will be 1 if it larger than thresholds if not if will be 0 . If not only one threshold in it it will return several results according to the thresholds . default None Returns ---------- float The gain
def gain(self, labels, pred_scores):
        """
        Compute gain of binary classification.
        Parameters
        ----------
        labels: value list. The labels of data set.
        pred_scores: pred_scores: value list. The predict results of model. It should be corresponding to labels each data.
        thresholds: value list. This parameter effective only for 'binary'. The predict scores will be 1 if it larger than thresholds, if not,
                    if will be 0. If not only one threshold in it, it will return several results according to the thresholds. default None
        Returns
        ----------
        float
            The gain
        """

        if self.eval_type == consts.BINARY:
            return classification_metric.Gain().compute(labels, pred_scores)
        else:
            logging.warning("gain is just suppose Binary Classification! return None as results")
            return None
def gain ( self , labels , pred_scores ) : if self . eval_type == consts . BINARY : return classification_metric . Gain ( ) . compute ( labels , pred_scores ) else : logging . warning ( "gain is just suppose Binary Classification! return None as results" ) return None