OTB
9.0.0
Orfeo Toolbox
|
#include <otbConfusionMatrixCalculator.h>
Public Types | |
typedef RefListLabelType::ValueType::ValueType | ClassLabelType |
typedef otb::ConfusionMatrixMeasurements< ConfusionMatrixType, ClassLabelType > | ConfusionMatrixMeasurementsType |
typedef itk::VariableSizeMatrix< unsigned long > | ConfusionMatrixType |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef std::map< ClassLabelType, int > | MapOfClassesType |
typedef std::map< int, ClassLabelType > | MapOfIndicesType |
typedef itk::VariableLengthVector< double > | MeasurementType |
typedef itk::SmartPointer< Self > | Pointer |
typedef ProdListLabelType::Pointer | ProdListLabelPointerType |
typedef TProdListLabel | ProdListLabelType |
typedef RefListLabelType::Pointer | RefListLabelPointerType |
typedef TRefListLabel | RefListLabelType |
typedef ConfusionMatrixCalculator | Self |
typedef itk::Object | Superclass |
Public Member Functions | |
void | Compute (void) |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
This class computes a confusion matrix from 2 lists of labels. It assumes that the 2 lists have the same length and uses the position of the labels in the lists to build the pairs reference/produced labels.
The rows and columns of the output confusion matrix are sorted according to increasing class labels.
For a 2 classes problem, the confusion matrix is organized as follows:
Please note that when accessing the confusion matrix values, the first index is the row index (reference samples), and the second is the column index (produced samples), so that accessing the false positive rate is done by calling GetConfusionMatrix()[1, 0] for the case of a 2 classes problem.
Some measurements are computed by this class: If we consider true positive (TP), true negative (TN), false positive (FP) and false negative (FP) rates, then in the 2 classes case:
In case of multiclasses problem, these measurements are extended by considering one class versus others.
Moreover overall accuracy and
index are computed.
Definition at line 58 of file otbConfusionMatrixCalculator.h.
typedef RefListLabelType::ValueType::ValueType otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::ClassLabelType |
Definition at line 80 of file otbConfusionMatrixCalculator.h.
typedef otb::ConfusionMatrixMeasurements<ConfusionMatrixType, ClassLabelType> otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::ConfusionMatrixMeasurementsType |
Type for the confusion matrix measurements calculator
Definition at line 88 of file otbConfusionMatrixCalculator.h.
typedef itk::VariableSizeMatrix<unsigned long> otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::ConfusionMatrixType |
Type for the confusion matrix
Definition at line 85 of file otbConfusionMatrixCalculator.h.
typedef itk::SmartPointer<const Self> otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::ConstPointer |
Definition at line 65 of file otbConfusionMatrixCalculator.h.
typedef std::map<ClassLabelType, int> otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::MapOfClassesType |
Definition at line 81 of file otbConfusionMatrixCalculator.h.
typedef std::map<int, ClassLabelType> otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::MapOfIndicesType |
Definition at line 82 of file otbConfusionMatrixCalculator.h.
typedef itk::VariableLengthVector<double> otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::MeasurementType |
Type for the measurement
Definition at line 91 of file otbConfusionMatrixCalculator.h.
typedef itk::SmartPointer<Self> otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::Pointer |
Definition at line 64 of file otbConfusionMatrixCalculator.h.
typedef ProdListLabelType::Pointer otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::ProdListLabelPointerType |
Definition at line 78 of file otbConfusionMatrixCalculator.h.
typedef TProdListLabel otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::ProdListLabelType |
Definition at line 77 of file otbConfusionMatrixCalculator.h.
typedef RefListLabelType::Pointer otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::RefListLabelPointerType |
Definition at line 75 of file otbConfusionMatrixCalculator.h.
typedef TRefListLabel otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::RefListLabelType |
List to store the corresponding labels
Definition at line 71 of file otbConfusionMatrixCalculator.h.
typedef ConfusionMatrixCalculator otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::Self |
Standard class typedefs
Definition at line 62 of file otbConfusionMatrixCalculator.h.
typedef itk::Object otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::Superclass |
Definition at line 63 of file otbConfusionMatrixCalculator.h.
|
protected |
Accessors
Definition at line 29 of file otbConfusionMatrixCalculator.hxx.
References otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::m_ConfMatMeasurements, otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::m_ConfusionMatrix, otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::m_NumberOfClasses, otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::m_ProducedLabels, otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::m_ReferenceLabels, and otb::ConfusionMatrixMeasurements< TConfusionMatrix, TLabel >::New().
|
inlineoverrideprotected |
Accessors
Definition at line 140 of file otbConfusionMatrixCalculator.h.
|
privatedelete |
Accessors
void otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::Compute | ( | void | ) |
Computes m_ConfusionMatrix and then the measurements over it.
Definition at line 51 of file otbConfusionMatrixCalculator.hxx.
References otbMsgDebugMacro.
virtual::itk::LightObject::Pointer otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::CreateAnother | ( | void | ) | const |
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
inline |
Accessors
Definition at line 125 of file otbConfusionMatrixCalculator.h.
|
inline |
Accessors
Definition at line 133 of file otbConfusionMatrixCalculator.h.
|
virtual |
Run-time type information (and related methods).
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
virtual |
Accessors
|
static |
Method for creation through the object factory.
|
privatedelete |
Accessors
|
overrideprotected |
Accessors
Definition at line 151 of file otbConfusionMatrixCalculator.hxx.
|
virtual |
Accessors
|
virtual |
Accessors
|
private |
Accessors
Definition at line 178 of file otbConfusionMatrixCalculator.h.
Referenced by otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::ConfusionMatrixCalculator().
|
private |
Accessors
Definition at line 177 of file otbConfusionMatrixCalculator.h.
Referenced by otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::ConfusionMatrixCalculator().
|
private |
Accessors
Definition at line 162 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 153 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 164 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 155 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 169 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 160 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 150 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 171 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 172 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 174 of file otbConfusionMatrixCalculator.h.
Referenced by otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::ConfusionMatrixCalculator().
|
private |
Accessors
Definition at line 175 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 151 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 167 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 158 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 181 of file otbConfusionMatrixCalculator.h.
Referenced by otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::ConfusionMatrixCalculator().
|
private |
Accessors
Definition at line 168 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 159 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 180 of file otbConfusionMatrixCalculator.h.
Referenced by otb::ConfusionMatrixCalculator< TRefListLabel, TProdListLabel >::ConfusionMatrixCalculator().
|
private |
Accessors
Definition at line 163 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 154 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 165 of file otbConfusionMatrixCalculator.h.
|
private |
Accessors
Definition at line 156 of file otbConfusionMatrixCalculator.h.