Make predictions using a single binary estimator
(pipeline, X)
| 234 | return pipeline |
| 235 | |
| 236 | def _predict_binary(pipeline, X): |
| 237 | """Make predictions using a single binary estimator""" |
| 238 | try: |
| 239 | score = np.ravel(pipeline.decision_function(X)) |
| 240 | except (AttributeError, NotImplementedError): |
| 241 | score = pipeline.predict_proba(X)[:, 1] |
| 242 | return score |
| 243 | |
| 244 | |
| 245 | class BNSClassifier(BaseEstimator, ClassifierMixin): |