<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLClassifierMetrics/confusionDataFrame",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML19MLClassifierMetricsV18confusionDataFrame07TabularF00fG0Vvp"
  },
  "title" : "confusionDataFrame"
}
-->

# confusionDataFrame

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

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

## 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.

![A table showing the format of the confusion matrix containing rows for the true label the label predicted by](images/com.apple.createml/MLClassifierMetrics-confusion-1@2x.png)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)