Direct Graphical Models  v.1.5.2
Collaboration diagram for Evaluation:


class  DirectGraphicalModels::CCMat
 Confusion matrix class. More...


float DirectGraphicalModels::getAveragePrecision (const vec_byte_t &predictions, const vec_float_t &potentials, const vec_byte_t &gt, byte state)
 Returns Average Precision for the selected state (class) state. More...

Detailed Description

Function Documentation

◆ getAveragePrecision()

float DirectGraphicalModels::getAveragePrecision ( const vec_byte_t &  predictions,
const vec_float_t &  potentials,
const vec_byte_t &  gt,
byte  state 

Returns Average Precision for the selected state (class) state.

predictionsThe most probable configuration, returned by the CDecode::decode() function
potentialsThe potential values for each node of the graph, returned by the CInfer::getPotentials() function
gtThe groundtruth values for each node of the graph. May be converted from a groundtruth image as follows:
vec_byte_t gt(, + gtImg.cols * gtImg.rows);
stateThe state (class) for which the Average Precision is calculated
The Average Precision value

Definition at line 6 of file AveragePrecision.cpp.