(outputs, targets)
| 145 | |
| 146 | |
| 147 | def mean_per_class(outputs, targets): |
| 148 | pred = outputs.argmax(1) |
| 149 | confusion_matrix = metrics.confusion_matrix(targets, pred) |
| 150 | per_classes = confusion_matrix.diagonal() / confusion_matrix.sum(axis=1) |
| 151 | |
| 152 | return 100 * per_classes.mean() |
| 153 | |
| 154 | |
| 155 | def roc_auc(outputs, targets): |
no outgoing calls
no test coverage detected