Base abstract class for random model inference.
More...
#include <Infer.h>
Base abstract class for random model inference.
- Author
- Sergey G. Kosov, serge.nosp@m.y.ko.nosp@m.sov@p.nosp@m.roje.nosp@m.ct-10.nosp@m..de
Definition at line 19 of file Infer.h.
DirectGraphicalModels::CInfer::CInfer |
( |
CGraph * |
pGraph | ) |
|
|
inline |
Constructor.
- Parameters
-
Definition at line 26 of file Infer.h.
virtual DirectGraphicalModels::CInfer::~CInfer |
( |
void |
| ) |
|
|
inlinevirtual |
virtual vec_byte_t DirectGraphicalModels::CInfer::decode |
( |
unsigned int |
nIt = 0 , |
|
|
Mat & |
lossMatrix = Mat() |
|
) |
| |
|
inlinevirtual |
Approximate decoding.
This function calls first inference infer() and then, using resulting marginal probabilities, estimates the most probable configuration of states (classes) in the graph via CDecode::decode().
This function modifies Node::Pot containers of graph nodes
- Parameters
-
nIt | Number of iterations |
lossMatrix | (optional) The loss matrix \(L\) (size: nStates x nStates; type: CV_32FC1). It must be a quadratic zero-diagonal matrix, whith all non-diagonal elements \(L_{i,j} > 0, \forall i\neq j\). The elemets \(L_{i,j}\) represent a loss if state \(j\) is classified as a state \(i\). |
- Returns
- The most probable configuration
- Note
- This function estimates the most likely configuration, based on the marginal probabilities (potentials) in graph nodes, which in general is NOT the same as the set of most likely states, which corresponds to the configuration with the highest joint probability. In other words:
Definition at line 50 of file Infer.h.
vec_float_t DirectGraphicalModels::CInfer::getConfidence |
( |
void |
| ) |
const |
Returns the confidence of the prediction.
This function calculates the confidence values for the predicted states (classes) in the graph via CInfer::decode(). The confidence values lie in range [0; 1].
- Returns
- The confidence values for each node of graph.
Definition at line 6 of file Infer.cpp.
vec_float_t DirectGraphicalModels::CInfer::getPotentials |
( |
byte |
state | ) |
const |
Returns the potnetials for the selected state (class)
- Parameters
-
state | The state (class) of interest |
- Returns
- The potential values for each node of the graph.
Definition at line 27 of file Infer.cpp.
virtual void DirectGraphicalModels::CInfer::infer |
( |
unsigned int |
nIt = 1 | ) |
|
|
pure virtual |
The documentation for this class was generated from the following files: