- See also
- python.workflows.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 : Path
Remark : mandatory
-refAttr Point attribute containing reference class.
Type : String
Remark : optional, default: Classification
-estimAttr Point attribute containing estimated class.
Type : String
Remark : optional, default: _class
-filter DataManager filter for pre-selection of points.
Type : String
Remark : optional
-nullVal Integer value representing NULL-values of the ODM.
Type : Integer
Remark : optional, default: -9999
Logging Options
Settings concerning the verbosity level of logging.
-fileLogLevel Log level in the logfile
Type : LogLevel
Remark : optional, default: info
-screenLogLevel Log level on screen
Type : LogLevel
Remark : optional, default: info
-logger Logger
Type : Logger
Remark : optional
Description: Logger is usually provided by the opals framework.The user may provide their own logger object, but it has to function in the same way as the opals Logger.
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