Calculates the uncertainty of the prediction probabilities. Args: proba: Prediction probabilities. Returns: Uncertainty of the prediction probabilities.
(proba: np.ndarray)
| 13 | |
| 14 | |
| 15 | def _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 | |
| 29 | def _proba_margin(proba: np.ndarray) -> np.ndarray: |
no outgoing calls
no test coverage detected
searching dependent graphs…