class_docstr: Extends scikit-learn's LinearSVC class to provide confidence estimates.
      
class_docstr_tok: ["Extends","scikit-learn","'s","LinearSVC","class","to","provide","confidence","estimates","."]
code: def predict_proba(self, x):
      scores = self.decision_function(x)
      if len(scores.shape) == 1:
          proba = np.zeros((scores.shape[0], 2))
          scores = np.apply_along_axis(self._sigmoid, -1, scores)
          target = np.array(
              [0 if score <= 0.5 else 1 for score in scores]
          )
          scores = np.array(
              [
                  0.5 + (0.5 - score)
                  if score <= 0.5
                  else 0.5 + (score - 0.5)
                  for score in scores
              ]
          )
          for i, score in enumerate(scores):
              proba[i, target[i]] = score
              proba[i, target[i] - 1] = 1 - score
          proba = normalize(proba, norm="l1")
          return proba
      else:
          proba = np.apply_along_axis(self._sigmoid, -1, scores)
          proba = normalize(proba, norm="l1")
          return proba
  
imports: from abc import ABC, abstractmethod
  import numpy
  from sklearn.multiclass import OneVsRestClassifier
  from sklearn.preprocessing import normalize
  from sklearn.svm import LinearSVC
  from sklearn.utils.multiclass import is_multilabel
  from small_text.utils.classification import empty_result, prediction_result
  from small_text.utils.data import check_training_data
label_desc: Use image node_id 3 for calling the ConfidenceEnhancedLinearSVC obj's underlying member method code with example usage: obj.predict_proba(x) and returns: proba, proba