Calculates the entropy of the prediction probabilities. Args: proba: Prediction probabilities. Returns: Uncertainty of the prediction probabilities.
(proba: np.ndarray)
| 47 | |
| 48 | |
| 49 | def _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 | |
| 63 | def classifier_uncertainty(classifier: BaseEstimator, X: modALinput, **predict_proba_kwargs) -> np.ndarray: |
no outgoing calls
no test coverage detected
searching dependent graphs…