MCPcopy Create free account
hub / github.com/modAL-python/modAL / _proba_entropy

Function _proba_entropy

modAL/uncertainty.py:49–60  ·  view source on GitHub ↗

Calculates the entropy of the prediction probabilities. Args: proba: Prediction probabilities. Returns: Uncertainty of the prediction probabilities.

(proba: np.ndarray)

Source from the content-addressed store, hash-verified

47
48
49def _proba_entropy(proba: np.ndarray) -> np.ndarray:
50 """
51 Calculates the entropy of the prediction probabilities.
52
53 Args:
54 proba: Prediction probabilities.
55
56 Returns:
57 Uncertainty of the prediction probabilities.
58 """
59
60 return np.transpose(entropy(np.transpose(proba)))
61
62
63def classifier_uncertainty(classifier: BaseEstimator, X: modALinput, **predict_proba_kwargs) -> np.ndarray:

Callers 1

expected_error_reductionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…