Python script clfConfusionMatrix
See also
python.packages.clfConfusionMatrix

Aim of module

Compute and print the confusion matrix for two (integer) attributes of the ODM.

General description

This script can be used to evaluate the accuracy of a classification, based on a reference classification. The confusion matrix reveals classes that can be estimated well (w.r.t. completeness and correctness) and problematic ones by checking EoO (Error of Omission) and EoC (Error of Correctness).

Parameter description

-inFile Path to ODM file
Type : PathArgument
Remark : mandatory
Description:
-refAttr Point attribute containing reference class. (default: Classification)
Type : String
Remark : optional, default: 'Classification'
Description:
-estimAttr Point attribute containing estimated class. (default: _class)
Type : String
Remark : optional, default: '_class'
Description:
-filter DataManager filter for pre-selection of points.
Type : String
Remark : optional
Description:
-nullVal Integer value representing NULL-values of the ODM. (default: -9999)
Type : Integer
Remark : optional, default: -9999
Description:

Examples

The data used in the following example are located in the $OPALS_ROOT/demo/classify directory of the OPALS distribution. The three commands in the section below perform a full classification workflow on the Niederrhein demo dataset:

preAttribute.py -i niederrhein.laz -c preAttributeNiederrhein.cfg -o .
clfTreeModelTrain.py -i niederrhein.odm -c clfTrainNiederrhein.cfg
clfTreeModelApply.py -i niederrhein.odm -c clfApplyNiederrhein.cfg

After running the above commands, confusion matrix can be printed with the following command:

clfConfusionMatrix.py -inFile niederrhein.odm -refAttr Classification -estimAttr _classEstim
@ c
focal length (opalsStripAdjust)
@ Classification
See LAS spec.