code: def decision_function(self, X):
  		
  		if not hasattr(self, 'coef_') or self.coef_ is None:
  			raise NotFittedError("This %(name)s instance is not fitted "
  								 "yet" % {'name': type(self).__name__})
  
  		# Number of NER features. These can be int
  		n_ner = len(self.B)
  
  		X_fea = X[ : , :-n_ner]
  		X_ner = X[ : , -n_ner:]
  
  		X_fea = check_array(X_fea, dtype=bool, accept_sparse='csr')
  		X_ner = check_array(X_ner, dtype=int, ensure_min_features=0, accept_sparse='csr')
  
  		n_features = self.coef_.shape[1]
  		if X.shape[1] != n_features:
  			raise ValueError("X has %d features per sample; expecting %d" % (X.shape[1], n_features))
  
  		scores = safe_sparse_dot(X, self.coef_.T, dense_output=True) + self.intercept_
  		return scores.ravel() if scores.shape[1] == 1 else scores
docs: Predict confidence scores for samples.
  		The confidence score for a sample is the signed distance of that
  		sample to the hyperplane.
  		
  		Args:
  			X : {array-like, sparse matrix}, shape = (n_samples, n_features)
  				Samples.
  		Returns:
  			array, shape=(n_samples,) if n_classes == 2 else (n_samples, n_classes)
  			Confidence scores per (sample, class) combination. In the binary
  			case, confidence score for self.classes_[1] where >0 means this
  			class would be predicted.
  
  		Note: This is a copy of the method in `sklearn.linear_model.base.LinearClassifierMixin()`,
  			changed the `check_array` to convert X to boolean.