Instance Property

precisionRecall

A data table listing the precision and recall percentages for each category.

Declaration

var precisionRecall: MLDataTable { get }

Discussion

Precision and recall are metrics calculated for each classification category. Together they describe the tradeoff between misapplying a label too liberally and missing examples of that label.

Precision describes how effective the model was at applying a label only when appropriate for a given category (few false positives).

Recall describes how effective the model was at finding all the relevant examples of a category (few false negatives).

The figure below shows how each example contributes to the precision and recall percentages for the category “Elephant”.

A table of actual and predicted labels for the Elephant category.

“Elephant” appears as the true or correct label only once, but it’s predicted twice. This second prediction is an error in precision. Precision and recall can give you a much better idea of how your model is making mistakes than classificationError.

To determine what other categories “Elephant” examples may have been labeled with, see the confusion property.

See Also

Understanding the Model

var classificationError: Double

The fraction of incorrectly labeled examples.

var confusion: MLDataTable

A table comparing the actual and predicted labels for each classification category.