Add screen width control in b_manage

This commit is contained in:
2024-07-15 18:06:39 +02:00
parent 2f2ed00ca1
commit f2556a30af
10 changed files with 108 additions and 76 deletions

View File

@@ -54,6 +54,10 @@ namespace platform {
std::vector<double> aucScores(nClasses, 0.0);
std::vector<std::pair<double, int>> scoresAndLabels;
for (size_t classIdx = 0; classIdx < nClasses; ++classIdx) {
if (classIdx >= y_proba.size(1)) {
std::cerr << "AUC warning - class index out of range" << std::endl;
return 0;
}
scoresAndLabels.clear();
for (size_t i = 0; i < nSamples; ++i) {
scoresAndLabels.emplace_back(y_proba[i][classIdx].item<float>(), y_testv[i] == classIdx ? 1 : 0);