ConfusionMatrix Class

Definition

Represents the confusion matrix of the classification results.

public sealed class ConfusionMatrix
type ConfusionMatrix = class
Public NotInheritable Class ConfusionMatrix
Inheritance
ConfusionMatrix

Properties

Counts

The confusion matrix counts for the combinations actual class/predicted class. The actual classes are in the rows of the table (stored in the outer IReadOnlyList<T>), and the predicted classes in the columns(stored in the inner IReadOnlyList<T>).

NumberOfClasses

The indicators of the predicted classes. It might be the classes names, or just indices of the predicted classes, if the name mapping is missing.

PerClassPrecision

The calculated value of precision for each class.

PerClassRecall

The calculated value of recall for each class.

Methods

GetCountForClassPair(Int32, Int32)

Gets the confusion table count for the pair predictedClassIndicatorIndex/actualClassIndicatorIndex.

GetFormattedConfusionTable()

Returns a human readable representation of the confusion table.

Applies to