Graz visualization Box with 4 classes
Posted: Thu Oct 05, 2017 11:38 pm
Hello,
I am working on revising graz visualization box to show accuracy bar for 4 class(Left,Right,Down and Up)
Looking at the source code, i found following areas with notes:
// @fixme for >2 classes
void CGrazVisualization::updateConfusionMatrix(float64 f64VoteAggregate)
{
if(m_eCurrentDirection == EArrowDirection_Left || m_eCurrentDirection == EArrowDirection_Right)
{
const uint32 l_ui32TrueDirection = m_eCurrentDirection - 1;
const uint32 l_ui32ThisVote = (f64VoteAggregate < 0 ? 0 : 1);
(m_oConfusion.getBuffer())[l_ui32TrueDirection*2 + l_ui32ThisVote]++;
void CGrazVisualization::drawBar()
{
const gint l_iWindowWidth = m_pDrawingArea->allocation.width;
const gint l_iWindowHeight = m_pDrawingArea->allocation.height;
float64 l_f64UsedScale = m_f64BarScale;
if(m_bPositiveFeedbackOnly)
{
// @fixme for multiclass
const uint32 l_ui32TrueDirection = m_eCurrentDirection - 1;
const uint32 l_ui32ThisVote = (m_f64BarScale < 0 ? 0 : 1);
if(l_ui32TrueDirection != l_ui32ThisVote)
{
l_f64UsedScale = 0;
}
}
gint l_iRectangleWidth = static_cast<gint>(fabs(l_iWindowWidth * fabs(l_f64UsedScale) / 2));
l_iRectangleWidth = (l_iRectangleWidth>(l_iWindowWidth/2)) ? (l_iWindowWidth/2) : l_iRectangleWidth;
void CGrazVisualization::drawArrow(EArrowDirection eDirection)
{
gint l_iWindowWidth = m_pDrawingArea->allocation.width;
gint l_iWindowHeight = m_pDrawingArea->allocation.height;
gint l_iX = 0;
gint l_iY = 0;
switch(eDirection)
{
case EArrowDirection_None:
this->drawArrow(EArrowDirection_Left);
this->drawArrow(EArrowDirection_Right);
// this->drawArrow(EArrowDirection_Up);
// this->drawArrow(EArrowDirection_Down);
break;
I don't know c++. Can anybody help me with that?
Thanks.
I am working on revising graz visualization box to show accuracy bar for 4 class(Left,Right,Down and Up)
Looking at the source code, i found following areas with notes:
// @fixme for >2 classes
void CGrazVisualization::updateConfusionMatrix(float64 f64VoteAggregate)
{
if(m_eCurrentDirection == EArrowDirection_Left || m_eCurrentDirection == EArrowDirection_Right)
{
const uint32 l_ui32TrueDirection = m_eCurrentDirection - 1;
const uint32 l_ui32ThisVote = (f64VoteAggregate < 0 ? 0 : 1);
(m_oConfusion.getBuffer())[l_ui32TrueDirection*2 + l_ui32ThisVote]++;
void CGrazVisualization::drawBar()
{
const gint l_iWindowWidth = m_pDrawingArea->allocation.width;
const gint l_iWindowHeight = m_pDrawingArea->allocation.height;
float64 l_f64UsedScale = m_f64BarScale;
if(m_bPositiveFeedbackOnly)
{
// @fixme for multiclass
const uint32 l_ui32TrueDirection = m_eCurrentDirection - 1;
const uint32 l_ui32ThisVote = (m_f64BarScale < 0 ? 0 : 1);
if(l_ui32TrueDirection != l_ui32ThisVote)
{
l_f64UsedScale = 0;
}
}
gint l_iRectangleWidth = static_cast<gint>(fabs(l_iWindowWidth * fabs(l_f64UsedScale) / 2));
l_iRectangleWidth = (l_iRectangleWidth>(l_iWindowWidth/2)) ? (l_iWindowWidth/2) : l_iRectangleWidth;
void CGrazVisualization::drawArrow(EArrowDirection eDirection)
{
gint l_iWindowWidth = m_pDrawingArea->allocation.width;
gint l_iWindowHeight = m_pDrawingArea->allocation.height;
gint l_iX = 0;
gint l_iY = 0;
switch(eDirection)
{
case EArrowDirection_None:
this->drawArrow(EArrowDirection_Left);
this->drawArrow(EArrowDirection_Right);
// this->drawArrow(EArrowDirection_Up);
// this->drawArrow(EArrowDirection_Down);
break;
I don't know c++. Can anybody help me with that?
Thanks.