<!--
{
  "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 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLModel/predictionFromFeatures:completionHandler:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core ML"
    ],
    "preciseIdentifier" : "c:objc(cs)MLModel(im)predictionFromFeatures:completionHandler:"
  },
  "title" : "predictionFromFeatures:completionHandler:"
}
-->

# predictionFromFeatures:completionHandler:

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

```
- (void) predictionFromFeatures:(id<MLFeatureProvider>) input completionHandler:(void (^)(id<MLFeatureProvider>output, NSError *error)) completionHandler;
```

## Parameters

`input`

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

`completionHandler`

The callback the system invokes when it completes the prediction.

- output: A feature provider that contains the outputs of the prediction.
- error: If an error occurs, an error object that describes the error; otherwise, `nil`.

---

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)