torch_concepts.nn.functional.completeness_score¶
- completeness_score(y_true, y_pred_blackbox, y_pred_whitebox, scorer=<function roc_auc_score>, average='macro')[source]¶
Calculate the completeness score for the given predictions and true labels. Main reference: “On Completeness-aware Concept-Based Explanations in Deep Neural Networks”
- Parameters:
y_true (torch.Tensor) – True labels.
y_pred_blackbox (torch.Tensor) – Predictions from the blackbox model.
y_pred_whitebox (torch.Tensor) – Predictions from the whitebox model.
scorer (function) – Scoring function to evaluate predictions. Default is roc_auc_score.
average (str) – Type of averaging to use. Default is ‘macro’.
- Returns:
Completeness score.
- Return type: