示例#1
0
 def predict_proba(self, X):
     if self.estimator is None:
         raise NotImplementedError()
     # return self.estimator.predict_proba(X)
     decision = self.estimator.decision_function(X)
     if len(self.estimator.classes_) > 2:
         decision = _ovr_decision_function(decision < 0, decision,
                                           len(self.estimator.classes_))
     return softmax(decision)
示例#2
0
    def predict_proba(self, X):
        if self.estimator is None:
            raise NotImplementedError()

        if self.loss in ["log", "modified_huber"]:
            return self.estimator.predict_proba(X)
        else:
            df = self.estimator.decision_function(X)
            return softmax(df)
示例#3
0
    def predict_proba(self, X):
        if self.estimator is None:
            raise NotImplementedError()

        df = self.estimator.decision_function(X)
        return softmax(df)