<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLModel/prediction(from:)-9y2aa",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core ML"
    ],
    "preciseIdentifier" : "c:objc(cs)MLModel(im)predictionFromFeatures:error:"
  },
  "title" : "prediction(from:)"
}
-->

# prediction(from:)

Generates a prediction from the feature values within the input feature provider.

```
func prediction(from input: any MLFeatureProvider) throws -> any MLFeatureProvider
```

## Parameters

`input`

A feature provider that stores all the input feature values the model needs for a prediction.

## Return Value

A feature provider that contains the outputs of the prediction.

## Discussion

Use this method to make a single prediction.

---

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)