Skip to contents

Accuracy of a key followed by machine

Usage

evaluateKey(key, scores, labels, groups = NULL)

Arguments

key

A dimoose key with Feature, Test and Threshold lead columns, e.g. from keyFromTerms().

scores

A numeric matrix, one row per object, with a column for every feature id the key tests (see featureScores() and scoreImages()).

labels

True label of each row of scores.

groups

Optional named vector mapping labels to coarser groups (e.g. model years to generations) for a second accuracy figure.

Value

A list: results (one row per object with actual, predicted, correct, groupCorrect), accuracy, groupAccuracy and confusion.