def decision_function(self, X):
if not hasattr(self, '<STR_LIT>') or self.coef_ is None:<EOL><INDENT>raise NotFittedError("<STR_LIT>"<EOL>"<STR_LIT>" % {'<STR_LIT:name>': type(self).__name__})<EOL><DEDENT>n_ner = len(self.B)<EOL>X_fea = X[:, :-n_ner]<EOL>X_ner = X[:, -n_ner:]<EOL>X_fea = check_array(X_fea, dtype=bool, accept_sparse='<STR_LIT>')<EOL>X_ner = check_array(<EOL>X_ner, dtype=int, ensure_min_features=<NUM_LIT:0>, accept_sparse='<STR_LIT>')<EOL>n_features = self.coef_.shape[<NUM_LIT:1>]<EOL>if X.shape[<NUM_LIT:1>] != n_features:<EOL><INDENT>raise ValueError("<STR_LIT>" % (<EOL>X.shape[<NUM_LIT:1>], n_features))<EOL><DEDENT>scores = safe_sparse_dot(<EOL>X, self.coef_.T, dense_output=True) + self.intercept_<EOL>return scores.ravel() if scores.shape[<NUM_LIT:1>] == <NUM_LIT:1> else scores<EOL>
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.