An interface that represents a collection of feature providers.


protocol MLBatchProvider


Similar to the MLFeatureProvider, this interface allows you to define your own batch provider. If you collect your data asynchronously or it is memory intensive, implement this protocol on your data structure to optimize performance with batch processing.


Accessing Values

func features(at: Int) -> MLFeatureProvider

Returns the feature provider at the given index.


var count: Int

The number of feature providers in this batch.



Conforming Types

See Also

Model Features

class MLFeatureValue

A feature's value and its type bundled as a read-only instance.

protocol MLFeatureProvider

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

class MLDictionaryFeatureProvider

A convenience wrapper for the given dictionary of data.

class MLArrayBatchProvider

A convenience wrapper for batches 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