# IMLPredictor

Predictors are lightweight primitives for making predictions with one or more [`MLModel`](/unity/api/mlmodel.md) instances. The `IMLPredictor` interface is designed specifically for working with Edge ML models, which make predictions on-device.

## Making Predictions

```csharp
/// <summary>
/// Make a prediction on one or more input features.
/// </summary>
/// <param name="inputs">Input features.</param>
/// <returns>Prediction output.</returns>
TOutput Predict (params MLFeature[] inputs);
```

*This is where the magic happens*. The predictor should convert input features into `MLEdgeFeature` (for edge predictions) or `MLCloudFeature` instances depending on the type of the underlying model. Once the prediction is completed by the model, the predictor should then transform the output features into types that are easily consumed by applications.

{% hint style="success" %}
See [`MLEdgeModel`](/unity/api/mlmodel/mledgemodel.md) for more information on implementing edge predictors.
{% endhint %}

{% hint style="success" %}
See [`MLCloudModel`](/unity/api/mlmodel/mlcloudmodel.md) for more information on implementing cloud predictors.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.natml.ai/unity/api/imlpredictor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
