---
title: "predictionsWithConfidence(from:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mltextclassifier/predictionswithconfidence(from:)"
---

# predictionsWithConfidence(from:)

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

## Declaration

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

## Parameters

- `texts`: The array of strings to classify.

## Return Value

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.

## See Also

### Testing a text classifier

- [prediction(from:)](createml/mltextclassifier/prediction(from:).md)
- [predictions(from:)](createml/mltextclassifier/predictions(from:).md)
- [predictionWithConfidence(from:)](createml/mltextclassifier/predictionwithconfidence(from:).md)
