DataPredict

API Reference - Others - ConfusionMatrixCreator

The confusion matrix serves as a tool for assessing a model’s misclassifications. It is generated by comparing the actual labels with the predicted labels.

Constructors

new()

Creates a ModelDatasetCreator object.

ConfusionMatrixCreator.new(ClassesList: []): ConfusionMatrixCreatorObject

Parameters

ClassesList: A list of classes. The index of the class relates to which the neuron at output layer belong to. For example, {3, 1} means that the output for 3 is at first neuron, and the output for 1 is at second neuron.

Functions

setParameters()

ConfusionMatrixCreator:setParameters(ClassesList: [])

Parameters

ClassesList: A list of classes. The index of the class relates to which the neuron at output layer belong to. For example, {3, 1} means that the output for 3 is at first neuron, and the output for 1 is at second neuron.

createConfusionMatrix()

Creates a confusion matrix. The rows represent actual classes, columns represent predicted classes.

ConfusionMatrixCreator:createConfusionMatrix(trueLabelVector: matrix, predictedLabelVector: matrix): matrix

Parameters:

Returns:

printConfusionMatrix()

Prints out a confusion matrix. The rows represent actual classes and the columns represent predicted classes.

ConfusionMatrixCreator:printConfusionMatrix(trueLabelVector: matrix, predictedLabelVector: matrix): matrix

Parameters:

Returns: