<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLTextClassifier/predictionsWithConfidence(from:)-uezi",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Create ML",
      "CreateML"
    ],
    "preciseIdentifier" : "s:8CreateML16MLTextClassifierV25predictionsWithConfidence4fromSaySDySSSdGGSaySSG_tKF"
  },
  "title" : "predictionsWithConfidence(from:)"
}
-->

# predictionsWithConfidence(from:)

Predicts multiple possible labels and their confidence scores for each string in the specified array.

```
func predictionsWithConfidence(from texts: [String]) throws -> [[String : Double]]
```

## Parameters

`texts`

The array of strings to classify.

## Return Value

An array of dictionaries. Each dictionary corresponds to a string in the input array.
A dictionary entry contains a label prediction with its associated confidence score.

---

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)