<!--
{
  "availability" : [
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLRecommenderMetrics",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML20MLRecommenderMetricsV"
  },
  "title" : "MLRecommenderMetrics"
}
-->

# MLRecommenderMetrics

Metrics you use to evaluate a recommender’s performance.

```
struct MLRecommenderMetrics
```

## Topics

### Assessing the model

[`excludingObserved`](/documentation/CreateML/MLRecommenderMetrics/excludingObserved)

A Boolean value that indicates whether the recommender omitted training data from the recommendations.

[`precisionRecall`](/documentation/CreateML/MLRecommenderMetrics/precisionRecall)

A data table with the recall and precision for each item.

[`precisionRecallDataFrame`](/documentation/CreateML/MLRecommenderMetrics/precisionRecallDataFrame)

A data table with the recall and precision for each item.

### Handling errors

[`isValid`](/documentation/CreateML/MLRecommenderMetrics/isValid)

A Boolean value indicating whether the recommender model was able to calculate metrics.

[`error`](/documentation/CreateML/MLRecommenderMetrics/error)

The underlying error present when the metrics are invalid.

### Creating metrics

[`init(precisionRecall:excludingObserved:)`](/documentation/CreateML/MLRecommenderMetrics/init(precisionRecall:excludingObserved:))

Creates metrics for a recommender, given a data table with precision and recall metric columns, and whether the
recommender omitted training data.



---

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)