---
title: confusionDataFrame
framework: createml
role: symbol
role_heading: Instance Property
path: createml/mlclassifiermetrics/confusiondataframe
---

# confusionDataFrame

A data frame comparing the actual and predicted labels for each class.

## Declaration

```swift
var confusionDataFrame: DataFrame { get }
```

## Discussion

Discussion The confusion data frame describes how examples were mislabeled between categories. Each row contains the true label, the predicted label, and the number of instances of that combination. For example, the table below lists that “business” was labeled correctly with “business” 113 times, while “business” was confused with “entertainment” 2 times.

## See Also

### Understanding the model

- [classificationError](createml/mlclassifiermetrics/classificationerror.md)
- [precisionRecall](createml/mlclassifiermetrics/precisionrecall.md)
- [confusion](createml/mlclassifiermetrics/confusion.md)
- [precisionRecallDataFrame](createml/mlclassifiermetrics/precisionrecalldataframe.md)
