Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 3a74216a authored by MONSEIGNE Thibaut's avatar MONSEIGNE Thibaut
Browse files

Boxes: Bar Scale Optimisation

parent 8b6317e8
Branches
Tags
1 merge request!33tmonseigne generalized graz visualization
......@@ -383,9 +383,12 @@ void CGrazMultiVisualization::aggregatePredictions(const bool all)
}
for (const auto& a : amp) { sum += a; }
// Computes bar scale for each modality as a probability (other possibility substract the min/max value or the mean of the values)
// Then we put this probability between 0-1 to 0-1 but when 0 is equal to 1/m_nbModality
const double minV = 1.0 / m_nbModality,
factorV = 1.0 / (1 - minV);
for (size_t i = 0; i < amp.size(); ++i)
{
m_barScales[i] = amp[i] / sum;
m_barScales[i] = (amp[i] / sum - minV) * factorV;
if (amp[m_vote] < amp[i]) { m_vote = i; }
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment