confusionMatrix
Syntax
Description
[
computes the confusion matrix for all overlap thresholds in the confMat,confusionClassNames] = confusionMatrix(metrics)OverlapThreshold property of metrics, and
returns the confusion matrix and the class names. The function considers all
detections to compute the confusion matrix.
[
specifies one or more name-value arguments. For example,
confMat,confusionClassNames] = confusionMatrix(metrics,Name=Value)ScoreThreshold=0.3 specifies to disregard detections with a
confidence score value below 0.3 when computing the confusion
matrix.
Input Arguments
Name-Value Arguments
Output Arguments
Tips
Normalize the confusion matrix output of the confusionMatrix function
in these ways:
Specify the
Normalizename-value argument astrueto divide each entry of the confusion matrix,confMat, by the sum of the corresponding column, so each value represents the proportion of predicted bounding boxes for a given class.For additional normalization options, use the
confusionchart(Deep Learning Toolbox) function. Pass the confusion matrix,confMat, to theconfusionchartfunction, and specify thename-value argument. You can use this option to normalize the confusion matrix by row or by the total number of detected bounding boxes, in addition to column normalization.Normalization(Deep Learning Toolbox)
Version History
Introduced in R2024b
