code: def decision_function(self, X, apply_softmax = True):
          
          X = _check_2d_inp(X, reshape = True)
          preds = np.empty((X.shape[0], self.nclasses), dtype = "float64")
          Parallel(n_jobs=self.njobs, verbose=0, require="sharedmem")(delayed(self._decision_function)(c, preds, X) for c in range(self.nclasses))
          
          if not apply_softmax:
              return preds
          else:
              preds = np.exp(preds - preds.max(axis=1).reshape((-1, 1)))
              preds = preds/ preds.sum(axis=1).reshape((-1, 1))
              return 1 - preds
docs: Get cost estimates for each observation
          
          Note
          ----
          If called with apply_softmax = False, this will output the predicted
          COST rather than the 'goodness' - meaning, more is worse.
          
          If called with apply_softmax = True, it will output one minus the softmax on the costs,
          producing a distribution over the choices summing up to 1 where more is better.
          
          
          Parameters
          ----------
          X : array (n_samples, n_features)
              Data for which to predict the cost of each label.
          apply_softmax : bool
              Whether to apply a softmax transform to the costs (see Note).
          
          Returns
          -------
          pred : array (n_samples, n_classes)
              Either predicted cost or a distribution of 'goodness' over the choices,
              according to the apply_softmax argument.