MCPcopy Create free account
hub / github.com/Persper/code-analytics / _predict_binary

Function _predict_binary

persper/classifier.py:236–242  ·  view source on GitHub ↗

Make predictions using a single binary estimator

(pipeline, X)

Source from the content-addressed store, hash-verified

234 return pipeline
235
236def _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
245class BNSClassifier(BaseEstimator, ClassifierMixin):

Callers 1

predictMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected