The options available when making a prediction.
SDKs
- iOS 11.0+
- macOS 10.13+
- UIKit for Mac 13.0+Beta
- tvOS 11.0+
- watchOS 4.0+
Framework
- Core ML
Declaration
class MLPredictionOptions : NSObject
The options available when making a prediction.
SDKs
Framework
class MLPredictionOptions : NSObject
var uses CPUOnly: Bool
A Boolean value that indicates whether a prediction is computed using only the CPU.
func prediction(from: MLFeature Provider) -> MLFeature Provider
Predicts output feature values from the given input feature values.
func prediction(from: MLFeature Provider, options: MLPrediction Options) -> MLFeature Provider
Predicts output feature values from the given input feature values and prediction options.
func predictions(from Batch: MLBatch Provider) -> MLBatch Provider
Predicts output feature values from the given a batch of input feature values.
func predictions(from: MLBatch Provider, options: MLPrediction Options) -> MLBatch Provider
Predicts output feature values from the given a batch of input feature values and prediction options.
protocol MLFeature Provider
An interface that represents a collection of values for either a model's input or its output.
protocol MLBatch Provider
An interface that represents a collection of feature providers.
Beta Software
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.
Learn more about using Apple's beta software