MCPcopy
hub / github.com/scikit-learn/scikit-learn / predict_log_proba

Method predict_log_proba

sklearn/dummy.py:402–422  ·  view source on GitHub ↗

Return log probability estimates for the test vectors X. Parameters ---------- X : {array-like, object with finite length or shape} Training data. Returns ------- P : ndarray of shape (n_samples, n_classes) or list of such arrays

(self, X)

Source from the content-addressed store, hash-verified

400 return P
401
402 def predict_log_proba(self, X):
403 """
404 Return log probability estimates for the test vectors X.
405
406 Parameters
407 ----------
408 X : {array-like, object with finite length or shape}
409 Training data.
410
411 Returns
412 -------
413 P : ndarray of shape (n_samples, n_classes) or list of such arrays
414 Returns the log probability of the sample for each class in
415 the model, where classes are ordered arithmetically for each
416 output.
417 """
418 proba = self.predict_proba(X)
419 if self.n_outputs_ == 1:
420 return np.log(proba)
421 else:
422 return [np.log(p) for p in proba]
423
424 def __sklearn_tags__(self):
425 tags = super().__sklearn_tags__()

Callers

nothing calls this directly

Calls 1

predict_probaMethod · 0.95

Tested by

no test coverage detected