---
title: "prediction(from:)"
framework: coreml
role: symbol
role_heading: Instance Method
path: "coreml/mlmodel/prediction(from:)-9y2aa"
---

# prediction(from:)

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

## Declaration

```swift
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.

## Mentioned in

Creating and Integrating a Model with Custom Layers

## Return Value

Return Value A feature provider that contains the outputs of the prediction.

## Discussion

Discussion Use this method to make a single prediction.
