Instance Method

prediction(from:options:)

Predicts output feature values from the given input feature values and prediction options.

Declaration

func prediction(from input: MLFeatureProvider, options: MLPredictionOptions) throws -> MLFeatureProvider

Parameters

input

All the feature values the model needs to make its prediction.

options

All the options to be applied to the prediction.

Return Value

A feature provider that represents the model’s prediction.

See Also

Making Predictions

func prediction(from: MLFeatureProvider) -> MLFeatureProvider

Predicts output feature values from the given input feature values.

func predictions(fromBatch: MLBatchProvider) -> MLBatchProvider

Predicts output feature values from the given a batch of input feature values.

func predictions(from: MLBatchProvider, options: MLPredictionOptions) -> MLBatchProvider

Predicts output feature values from the given a batch of input feature values and prediction options.

protocol MLFeatureProvider

An interface that represents a collection of values for either a model's input or its output.

protocol MLBatchProvider

An interface that represents a collection of feature providers.

class MLPredictionOptions

The options available when making a prediction.