A sequence of data used as a feature input or feature output for a model.
- iOS 12.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- tvOS 12.0+
- watchOS 5.0+
- Core ML
Data from sensors (a time series) or language (a series of words) are often manipulated as sequences by machine learning models. These sequences can have variable lengths depending on their context.
MLSequence explicitly encodes a sequence of strings or integers to support a series of data points as a single input.
If you need to process a sequence of values individually, one at a time, see Making Predictions with a Sequence of Inputs for details.