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

Function _proba_uncertainty

modAL/uncertainty.py:15–26  ·  view source on GitHub ↗

Calculates the uncertainty 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

13
14
15def _proba_uncertainty(proba: np.ndarray) -> np.ndarray:
16 """
17 Calculates the uncertainty of the prediction probabilities.
18
19 Args:
20 proba: Prediction probabilities.
21
22 Returns:
23 Uncertainty of the prediction probabilities.
24 """
25
26 return 1 - np.max(proba, axis=1)
27
28
29def _proba_margin(proba: np.ndarray) -> 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…