One Logo Pool Ball
Machine Learning · IOS API REFERENCE

CreateMLComponents

Create more customizable machine learning models in your app.

543 types

1,010 callable entries

502 skipped

67% entry coverage

Generated from iOS SDK 27.1. Availability is shown on each declaration; permissions and entitlements still apply.

Types

AnnotatedBatch

struct · iOS 18.0+

AnnotatedFeature

struct · iOS 16.0+

AnnotatedFeatureProvider

struct · iOS 16.0+

AnnotatedFeatureProvider.Annotation

typealias · iOS 16.0+

AnnotatedFeatureProvider.Transformer

typealias · iOS 16.0+

AnnotatedFiles

struct · iOS 16.0+

AnnotatedFiles.Element

typealias · iOS 16.0+

AnnotatedFiles.Index

typealias · iOS 16.0+

AnnotatedFiles.Indices

typealias · iOS 16.0+

AnnotatedFiles.Iterator

typealias · iOS 16.0+

AnnotatedFiles.SubSequence

typealias · iOS 16.0+

AnnotatedPrediction

struct · iOS 17.0+

AnyTemporalIterator

struct · iOS 16.0+

AnyTemporalSequence

struct · iOS 16.0+

AnyTemporalSequence.AsyncIterator

typealias · iOS 16.0+

AnyTemporalSequence.Element

typealias · iOS 16.0+

ApplyEachRandomly

struct · iOS 17.0+

ApplyEachRandomly.Input

typealias · iOS 17.0+

ApplyEachRandomly.Output

typealias · iOS 17.0+

ApplyRandomly

struct · iOS 17.0+

ApplyRandomly.Input

typealias · iOS 17.0+

ApplyRandomly.Output

typealias · iOS 17.0+

AudioConvertingTransformer

struct · iOS 16.0+

AudioConvertingTransformer.Input

typealias · iOS 16.0+

AudioConvertingTransformer.Output

typealias · iOS 16.0+

AudioFeaturePrint

struct · iOS 16.0+

AudioFeaturePrint.FeatureSequence

struct · iOS 16.0+

AudioFeaturePrint.FeatureSequence.AsyncIterator

typealias · iOS 16.0+

AudioFeaturePrint.FeatureSequence.Element

typealias · iOS 16.0+

AudioFeaturePrint.FeatureSequence.Feature

typealias · iOS 16.0+

AudioFeaturePrint.FeatureSequence.Iterator

struct · iOS 16.0+

AudioFeaturePrint.FeatureSequence.Iterator.Element

typealias · iOS 16.0+

AudioFeaturePrint.Input

typealias · iOS 16.0+

AudioFeaturePrint.Output

typealias · iOS 16.0+

AudioFeaturePrint.OutputSequence

typealias · iOS 16.0+

AudioPreprocessingError

enum · iOS 16.0+

AudioReader

struct · iOS 16.0+

AudioReader.AsyncBuffers

struct · iOS 16.0+

AudioReader.AsyncBuffers.AsyncIterator

typealias · iOS 16.0+

AudioReader.AsyncBuffers.Element

typealias · iOS 16.0+

AudioReader.AsyncBuffers.Feature

typealias · iOS 16.0+

AudioReader.AsyncBuffers.Iterator

struct · iOS 16.0+

AudioReader.AsyncBuffers.Iterator.Element

typealias · iOS 16.0+

AudioReader.Configuration

struct · iOS 16.0+

AudioReader.Input

typealias · iOS 16.0+

AudioReader.MicrophoneAsyncBuffers

struct · iOS 16.0+

AudioReader.MicrophoneAsyncBuffers.AsyncIterator

typealias · iOS 16.0+

AudioReader.MicrophoneAsyncBuffers.Element

typealias · iOS 16.0+

AudioReader.MicrophoneAsyncBuffers.Feature

typealias · iOS 16.0+

AudioReader.MicrophoneAsyncBuffers.Iterator

class · iOS 16.0+

AudioReader.MicrophoneAsyncBuffers.Iterator.Element

typealias · iOS 16.0+

AudioReader.Output

typealias · iOS 16.0+

AudioReaderError

enum · iOS 16.0+

AugmentationBuilder

struct · iOS 17.0+

AugmentationSequence

struct · iOS 17.0+

AugmentationSequence.AsyncIterator

struct · iOS 17.0+

AugmentationSequence.AsyncIterator.Element

typealias · iOS 17.0+

AugmentationSequence.BatchedSequence

struct · iOS 17.0+

AugmentationSequence.BatchedSequence.AsyncIterator

struct · iOS 17.0+

AugmentationSequence.BatchedSequence.AsyncIterator.Element

typealias · iOS 17.0+

AugmentationSequence.BatchedSequence.Element

typealias · iOS 17.0+

AugmentationSequence.Element

typealias · iOS 17.0+

Augmenter

struct · iOS 17.0+

BoostedTreeClassifier

struct · iOS 16.0+

BoostedTreeClassifier.Annotation

typealias · iOS 16.0+

BoostedTreeClassifier.Transformer

typealias · iOS 16.0+

BoostedTreeConfiguration

struct · iOS 16.0+

BoostedTreeRegressor

struct · iOS 16.0+

BoostedTreeRegressor.Transformer

typealias · iOS 16.0+

CategoricalImputer

struct · iOS 16.0+

CategoricalImputer.Strategy

enum · iOS 16.0+

CategoricalImputer.Transformer

typealias · iOS 16.0+

ChooseRandomly

struct · iOS 17.0+

ChooseRandomly.Input

typealias · iOS 17.0+

ChooseRandomly.Output

typealias · iOS 17.0+

Classification

struct · iOS 16.0+

ClassificationDistribution

struct · iOS 16.0+

ClassificationDistribution.Element

typealias · iOS 16.0+

ClassificationDistribution.Index

typealias · iOS 16.0+

ClassificationDistribution.Indices

typealias · iOS 16.0+

ClassificationDistribution.Iterator

typealias · iOS 16.0+

ClassificationDistribution.SubSequence

typealias · iOS 16.0+

ClassificationMetrics

struct · iOS 16.0+

Classifier

protocol · iOS 16.0+

ColumnConcatenator

struct · iOS 16.0+

ColumnConcatenator.Input

typealias · iOS 16.0+

ColumnConcatenator.Output

typealias · iOS 16.0+

ColumnSelection

enum · iOS 16.0+

ColumnSelector

struct · iOS 16.0+

ColumnSelector.Input

typealias · iOS 16.0+

ColumnSelector.Output

typealias · iOS 16.0+

ColumnSelector.Transformer

typealias · iOS 16.0+

ColumnSelectorTransformer

struct · iOS 16.0+

ColumnSelectorTransformer.Input

typealias · iOS 16.0+

ColumnSelectorTransformer.Output

typealias · iOS 16.0+

CompatibilityError

enum · iOS 17.0+

ComposedTabularTransformer

struct · iOS 16.0+

ComposedTabularTransformer.Input

typealias · iOS 16.0+

ComposedTabularTransformer.Output

typealias · iOS 16.0+

ComposedTemporalTransformer

struct · iOS 16.0+

ComposedTemporalTransformer.Input

typealias · iOS 16.0+

ComposedTemporalTransformer.Intermediate

typealias · iOS 16.0+

ComposedTemporalTransformer.Output

typealias · iOS 16.0+

ComposedTemporalTransformer.OutputSequence

typealias · iOS 16.0+

ComposedTransformer

struct · iOS 16.0+

ComposedTransformer.Input

typealias · iOS 16.0+

ComposedTransformer.Intermediate

typealias · iOS 16.0+

ComposedTransformer.Output

typealias · iOS 16.0+

ConcatenationError

enum · iOS 16.0+

DataFrameTemporalAnnotationParameters

struct · iOS 16.0+

DataFrameTemporalAnnotationParameters.FilePathType

enum · iOS 16.0+

DatasetError

enum · iOS 16.0+

DateFeatureExtractor

struct · iOS 18.0+

DateFeatureExtractor.Input

typealias · iOS 18.0+

DateFeatureExtractor.Output

typealias · iOS 18.0+

DateFeatures

struct · iOS 18.0+

DateFeatures.ArrayLiteralElement

typealias · iOS 18.0+

DateFeatures.Element

typealias · iOS 18.0+

DateFeatures.RawValue

typealias · iOS 18.0+

DetectedObject

struct · iOS 17.0+

Downsampler

struct · iOS 16.0+

Downsampler.DownStreamSequence

struct · iOS 16.0+

Downsampler.DownStreamSequence.AsyncIterator

typealias · iOS 16.0+

Downsampler.DownStreamSequence.Element

typealias · iOS 16.0+

Downsampler.DownStreamSequence.Feature

typealias · iOS 16.0+

Downsampler.DownStreamSequence.Iterator

struct · iOS 16.0+

Downsampler.DownStreamSequence.Iterator.Element

typealias · iOS 16.0+

Downsampler.Input

typealias · iOS 16.0+

Downsampler.Output

typealias · iOS 16.0+

Downsampler.OutputSequence

typealias · iOS 16.0+

Estimator

protocol · iOS 16.0+

EstimatorDecoder

protocol · iOS 16.0+

EstimatorEncoder

protocol · iOS 16.0+

EstimatorEncodingError

enum · iOS 16.0+

EstimatorToSupervisedAdaptor

struct · iOS 16.0+

EstimatorToSupervisedAdaptor.Transformer

typealias · iOS 16.0+

EstimatorToTemporalAdaptor

struct · iOS 16.0+ · Deprecated in iOS 18.0

EstimatorToTemporalAdaptor.Input

typealias · iOS 16.0+ · Deprecated in iOS 18.0

EstimatorToTemporalAdaptor.Output

typealias · iOS 16.0+ · Deprecated in iOS 18.0

EstimatorToTemporalAdaptor.Transformer

typealias · iOS 16.0+ · Deprecated in iOS 18.0

Event

struct · iOS 16.0+

EventHandler

typealias · iOS 16.0+

FullyConnectedNetworkClassifier

struct · iOS 16.0+

FullyConnectedNetworkClassifier.Annotation

typealias · iOS 16.0+

FullyConnectedNetworkClassifier.Transformer

typealias · iOS 16.0+

FullyConnectedNetworkClassifierModel

struct · iOS 16.0+

FullyConnectedNetworkClassifierModel.Input

typealias · iOS 16.0+

FullyConnectedNetworkClassifierModel.Output

typealias · iOS 16.0+

FullyConnectedNetworkConfiguration

struct · iOS 16.0+

FullyConnectedNetworkMultiLabelClassifier

struct · iOS 17.0+

FullyConnectedNetworkMultiLabelClassifier.Annotation

typealias · iOS 17.0+

FullyConnectedNetworkMultiLabelClassifier.Transformer

typealias · iOS 17.0+

FullyConnectedNetworkMultiLabelClassifierModel

struct · iOS 17.0+

FullyConnectedNetworkMultiLabelClassifierModel.Input

typealias · iOS 17.0+

FullyConnectedNetworkMultiLabelClassifierModel.Output

typealias · iOS 17.0+

FullyConnectedNetworkRegressor

struct · iOS 16.0+

FullyConnectedNetworkRegressor.Annotation

typealias · iOS 16.0+

FullyConnectedNetworkRegressor.Transformer

typealias · iOS 16.0+

FullyConnectedNetworkRegressorModel

struct · iOS 16.0+

FullyConnectedNetworkRegressorModel.Input

typealias · iOS 16.0+

FullyConnectedNetworkRegressorModel.Output

typealias · iOS 16.0+

FullyConnectedNetworkRegressorModel.Target

typealias · iOS 16.0+

HumanBodyActionCounter

struct · iOS 16.0+

HumanBodyActionCounter.CumulativeSumSequence

struct · iOS 16.0+

HumanBodyActionCounter.CumulativeSumSequence.AsyncIterator

typealias · iOS 16.0+

HumanBodyActionCounter.CumulativeSumSequence.Element

typealias · iOS 16.0+

HumanBodyActionCounter.CumulativeSumSequence.Feature

typealias · iOS 16.0+

HumanBodyActionCounter.CumulativeSumSequence.Iterator

struct · iOS 16.0+

HumanBodyActionCounter.CumulativeSumSequence.Iterator.Element

typealias · iOS 16.0+

HumanBodyActionCounter.Input

typealias · iOS 16.0+

HumanBodyActionCounter.Output

typealias · iOS 16.0+

HumanBodyActionCounter.OutputSequence

typealias · iOS 16.0+

HumanBodyActionPeriodPredictor

struct · iOS 16.0+

HumanBodyActionPeriodPredictor.Input

typealias · iOS 16.0+

HumanBodyActionPeriodPredictor.Output

typealias · iOS 16.0+

HumanBodyActionPeriodPredictor.Prediction

struct · iOS 16.0+

HumanBodyPoseExtractor

struct · iOS 16.0+

HumanBodyPoseExtractor.Input

typealias · iOS 16.0+

HumanBodyPoseExtractor.Output

typealias · iOS 16.0+

HumanHandPoseExtractor

struct · iOS 16.0+

HumanHandPoseExtractor.Input

typealias · iOS 16.0+

HumanHandPoseExtractor.Output

typealias · iOS 16.0+

ImageBlur

struct · iOS 17.0+

ImageBlur.Input

typealias · iOS 17.0+

ImageBlur.Output

typealias · iOS 17.0+

ImageColorTransformer

struct · iOS 17.0+

ImageColorTransformer.Input

typealias · iOS 17.0+

ImageColorTransformer.Output

typealias · iOS 17.0+

ImageCropper

struct · iOS 16.0+

ImageCropper.Input

typealias · iOS 16.0+

ImageCropper.Output

typealias · iOS 16.0+

ImageExposureAdjuster

struct · iOS 17.0+

ImageExposureAdjuster.Input

typealias · iOS 17.0+

ImageExposureAdjuster.Output

typealias · iOS 17.0+

ImageFeatureExtractor

protocol · iOS 16.0+

ImageFeaturePrint

struct · iOS 16.0+

ImageFeaturePrint.Input

typealias · iOS 16.0+

ImageFeaturePrint.Output

typealias · iOS 16.0+

ImageFlipper

struct · iOS 17.0+

ImageFlipper.Input

typealias · iOS 17.0+

ImageFlipper.Orientation

enum · iOS 17.0+

ImageFlipper.Output

typealias · iOS 17.0+

ImageReader

struct · iOS 16.0+

ImageReader.Input

typealias · iOS 16.0+

ImageReader.Output

typealias · iOS 16.0+

ImageRotator

struct · iOS 17.0+

ImageRotator.Input

typealias · iOS 17.0+

ImageRotator.Output

typealias · iOS 17.0+

ImageScaler

struct · iOS 16.0+

ImageScaler.Input

typealias · iOS 16.0+

ImageScaler.Output

typealias · iOS 16.0+

ImputeTransformer

struct · iOS 16.0+

ImputeTransformer.Input

typealias · iOS 16.0+

ImputeTransformer.Output

typealias · iOS 16.0+

JointKey

struct · iOS 16.0+

JointKey.RawValue

typealias · iOS 16.0+

JointPoint

struct · iOS 16.0+

JointsSelector

struct · iOS 16.0+

JointsSelector.Input

typealias · iOS 16.0+

JointsSelector.Output

typealias · iOS 16.0+

LinearRegressor

struct · iOS 16.0+

LinearRegressor.Annotation

typealias · iOS 16.0+

LinearRegressor.Configuration

struct · iOS 16.0+

LinearRegressor.Transformer

typealias · iOS 16.0+

LinearRegressorModel

struct · iOS 16.0+

LinearRegressorModel.Input

typealias · iOS 16.0+

LinearRegressorModel.Output

typealias · iOS 16.0+

LinearTimeSeriesForecaster

struct · iOS 18.0+

LinearTimeSeriesForecaster.Annotation

typealias · iOS 18.0+

LinearTimeSeriesForecaster.Configuration

typealias · iOS 18.0+

LinearTimeSeriesForecaster.Model

struct · iOS 18.0+

LinearTimeSeriesForecaster.Model.Input

typealias · iOS 18.0+

LinearTimeSeriesForecaster.Model.Output

typealias · iOS 18.0+

LinearTimeSeriesForecaster.Model.OutputSequence

typealias · iOS 18.0+

LinearTimeSeriesForecaster.Transformer

typealias · iOS 18.0+

LinearTimeSeriesForecasterConfiguration

struct · iOS 18.0+

LinearTransformer

struct · iOS 16.0+

LinearTransformer.Input

typealias · iOS 16.0+

LinearTransformer.Output

typealias · iOS 16.0+

LogisticRegressionClassifier

struct · iOS 16.0+

LogisticRegressionClassifier.Annotation

typealias · iOS 16.0+

LogisticRegressionClassifier.Configuration

struct · iOS 16.0+

LogisticRegressionClassifier.Transformer

typealias · iOS 16.0+

LogisticRegressionClassifierModel

struct · iOS 16.0+

LogisticRegressionClassifierModel.Input

typealias · iOS 16.0+

LogisticRegressionClassifierModel.Output

typealias · iOS 16.0+

MaxAbsScaler

struct · iOS 16.0+

MaxAbsScaler.Transformer

struct · iOS 16.0+

MaxAbsScaler.Transformer.Input

typealias · iOS 16.0+

MaxAbsScaler.Transformer.Output

typealias · iOS 16.0+

MetricsKey

struct · iOS 16.0+

MetricsKey.RawValue

typealias · iOS 16.0+

MinMaxScaler

struct · iOS 16.0+

MinMaxScaler.Transformer

struct · iOS 16.0+

MinMaxScaler.Transformer.Input

typealias · iOS 16.0+

MinMaxScaler.Transformer.Output

typealias · iOS 16.0+

MLModelClassifierAdaptor

struct · iOS 16.0+

MLModelClassifierAdaptor.Input

typealias · iOS 16.0+

MLModelClassifierAdaptor.Label

enum · iOS 16.0+

MLModelClassifierAdaptor.Label.ExtendedGraphemeClusterLiteralType

typealias · iOS 16.0+

MLModelClassifierAdaptor.Label.IntegerLiteralType

typealias · iOS 16.0+

MLModelClassifierAdaptor.Label.StringLiteralType

typealias · iOS 16.0+

MLModelClassifierAdaptor.Label.UnicodeScalarLiteralType

typealias · iOS 16.0+

MLModelClassifierAdaptor.Output

typealias · iOS 16.0+

MLModelImageFeatureExtractor

struct · iOS 16.0+

MLModelImageFeatureExtractor.Error

enum · iOS 16.0+

MLModelImageFeatureExtractor.Input

typealias · iOS 16.0+

MLModelImageFeatureExtractor.Output

typealias · iOS 16.0+

MLModelRegressorAdaptor

struct · iOS 16.0+

MLModelRegressorAdaptor.Input

typealias · iOS 16.0+

MLModelRegressorAdaptor.Output

typealias · iOS 16.0+

MLModelTransformerAdaptor

struct · iOS 16.0+

MLModelTransformerAdaptor.Input

typealias · iOS 16.0+

MLModelTransformerAdaptor.Output

typealias · iOS 16.0+

ModelCompatibilityError

enum · iOS 16.0+

ModelMetadata

struct · iOS 17.0+

ModelUpdateError

enum · iOS 16.0+

MultiLabelClassificationMetrics

struct · iOS 17.0+

MultiLabelClassificationMetrics.ThresholdSelectionStrategy

enum · iOS 17.0+

MultivariateLinearRegressor

struct · iOS 18.0+

MultivariateLinearRegressor.Annotation

typealias · iOS 18.0+

MultivariateLinearRegressor.Configuration

typealias · iOS 18.0+

MultivariateLinearRegressor.Feature

typealias · iOS 18.0+

MultivariateLinearRegressor.Model

struct · iOS 18.0+

MultivariateLinearRegressor.Model.Input

typealias · iOS 18.0+

MultivariateLinearRegressor.Model.Output

typealias · iOS 18.0+

MultivariateLinearRegressor.Transformer

typealias · iOS 18.0+

MultivariateLinearRegressorConfiguration

struct · iOS 18.0+

NormalizationScaler

struct · iOS 16.0+

NormalizationScaler.NormalizationStrategy

enum · iOS 16.0+

NormalizationScaler.Transformer

struct · iOS 16.0+

NormalizationScaler.Transformer.Input

typealias · iOS 16.0+

NormalizationScaler.Transformer.Output

typealias · iOS 16.0+

NumericImputer

struct · iOS 16.0+

NumericImputer.Strategy

enum · iOS 16.0+

NumericImputer.Transformer

typealias · iOS 16.0+

ObjectDetectionAnnotation

struct · iOS 17.0+

ObjectDetectionAnnotation.Annotation

struct · iOS 17.0+

ObjectDetectionAnnotation.Annotation.CodingKeys

enum · iOS 17.0+

ObjectDetectionAnnotation.Annotation.CodingKeys.RawValue

typealias · iOS 17.0+

ObjectDetectionAnnotation.CodingKeys

enum · iOS 17.0+

ObjectDetectionAnnotation.CodingKeys.RawValue

typealias · iOS 17.0+

ObjectDetectionAnnotation.ID

typealias · iOS 17.0+

ObjectDetectionMetrics

struct · iOS 17.0+

OneHotEncoder

struct · iOS 16.0+

OneHotEncoder.Transformer

struct · iOS 16.0+

OneHotEncoder.Transformer.Input

typealias · iOS 16.0+

OneHotEncoder.Transformer.Output

typealias · iOS 16.0+

OptimizationError

enum · iOS 17.0+

OptimizationStrategy

enum · iOS 17.0+

OptionalUnwrapper

struct · iOS 16.0+

OptionalUnwrapper.Input

typealias · iOS 16.0+

OptionalUnwrapper.Output

typealias · iOS 16.0+

OrdinalEncoder

struct · iOS 16.0+

OrdinalEncoder.Transformer

struct · iOS 16.0+

OrdinalEncoder.Transformer.Input

typealias · iOS 16.0+

OrdinalEncoder.Transformer.Output

typealias · iOS 16.0+

PipelineDataError

enum · iOS 16.0+

Pose

struct · iOS 16.0+

PoseSelectionStrategy

enum · iOS 16.0+

PoseSelector

struct · iOS 16.0+

PoseSelector.Input

typealias · iOS 16.0+

PoseSelector.Output

typealias · iOS 16.0+

PreprocessedFeatureSequence

struct · iOS 16.0+

PreprocessedFeatureSequence.AsyncIterator

struct · iOS 16.0+

PreprocessedFeatureSequence.AsyncIterator.Element

typealias · iOS 16.0+

PreprocessedFeatureSequence.Element

typealias · iOS 16.0+

PreprocessingEstimator

struct · iOS 16.0+

PreprocessingEstimator.Input

typealias · iOS 16.0+

PreprocessingEstimator.Intermediate

typealias · iOS 16.0+

PreprocessingEstimator.Output

typealias · iOS 16.0+

PreprocessingEstimator.Transformer

typealias · iOS 16.0+

PreprocessingSupervisedEstimator

struct · iOS 16.0+

PreprocessingSupervisedEstimator.Annotation

typealias · iOS 16.0+

PreprocessingSupervisedEstimator.Input

typealias · iOS 16.0+

PreprocessingSupervisedEstimator.Intermediate

typealias · iOS 16.0+

PreprocessingSupervisedEstimator.Output

typealias · iOS 16.0+

PreprocessingSupervisedEstimator.Transformer

typealias · iOS 16.0+

PreprocessingSupervisedTabularEstimator

struct · iOS 17.0+

PreprocessingSupervisedTabularEstimator.Annotation

typealias · iOS 17.0+

PreprocessingSupervisedTabularEstimator.Input

typealias · iOS 17.0+

PreprocessingSupervisedTabularEstimator.Intermediate

typealias · iOS 17.0+

PreprocessingSupervisedTabularEstimator.Output

typealias · iOS 17.0+

PreprocessingSupervisedTabularEstimator.Transformer

typealias · iOS 17.0+

PreprocessingSupervisedTemporalEstimator

struct · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingSupervisedTemporalEstimator.Annotation

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingSupervisedTemporalEstimator.Input

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingSupervisedTemporalEstimator.Intermediate

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingSupervisedTemporalEstimator.Output

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingSupervisedTemporalEstimator.Transformer

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingTabularEstimator

struct · iOS 17.0+

PreprocessingTabularEstimator.Input

typealias · iOS 17.0+

PreprocessingTabularEstimator.Intermediate

typealias · iOS 17.0+

PreprocessingTabularEstimator.Output

typealias · iOS 17.0+

PreprocessingTabularEstimator.Transformer

typealias · iOS 17.0+

PreprocessingTemporalEstimator

struct · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingTemporalEstimator.Input

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingTemporalEstimator.Intermediate

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingTemporalEstimator.Output

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingTemporalEstimator.Transformer

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingUpdatableEstimator

struct · iOS 16.0+

PreprocessingUpdatableEstimator.Input

typealias · iOS 16.0+

PreprocessingUpdatableEstimator.Intermediate

typealias · iOS 16.0+

PreprocessingUpdatableEstimator.Output

typealias · iOS 16.0+

PreprocessingUpdatableEstimator.Transformer

typealias · iOS 16.0+

PreprocessingUpdatableSupervisedEstimator

struct · iOS 16.0+

PreprocessingUpdatableSupervisedEstimator.Annotation

typealias · iOS 16.0+

PreprocessingUpdatableSupervisedEstimator.Input

typealias · iOS 16.0+

PreprocessingUpdatableSupervisedEstimator.Intermediate

typealias · iOS 16.0+

PreprocessingUpdatableSupervisedEstimator.Output

typealias · iOS 16.0+

PreprocessingUpdatableSupervisedEstimator.Transformer

typealias · iOS 16.0+

PreprocessingUpdatableSupervisedTabularEstimator

struct · iOS 17.0+

PreprocessingUpdatableSupervisedTabularEstimator.Annotation

typealias · iOS 17.0+

PreprocessingUpdatableSupervisedTabularEstimator.Input

typealias · iOS 17.0+

PreprocessingUpdatableSupervisedTabularEstimator.Intermediate

typealias · iOS 17.0+

PreprocessingUpdatableSupervisedTabularEstimator.Output

typealias · iOS 17.0+

PreprocessingUpdatableSupervisedTabularEstimator.Transformer

typealias · iOS 17.0+

PreprocessingUpdatableSupervisedTemporalEstimator

struct · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingUpdatableSupervisedTemporalEstimator.Annotation

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingUpdatableSupervisedTemporalEstimator.Input

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingUpdatableSupervisedTemporalEstimator.Intermediate

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingUpdatableSupervisedTemporalEstimator.Output

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingUpdatableSupervisedTemporalEstimator.Transformer

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingUpdatableTabularEstimator

struct · iOS 17.0+

PreprocessingUpdatableTabularEstimator.Input

typealias · iOS 17.0+

PreprocessingUpdatableTabularEstimator.Intermediate

typealias · iOS 17.0+

PreprocessingUpdatableTabularEstimator.Output

typealias · iOS 17.0+

PreprocessingUpdatableTabularEstimator.Transformer

typealias · iOS 17.0+

PreprocessingUpdatableTemporalEstimator

struct · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingUpdatableTemporalEstimator.Input

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingUpdatableTemporalEstimator.Intermediate

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingUpdatableTemporalEstimator.Output

typealias · iOS 16.0+ · Deprecated in iOS 18.0

PreprocessingUpdatableTemporalEstimator.Transformer

typealias · iOS 16.0+ · Deprecated in iOS 18.0

RandomImageCropper

struct · iOS 17.0+

RandomImageCropper.Input

typealias · iOS 17.0+

RandomImageCropper.Output

typealias · iOS 17.0+

RandomImageNoiseGenerator

struct · iOS 17.0+

RandomImageNoiseGenerator.Input

typealias · iOS 17.0+

RandomImageNoiseGenerator.Output

typealias · iOS 17.0+

RandomTransformer

protocol · iOS 17.0+

Regressor

protocol · iOS 16.0+

Reshaper

struct · iOS 16.0+

Reshaper.Input

typealias · iOS 16.0+

Reshaper.Output

typealias · iOS 16.0+

RobustScaler

struct · iOS 16.0+

RobustScaler.Transformer

struct · iOS 16.0+

RobustScaler.Transformer.Input

typealias · iOS 16.0+

RobustScaler.Transformer.Output

typealias · iOS 16.0+

SerializationError

enum · iOS 16.0+

ShuffleRandomly

struct · iOS 17.0+

ShuffleRandomly.Input

typealias · iOS 17.0+

ShuffleRandomly.Output

typealias · iOS 17.0+

SlidingWindows

struct · iOS 18.0+

SlidingWindows.Element

typealias · iOS 18.0+

SlidingWindows.Index

typealias · iOS 18.0+

SlidingWindows.Indices

typealias · iOS 18.0+

SlidingWindows.Iterator

typealias · iOS 18.0+

SlidingWindows.SubSequence

typealias · iOS 18.0+

SlidingWindowTransformer

struct · iOS 16.0+

SlidingWindowTransformer.Input

typealias · iOS 16.0+

SlidingWindowTransformer.Output

typealias · iOS 16.0+

SlidingWindowTransformer.OutputSequence

typealias · iOS 16.0+

SlidingWindowTransformer.WindowSequence

struct · iOS 16.0+

SlidingWindowTransformer.WindowSequence.AsyncIterator

typealias · iOS 16.0+

SlidingWindowTransformer.WindowSequence.Element

typealias · iOS 16.0+

SlidingWindowTransformer.WindowSequence.Feature

typealias · iOS 16.0+

SlidingWindowTransformer.WindowSequence.Iterator

struct · iOS 16.0+

SlidingWindowTransformer.WindowSequence.Iterator.Element

typealias · iOS 16.0+

StandardScaler

struct · iOS 16.0+

StandardScaler.Transformer

struct · iOS 16.0+

StandardScaler.Transformer.Input

typealias · iOS 16.0+

StandardScaler.Transformer.Output

typealias · iOS 16.0+

SupervisedEstimator

protocol · iOS 16.0+

SupervisedEstimatorToTemporalAdaptor

struct · iOS 16.0+ · Deprecated in iOS 18.0

SupervisedEstimatorToTemporalAdaptor.Annotation

typealias · iOS 16.0+ · Deprecated in iOS 18.0

SupervisedEstimatorToTemporalAdaptor.Input

typealias · iOS 16.0+ · Deprecated in iOS 18.0

SupervisedEstimatorToTemporalAdaptor.Output

typealias · iOS 16.0+ · Deprecated in iOS 18.0

SupervisedEstimatorToTemporalAdaptor.Transformer

typealias · iOS 16.0+ · Deprecated in iOS 18.0

SupervisedTabularEstimator

protocol · iOS 16.0+

SupervisedTemporalEstimator

protocol · iOS 16.0+ · Deprecated in iOS 18.0

TabularEstimator

protocol · iOS 16.0+

TabularEstimatorToSupervisedAdaptor

struct · iOS 16.0+

TabularEstimatorToSupervisedAdaptor.Transformer

typealias · iOS 16.0+

TabularPipelineDataError

enum · iOS 16.0+

TabularTransformer

protocol · iOS 16.0+

TabularTransformerToEstimatorAdaptor

struct · iOS 16.0+

TabularTransformerToUpdatableEstimatorAdaptor

struct · iOS 16.0+

TemporalAdaptor

struct · iOS 18.0+

TemporalAdaptor.Input

typealias · iOS 18.0+

TemporalAdaptor.Output

typealias · iOS 18.0+

TemporalAdaptor.OutputSequence

typealias · iOS 18.0+

TemporalEstimator

protocol · iOS 16.0+ · Deprecated in iOS 18.0

TemporalEstimatorToSupervisedAdaptor

struct · iOS 16.0+ · Deprecated in iOS 18.0

TemporalEstimatorToSupervisedAdaptor.Transformer

typealias · iOS 16.0+ · Deprecated in iOS 18.0

TemporalFeature

struct · iOS 16.0+

TemporalFeature.ID

typealias · iOS 16.0+

TemporalFileSegment

struct · iOS 16.0+

TemporalSegmentIdentifier

struct · iOS 16.0+

TemporalSequence

protocol · iOS 16.0+

TemporalTransformer

protocol · iOS 16.0+

TemporalTransformerToEstimatorAdaptor

struct · iOS 16.0+ · Deprecated in iOS 18.0

TemporalTransformerToUpdatableEstimatorAdaptor

struct · iOS 16.0+ · Deprecated in iOS 18.0

TimeSeriesClassifier

struct · iOS 18.0+

TimeSeriesClassifier.Annotation

typealias · iOS 18.0+

TimeSeriesClassifier.Configuration

typealias · iOS 18.0+

TimeSeriesClassifier.Model

struct · iOS 18.0+

TimeSeriesClassifier.Model.Input

typealias · iOS 18.0+

TimeSeriesClassifier.Model.Output

typealias · iOS 18.0+

TimeSeriesClassifier.Model.OutputSequence

typealias · iOS 18.0+

TimeSeriesClassifier.Transformer

typealias · iOS 18.0+

TimeSeriesClassifierConfiguration

struct · iOS 18.0+

TimeSeriesForecasterAnnotatedWindows

struct · iOS 18.0+

TimeSeriesForecasterAnnotatedWindows.Element

typealias · iOS 18.0+

TimeSeriesForecasterAnnotatedWindows.Iterator

struct · iOS 18.0+

TimeSeriesForecasterAnnotatedWindows.Iterator.Element

typealias · iOS 18.0+

TimeSeriesForecasterBatches

struct · iOS 18.0+

TimeSeriesForecasterBatches.Element

typealias · iOS 18.0+

TimeSeriesForecasterBatches.Iterator

struct · iOS 18.0+

TimeSeriesForecasterBatches.Iterator.Element

typealias · iOS 18.0+

Transformer

protocol · iOS 16.0+

TransformerToEstimatorAdaptor

struct · iOS 16.0+

TransformerToTemporalAdaptor

struct · iOS 16.0+ · Deprecated in iOS 18.0

TransformerToTemporalAdaptor.Input

typealias · iOS 16.0+ · Deprecated in iOS 18.0

TransformerToTemporalAdaptor.Output

typealias · iOS 16.0+ · Deprecated in iOS 18.0

TransformerToTemporalAdaptor.OutputSequence

typealias · iOS 16.0+ · Deprecated in iOS 18.0

TransformerToUpdatableEstimatorAdaptor

struct · iOS 16.0+

TreeClassifierModel

struct · iOS 16.0+

TreeClassifierModel.Input

typealias · iOS 16.0+

TreeClassifierModel.Output

typealias · iOS 16.0+

TreeRegressorModel

struct · iOS 16.0+

TreeRegressorModel.Input

typealias · iOS 16.0+

TreeRegressorModel.Output

typealias · iOS 16.0+

UniformRandomFloatingPointParameter

struct · iOS 17.0+

UniformRandomFloatingPointParameter.Input

typealias · iOS 17.0+

UniformRandomFloatingPointParameter.Output

typealias · iOS 17.0+

UniformRandomIntegerParameter

class · iOS 17.0+

UniformRandomIntegerParameter.Input

typealias · iOS 17.0+

UniformRandomIntegerParameter.Output

typealias · iOS 17.0+

UpdatableEstimator

protocol · iOS 16.0+

UpdatableEstimatorToSupervisedAdaptor

struct · iOS 16.0+

UpdatableEstimatorToSupervisedAdaptor.Transformer

typealias · iOS 16.0+

UpdatableEstimatorToTemporalAdaptor

struct · iOS 16.0+ · Deprecated in iOS 18.0

UpdatableEstimatorToTemporalAdaptor.Input

typealias · iOS 16.0+ · Deprecated in iOS 18.0

UpdatableEstimatorToTemporalAdaptor.Output

typealias · iOS 16.0+ · Deprecated in iOS 18.0

UpdatableEstimatorToTemporalAdaptor.Transformer

typealias · iOS 16.0+ · Deprecated in iOS 18.0

UpdatableSupervisedEstimator

protocol · iOS 16.0+

UpdatableSupervisedEstimatorToTemporalAdaptor

struct · iOS 16.0+ · Deprecated in iOS 18.0

UpdatableSupervisedEstimatorToTemporalAdaptor.Annotation

typealias · iOS 16.0+ · Deprecated in iOS 18.0

UpdatableSupervisedEstimatorToTemporalAdaptor.Input

typealias · iOS 16.0+ · Deprecated in iOS 18.0

UpdatableSupervisedEstimatorToTemporalAdaptor.Output

typealias · iOS 16.0+ · Deprecated in iOS 18.0

UpdatableSupervisedEstimatorToTemporalAdaptor.Transformer

typealias · iOS 16.0+ · Deprecated in iOS 18.0

UpdatableSupervisedTabularEstimator

protocol · iOS 16.0+

UpdatableSupervisedTemporalEstimator

protocol · iOS 16.0+ · Deprecated in iOS 18.0

UpdatableTabularEstimator

protocol · iOS 16.0+

UpdatableTabularEstimatorToSupervisedAdaptor

struct · iOS 16.0+

UpdatableTabularEstimatorToSupervisedAdaptor.Transformer

typealias · iOS 16.0+

UpdatableTemporalEstimator

protocol · iOS 16.0+ · Deprecated in iOS 18.0

UpdatableTemporalEstimatorToSupervisedAdaptor

struct · iOS 16.0+ · Deprecated in iOS 18.0

UpdatableTemporalEstimatorToSupervisedAdaptor.Transformer

typealias · iOS 16.0+ · Deprecated in iOS 18.0

UpsampledAugmentationSequence

struct · iOS 17.0+

UpsampledAugmentationSequence.AsyncIterator

struct · iOS 17.0+

UpsampledAugmentationSequence.AsyncIterator.Element

typealias · iOS 17.0+

UpsampledAugmentationSequence.Element

typealias · iOS 17.0+

VideoReader

struct · iOS 16.0+

VideoReader.AsyncFrames

struct · iOS 16.0+

VideoReader.AsyncFrames.AsyncIterator

typealias · iOS 16.0+

VideoReader.AsyncFrames.Element

typealias · iOS 16.0+

VideoReader.AsyncFrames.Feature

typealias · iOS 16.0+

VideoReader.AsyncFrames.Iterator

struct · iOS 16.0+

VideoReader.AsyncFrames.Iterator.Element

typealias · iOS 16.0+

VideoReader.CameraAsyncBuffers

struct · iOS 16.0+

VideoReader.CameraAsyncBuffers.AsyncIterator

typealias · iOS 16.0+

VideoReader.CameraAsyncBuffers.Element

typealias · iOS 16.0+

VideoReader.CameraAsyncBuffers.Feature

typealias · iOS 16.0+

VideoReader.CameraAsyncBuffers.Iterator

class · iOS 16.0+

VideoReader.CameraAsyncBuffers.Iterator.Element

typealias · iOS 16.0+

VideoReader.CameraConfiguration

struct · iOS 16.0+

VideoReader.CameraConfiguration.PixelFormat

enum · iOS 16.0+

VideoReader.CameraConfiguration.Position

enum · iOS 16.0+

VideoReader.CameraConfiguration.Resolution

enum · iOS 16.0+

VideoReader.Input

typealias · iOS 16.0+

VideoReader.Output

typealias · iOS 16.0+

VideoReaderError

enum · iOS 16.0+

Functions and constants

method · iOS 16.0+

loadRangedAnnotations

TypeScript
loadRangedAnnotations(parameters?: DataFrameTemporalAnnotationParameters<number>, continueOnFailure?: boolean): Array<AnnotatedFeature<TemporalFileSegment, number>>
Swift declaration
func loadRangedAnnotations<Annotation>(parameters: DataFrameTemporalAnnotationParameters<Annotation> = .init(), continueOnFailure: Bool = false) throws -> [AnnotatedFeature<TemporalFileSegment, Annotation>] where Annotation : Equatable, Annotation : Sendable

Loads training examples from a data frame containing annotations. The exact column ids within the data frame which contains the file path, annotation, startTime and endTime of each temporal annotation, can be customized using the `parameters` argument. The data frame must contain at least two columns: one for file path and one for annotation. The file path must be of String type and annotation can be of any equatable type. The `filePath` column in the `dataFrame` should contain file path with its extension. All the files can have absolute path or a path relative to a `baseURL`. This option can be specified using `filePathType` in `parameters`. The `startTime` and `endTime` columns contain the start time and end time of a temporal segment in seconds. Their type is Double. Both the columns are optional. If only a `startTime` is specified, it is interpreted as an annotation for the range starting from `startTime` till the end of file, i.e., `startTime ...`. If only an `endTime` is specified, it is interpreted as an annotation for the range starting at 0 till `endTime`, i.e., `0 ..< endTime`. If both `startTime` and `endTime` columns are missing or their values are missing, the annotation is assumed to be for the entire file length. - Note: Ensure that the same file has no overlapping range in the dataframe. Since overlapping ranges would mean conflicting annotation for that range. Consider an example of a dataframe containing the following values: ``` ------------------------------------------------ | fileName | annotation | startTime | endTime | | ----------|------------|-----------|---------| | file1.wav | class1 | 0 | 4 | | file1.wav | class2 | 5 | 10 | | file2.wav | class1 | 2 | | | file3.wav | class2 | | | | file4.wav | class1 | | 5 | ------------------------------------------------ ``` This will create an annotated feature list which has the following structure: ```swift [ AnnotatedFeature(feature: TemporalFileSegment("file1.wav", 0 ..< 4), annotation: "class1"), AnnotatedFeature(feature: TemporalFileSegment("file1.wav", 5 ..< 10), annotation: "class2"), AnnotatedFeature(feature: TemporalFileSegment("file2.wav", 2 ...), annotation: "class1"), AnnotatedFeature(feature: TemporalFileSegment("file3.wav", 0 ...), annotation: "class2"), AnnotatedFeature(feature: TemporalFileSegment("file4.wav", 0 ..< 5), annotation: "class1") ] ``` - Parameters: - parameters: Annotation parameters for using specific column names from the data frame. By default the data frame is expected to have columns `filePath` and `annotation`. - continueOnFailure: A Boolean value indicating whether to continue reading the dataframe after encountering a row that is invalid. The default value is `false`. - Returns: A list of annotated features containing `URLRange<Double>` as feature and `Annotation` as annotation.

method · iOS 16.0+

selecting

TypeScript
selecting(selection: ColumnSelection): _TabularData_DataFrame
Swift declaration
func selecting(_ selection: ColumnSelection) -> DataFrame

Generates a data frame that includes only the column selection. - Parameter selection: A selection of columns. - Returns: A new data frame including only the selected columns.

method · iOS 16.0+

makeAsyncIterator

TypeScript
makeAsyncIterator(): Downsampler_DownStreamSequence_Iterator<number>
Swift declaration
func makeAsyncIterator() -> Downsampler<Input>.DownStreamSequence.Iterator

Creates the asynchronous iterator that produces elements of this asynchronous sequence. - Returns: An instance of the `AsyncIterator` type used to produce elements of the asynchronous sequence.

get · iOS 16.0+

count

TypeScript
get count(): (number) | null
Swift declaration
var count: Int? { get }

The count of elements.

method · iOS 16.0+

next

TypeScript
next(): Promise<(TemporalFeature<number>) | null>
Swift declaration
mutating func next() async throws -> TemporalFeature<Downsampler<Input>.Output>?

Asynchronously advances to the next element and returns it, or ends the sequence if there is no next element. - Returns: The next element, if it exists, or `nil` to signal the end of the sequence.

init · iOS 16.0+

init

TypeScript
static init(factor: number): Downsampler<number>
Swift declaration
init(factor: Int)

Creates a down sample temporal transformer. - Parameters: - factor: The down sample factor to the input stream. - Precondition: `factor` must be greater than 0.

get · iOS 16.0+

factor

TypeScript
get factor(): number
Swift declaration
let factor: Int

The down sample factor to the input stream.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

init · iOS 16.0+

init

TypeScript
static init(maximumAbsoluteValue: number): MaxAbsScaler_Transformer<number>
Swift declaration
init(maximumAbsoluteValue: Element)

Creates a max abs scaling transformer. - Parameter maximumAbsoluteValue: The fitted maximum absolute value.

get · iOS 16.0+

maximumAbsoluteValue

TypeScript
get maximumAbsoluteValue(): number
Swift declaration
var maximumAbsoluteValue: Element

The fitted maximum absolute value.

set · iOS 16.0+

maximumAbsoluteValue

TypeScript
set maximumAbsoluteValue(value: number)
Swift declaration
var maximumAbsoluteValue: Element

The fitted maximum absolute value.

method · iOS 16.0+

applied

TypeScript
applied(input: number, eventHandler?: (((arg0: Event) => void)) | null): number
Swift declaration
func applied(to input: Element, eventHandler: EventHandler? = nil) -> Element

Scales the input values by `1 / maximumAbsoluteValue`. - Parameters: - input: A floating-point value. - eventHandler: An event handler. - Returns: A scaled value.

method · iOS 16.0+

fitted

TypeScript
fitted(input: Array<number>, eventHandler?: (((arg0: Event) => void)) | null): MaxAbsScaler_Transformer<number>
Swift declaration
func fitted<S>(to input: S, eventHandler: EventHandler? = nil) throws -> MaxAbsScaler<Element>.Transformer where Element == S.Element, S : Sequence

Fits a max abs scaler to a sequence of elements. - Parameters: - input: A sequence of elements. - eventHandler: An event handler. - Returns: The fitted transformer.

init · iOS 16.0+

init

TypeScript
static init(): MaxAbsScaler<number>
Swift declaration
init()

Creates a max abs scaler.

get · iOS 16.0+

fittedRange

TypeScript
get fittedRange(): SDKHandle
Swift declaration
var fittedRange: ClosedRange<Element>

The fitted range derived by the estimator when fitting.

set · iOS 16.0+

fittedRange

TypeScript
set fittedRange(value: SDKHandle)
Swift declaration
var fittedRange: ClosedRange<Element>

The fitted range derived by the estimator when fitting.

init · iOS 16.0+

init

TypeScript
static init(desiredRange: SDKHandle, fittedRange: SDKHandle): MinMaxScaler_Transformer<number>
Swift declaration
init(desiredRange: ClosedRange<Element>, fittedRange: ClosedRange<Element>)

Creates a minmax scaling transformer. - Parameters: - desiredRange: The desired range of transformed values. - fittedRange: The range derived by the estimator when fitting.

get · iOS 16.0+

desiredRange

TypeScript
get desiredRange(): SDKHandle
Swift declaration
var desiredRange: ClosedRange<Element>

The desired range of transformed values.

set · iOS 16.0+

desiredRange

TypeScript
set desiredRange(value: SDKHandle)
Swift declaration
var desiredRange: ClosedRange<Element>

The desired range of transformed values.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

method · iOS 16.0+

applied

TypeScript
applied(input: number, eventHandler?: (((arg0: Event) => void)) | null): number
Swift declaration
func applied(to input: Element, eventHandler: EventHandler? = nil) -> Element

Scales the input values so that they all lie in the closed range `[minimum, maximum]`. - Parameters: - input: A floating-point value. - eventHandler: An event handler. - Returns: A scaled value.

init · iOS 16.0+

init

TypeScript
static init(range?: SDKHandle): MinMaxScaler<number>
Swift declaration
init(range: ClosedRange<Element> = 0...1)

Creates a min max scaler. - Parameter range: The desired range of transformed values.

get · iOS 16.0+

range

TypeScript
get range(): SDKHandle
Swift declaration
var range: ClosedRange<Element>

The desired range of transformed values.

set · iOS 16.0+

range

TypeScript
set range(value: SDKHandle)
Swift declaration
var range: ClosedRange<Element>

The desired range of transformed values.

method · iOS 16.0+

fitted

TypeScript
fitted(input: Array<number>, eventHandler?: (((arg0: Event) => void)) | null): MinMaxScaler_Transformer<number>
Swift declaration
func fitted<S>(to input: S, eventHandler: EventHandler? = nil) throws -> MinMaxScaler<Element>.Transformer where Element == S.Element, S : Sequence

Fits a min max scaler to a sequence of elements. - Parameters: - input: A sequence of elements. - eventHandler: An event handler. - Returns: The fitted transformer.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

get · iOS 16.0+

interQuartileRange

TypeScript
get interQuartileRange(): number
Swift declaration
var interQuartileRange: Element

The interquartile rage used for scaling.

set · iOS 16.0+

interQuartileRange

TypeScript
set interQuartileRange(value: number)
Swift declaration
var interQuartileRange: Element

The interquartile rage used for scaling.

init · iOS 16.0+

init

TypeScript
static init(median: number, interQuartileRange: number): RobustScaler_Transformer<number>
Swift declaration
init(median: Element, interQuartileRange: Element)

Creates a robust scaling transformer. - Parameters: - median: The median used for offsetting. - interQuartileRange: The inter quartile range used for scaling.

get · iOS 16.0+

median

TypeScript
get median(): number
Swift declaration
var median: Element

The median used for offsetting.

set · iOS 16.0+

median

TypeScript
set median(value: number)
Swift declaration
var median: Element

The median used for offsetting.

method · iOS 16.0+

applied

TypeScript
applied(input: number, eventHandler?: (((arg0: Event) => void)) | null): number
Swift declaration
func applied(to input: Element, eventHandler: EventHandler? = nil) -> Element

Scales the input values using the calculation `(input - median) / interQuartileRange`. - Parameters: - input: A floating-point value. - eventHandler: An event handler. - Returns: A scaled value.

init · iOS 16.0+

init

TypeScript
static init(quantileRange?: SDKHandle): RobustScaler<number>
Swift declaration
init(quantileRange: ClosedRange<Element> = 0.25...0.75)

Creates a robust scaler. - Parameter quantileRange: This scaler removes the median and scales the data according to the quantile range.

get · iOS 16.0+

quantileRange

TypeScript
get quantileRange(): SDKHandle
Swift declaration
var quantileRange: ClosedRange<Element>

The quantile range used to compute the scale.

set · iOS 16.0+

quantileRange

TypeScript
set quantileRange(value: SDKHandle)
Swift declaration
var quantileRange: ClosedRange<Element>

The quantile range used to compute the scale.

method · iOS 16.0+

fitted

TypeScript
fitted(input: Array<number>, eventHandler?: (((arg0: Event) => void)) | null): RobustScaler_Transformer<number>
Swift declaration
func fitted<S>(to input: S, eventHandler: EventHandler? = nil) throws -> RobustScaler<Element>.Transformer where Element == S.Element, S : Sequence

Fits a robust scaler to a sequence of elements. - Parameters: - input: A sequence of elements. - eventHandler: An event handler. - Returns: The fitted transformer.

get · iOS 17.0+

probability

TypeScript
get probability(): number
Swift declaration
let probability: Double

The probability of applying the transformer. Default value is 0.5.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

method · iOS 17.0+

makeTransformer

TypeScript
makeTransformer(): OneHotEncoder_Transformer<SDKHandle>
Swift declaration
func makeTransformer() -> OneHotEncoder<Category>.Transformer

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 17.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: OneHotEncoder_Transformer<SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> OneHotEncoder<Category>.Transformer

Reads the encoded transformer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: OneHotEncoder_Transformer<SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: OneHotEncoder<Category>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 18.0+

annotations

TypeScript
get annotations(): _CoreML_MLShapedArray<number>
Swift declaration
var annotations: MLShapedArray<Scalar>

The shaped array of annotations.

set · iOS 18.0+

annotations

TypeScript
set annotations(value: _CoreML_MLShapedArray<number>)
Swift declaration
var annotations: MLShapedArray<Scalar>

The shaped array of annotations.

get · iOS 18.0+

count

TypeScript
get count(): number
Swift declaration
var count: Int { get }

The number of examples in the batch. This is the first dimension of both features and annotations.

init · iOS 18.0+

init

TypeScript
static init(features: _CoreML_MLShapedArray<number>, annotations: _CoreML_MLShapedArray<number>): AnnotatedBatch<number>
Swift declaration
init(features: MLShapedArray<Scalar>, annotations: MLShapedArray<Scalar>)

Creates an annotated batch. The features and annotations must have the same rank, and the first dimensions must be equal. - Parameters: - features: A shaped array of features. - annotations: A shaped array of annotations.

get · iOS 18.0+

features

TypeScript
get features(): _CoreML_MLShapedArray<number>
Swift declaration
var features: MLShapedArray<Scalar>

The shaped array of features.

set · iOS 18.0+

features

TypeScript
set features(value: _CoreML_MLShapedArray<number>)
Swift declaration
var features: MLShapedArray<Scalar>

The shaped array of features.

get · iOS 16.0+

probability

TypeScript
get probability(): number
Swift declaration
var probability: Float

The classification probability. A value between 0 and 1.

set · iOS 16.0+

probability

TypeScript
set probability(value: number)
Swift declaration
var probability: Float

The classification probability. A value between 0 and 1.

init · iOS 16.0+

init

TypeScript
static init(label: number, probability: number): Classification<number>
Swift declaration
init(label: Label, probability: Float)

Creates a classification with label and probability. - Parameters - label: The classification label. - probability: The classification probability.

get · iOS 16.0+

label

TypeScript
get label(): number
Swift declaration
var label: Label

The classification label.

set · iOS 16.0+

label

TypeScript
set label(value: number)
Swift declaration
var label: Label

The classification label.

get · iOS 16.0+

columnSelection

TypeScript
get columnSelection(): ColumnSelection
Swift declaration
var columnSelection: ColumnSelection

The column selection strategy.

set · iOS 16.0+

columnSelection

TypeScript
set columnSelection(value: ColumnSelection)
Swift declaration
var columnSelection: ColumnSelection

The column selection strategy.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ColumnSelectorTransformer<unknown, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> ColumnSelector<Estimator, UnwrappedInput>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: ColumnSelectorTransformer<unknown, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: ColumnSelector<Estimator, UnwrappedInput>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

fitted

TypeScript
fitted(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<ColumnSelectorTransformer<unknown, unknown>>
Swift declaration
func fitted(to input: DataFrame, eventHandler: EventHandler? = nil) async throws -> ColumnSelector<Estimator, UnwrappedInput>.Transformer

Fits a transformer to a data frame - Parameters: - input: A data frame. - eventHandler: An event handler. - Returns: The fitted transformer.

get · iOS 17.0+

confidence

TypeScript
get confidence(): number
Swift declaration
var confidence: Float

The detection confidence. The value will always be between 0.0 and 1.0.

set · iOS 17.0+

confidence

TypeScript
set confidence(value: number)
Swift declaration
var confidence: Float

The detection confidence. The value will always be between 0.0 and 1.0.

get · iOS 17.0+

boundingBox

TypeScript
get boundingBox(): { x: number; y: number; width: number; height: number }
Swift declaration
var boundingBox: CGRect

The bounding box of the detected object.

set · iOS 17.0+

boundingBox

TypeScript
set boundingBox(value: { x: number; y: number; width: number; height: number })
Swift declaration
var boundingBox: CGRect

The bounding box of the detected object.

method · iOS 17.0+

makeTransformer

TypeScript
makeTransformer(): ImputeTransformer<number>
Swift declaration
func makeTransformer() -> NumericImputer<Element>.Transformer

Creates a default-initialized impute transformer suitable for incremental fitting. - Note: You can't use incremental fitting with an impute transformer when using the `median` strategy.

method · iOS 17.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: ImputeTransformer<number>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> NumericImputer<Element>.Transformer

Reads the encoded transformer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: ImputeTransformer<number>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: NumericImputer<Element>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

init · iOS 16.0+

init

TypeScript
static initConstant(constant: number): NumericImputer<number>
Swift declaration
init(constant: Element)

Creates an imputer with a constant value to use when replacing missing values.

get · iOS 16.0+

strategy

TypeScript
get strategy(): NumericImputer_Strategy<number>
Swift declaration
var strategy: NumericImputer<Element>.Strategy

The imputation strategy.

set · iOS 16.0+

strategy

TypeScript
set strategy(value: NumericImputer_Strategy<number>)
Swift declaration
var strategy: NumericImputer<Element>.Strategy

The imputation strategy.

init · iOS 16.0+

init

TypeScript
static init(strategy: NumericImputer_Strategy<number>): NumericImputer<number>
Swift declaration
init(_ strategy: NumericImputer<Element>.Strategy)

Creates an imputer with a strategy.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

method · iOS 17.0+

makeTransformer

TypeScript
makeTransformer(): OrdinalEncoder_Transformer<SDKHandle>
Swift declaration
func makeTransformer() -> OrdinalEncoder<Category>.Transformer

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 17.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: OrdinalEncoder_Transformer<SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> OrdinalEncoder<Category>.Transformer

Reads the encoded transformer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: OrdinalEncoder_Transformer<SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: OrdinalEncoder<Category>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 18.0+

startIndex

TypeScript
get startIndex(): number
Swift declaration
var startIndex: Int { get }

The position of the first window.

method · iOS 18.0+

index

TypeScript
indexAfter(i: number): number
Swift declaration
func index(after i: Int) -> Int

Returns the position immediately after the given index. - Parameter i: A valid index of the collection. `i` must be less than `endIndex`. - Returns: The index value immediately after `i`.

method · iOS 18.0+

index

TypeScript
indexBefore(i: number): number
Swift declaration
func index(before i: Int) -> Int

Returns the position immediately before the given index. - Parameter i: A valid index of the collection. `i` must be greater than `startIndex`. - Returns: The index value immediately before `i`.

method · iOS 18.0+

index

TypeScript
indexOffsetBy(i: number, distance: number): number
Swift declaration
func index(_ i: Int, offsetBy distance: Int) -> Int

Returns an index that is the specified distance from the given index. The value passed as `distance` must not offset `i` beyond the bounds of the collection. - Parameters: - i: A valid index of the collection. - distance: The distance to offset `i`. - Returns: An index offset by `distance` from the index `i`.

get · iOS 18.0+

input

TypeScript
get input(): _CoreML_MLShapedArray<number>
Swift declaration
let input: MLShapedArray<Scalar>

The input shaped array.

init · iOS 18.0+

init

TypeScript
static init(input: _CoreML_MLShapedArray<number>, length: number, stride?: number): SlidingWindows<number>
Swift declaration
init(input: MLShapedArray<Scalar>, length: Int, stride: Int = 1) throws

Creates a sliding windows sequence. - Parameters: - input: A shaped array having two dimensions. - length: The number of samples in each window. Must be positive. - stride: The number of samples between windows. Must be positive. Defaults to 1.

get · iOS 18.0+

length

TypeScript
get length(): number
Swift declaration
let length: Int

The number samples in each window.

get · iOS 18.0+

stride

TypeScript
get stride(): number
Swift declaration
let stride: Int

The number of samples between windows.

get · iOS 18.0+

endIndex

TypeScript
get endIndex(): number
Swift declaration
var endIndex: Int { get }

The collection's "past the end" position–that is, the position one greater than the last valid subscript argument.

subscript · iOS 18.0+

subscript

TypeScript
subscript(position: number): _CoreML_MLShapedArray<number>
Swift declaration
subscript(position: Int) -> MLShapedArray<Scalar> { get }

Accesses the window at the specified position. - Parameter position: The position of the window to access. `position` must be a valid index of the collection that is not equal to the `endIndex` property.

subscript · iOS 18.0+

subscript

TypeScript
subscript48200(bounds: SDKHandle): SDKHandle
Swift declaration
subscript(bounds: Range<Int>) -> Slice<SlidingWindows<Scalar>> { get }

Accesses a contiguous range of windows. - Parameter bounds: A range of valid indices in the classification distribution.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

get · iOS 16.0+

standardDeviation

TypeScript
get standardDeviation(): number
Swift declaration
var standardDeviation: Element

The standard deviation used for scaling.

set · iOS 16.0+

standardDeviation

TypeScript
set standardDeviation(value: number)
Swift declaration
var standardDeviation: Element

The standard deviation used for scaling.

init · iOS 16.0+

init

TypeScript
static init(mean: number, standardDeviation: number): StandardScaler_Transformer<number>
Swift declaration
init(mean: Element, standardDeviation: Element)

Creates a standard scaling transformer. - Parameters: - mean: The mean used for offsetting. - standardDeviation: The standard deviation used for scaling.

get · iOS 16.0+

mean

TypeScript
get mean(): number
Swift declaration
var mean: Element

The mean used for offsetting.

set · iOS 16.0+

mean

TypeScript
set mean(value: number)
Swift declaration
var mean: Element

The mean used for offsetting.

method · iOS 16.0+

applied

TypeScript
applied(input: number, eventHandler?: (((arg0: Event) => void)) | null): number
Swift declaration
func applied(to input: Element, eventHandler: EventHandler? = nil) -> Element

Scales the input values using the calculation `(input - mean) / standardDeviation`. - Parameters: - input: A floating-point value. - eventHandler: An event handler. - Returns: A scaled value.

method · iOS 17.0+

makeTransformer

TypeScript
makeTransformer(): StandardScaler_Transformer<number>
Swift declaration
func makeTransformer() -> StandardScaler<Element>.Transformer

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 17.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: StandardScaler_Transformer<number>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> StandardScaler<Element>.Transformer

Reads the encoded transformer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: StandardScaler_Transformer<number>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: StandardScaler<Element>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

fitted

TypeScript
fitted(input: Array<number>, eventHandler?: (((arg0: Event) => void)) | null): StandardScaler_Transformer<number>
Swift declaration
func fitted<S>(to input: S, eventHandler: EventHandler? = nil) throws -> StandardScaler<Element>.Transformer where Element == S.Element, S : Sequence

Fits a transformer to a particular input sequence by computing the mean and standard deviation.

init · iOS 16.0+

init

TypeScript
static init(): StandardScaler<number>
Swift declaration
init()

Creates a standard scaling estimator.

get · iOS 17.0+

scaleFeatures

TypeScript
get scaleFeatures(): boolean
Swift declaration
var scaleFeatures: Bool

A Boolean value indicating whether to scale the input features. Scaling the features reduces numerical errors.

set · iOS 17.0+

scaleFeatures

TypeScript
set scaleFeatures(value: boolean)
Swift declaration
var scaleFeatures: Bool

A Boolean value indicating whether to scale the input features. Scaling the features reduces numerical errors.

get · iOS 16.0+

maximumIterations

TypeScript
get maximumIterations(): number
Swift declaration
var maximumIterations: Int

The maximum number of allowed passes through the data. More passes over the data can result in a more accurately trained model. Consider increasing this if the training accuracy is low. Defaults to 25. - Note: This parameter is only used by the `fitted` method. When using the `update` method it's up to you to decide when to stop.

set · iOS 16.0+

maximumIterations

TypeScript
set maximumIterations(value: number)
Swift declaration
var maximumIterations: Int

The maximum number of allowed passes through the data. More passes over the data can result in a more accurately trained model. Consider increasing this if the training accuracy is low. Defaults to 25. - Note: This parameter is only used by the `fitted` method. When using the `update` method it's up to you to decide when to stop.

get · iOS 16.0+

convergenceThreshold

TypeScript
get convergenceThreshold(): number
Swift declaration
var convergenceThreshold: Double

The convergence threshold. When the residual is within the convergence threshold of the objective, training stops. The threshold is also used by the `fitted` method to decide when progress is no longer being made, in which case the training process will stop before convergence and before the specified maximum number of iterations (known as early stopping). Consider reducing this value for a more accurately trained model. But beware of overfitting if the it is set to a very low value. Defaults to 0.01.

set · iOS 16.0+

convergenceThreshold

TypeScript
set convergenceThreshold(value: number)
Swift declaration
var convergenceThreshold: Double

The convergence threshold. When the residual is within the convergence threshold of the objective, training stops. The threshold is also used by the `fitted` method to decide when progress is no longer being made, in which case the training process will stop before convergence and before the specified maximum number of iterations (known as early stopping). Consider reducing this value for a more accurately trained model. But beware of overfitting if the it is set to a very low value. Defaults to 0.01.

get · iOS 17.0+

optimizationStrategy

TypeScript
get optimizationStrategy(): OptimizationStrategy
Swift declaration
var optimizationStrategy: OptimizationStrategy { get set }

The optimization strategy.

set · iOS 17.0+

optimizationStrategy

TypeScript
set optimizationStrategy(value: OptimizationStrategy)
Swift declaration
var optimizationStrategy: OptimizationStrategy { get set }

The optimization strategy.

get · iOS 17.0+

earlyStopIterationCount

TypeScript
get earlyStopIterationCount(): number
Swift declaration
var earlyStopIterationCount: Int

The number of iterations to use when evaluating whether to stop early. The `fitted` method will stop if no significant progress is made for this many iterations. Significant progress happens when the validation error decreases by at least `convergenceThreshold`. - Note: Early stopping only happens when using the `fitted` method with validation data.

set · iOS 17.0+

earlyStopIterationCount

TypeScript
set earlyStopIterationCount(value: number)
Swift declaration
var earlyStopIterationCount: Int

The number of iterations to use when evaluating whether to stop early. The `fitted` method will stop if no significant progress is made for this many iterations. Significant progress happens when the validation error decreases by at least `convergenceThreshold`. - Note: Early stopping only happens when using the `fitted` method with validation data.

get · iOS 16.0+

stepSize

TypeScript
get stepSize(): number
Swift declaration
var stepSize: Double

The starting step size to use for the solver. Defaults to 1.0. If the first iteration takes a considerable amount of time, reducing this parameter may speed up model training.

set · iOS 16.0+

stepSize

TypeScript
set stepSize(value: number)
Swift declaration
var stepSize: Double

The starting step size to use for the solver. Defaults to 1.0. If the first iteration takes a considerable amount of time, reducing this parameter may speed up model training.

get · iOS 16.0+

l1Penalty

TypeScript
get l1Penalty(): number
Swift declaration
var l1Penalty: Double

Weight of the L1 regularization term. Like the l2 penalty, the higher the l1 penalty, the more the estimated coefficients shrink toward 0. The l1 penalty, however, completely zeros out sufficiently small coefficients, automatically indicating features that are not useful for the model. The default weight of 0 prevents any features from being discarded.

set · iOS 16.0+

l1Penalty

TypeScript
set l1Penalty(value: number)
Swift declaration
var l1Penalty: Double

Weight of the L1 regularization term. Like the l2 penalty, the higher the l1 penalty, the more the estimated coefficients shrink toward 0. The l1 penalty, however, completely zeros out sufficiently small coefficients, automatically indicating features that are not useful for the model. The default weight of 0 prevents any features from being discarded.

get · iOS 16.0+

l2Penalty

TypeScript
get l2Penalty(): number
Swift declaration
var l2Penalty: Double

Weight of the L2 regularization term. The larger this weight, the more the model coefficients shrink toward 0. This introduces bias into the model but decreases variance, potentially leading to better predictions. The default value is 0.01; setting this parameter to 0 corresponds to unregularized logistic regression.

set · iOS 16.0+

l2Penalty

TypeScript
set l2Penalty(value: number)
Swift declaration
var l2Penalty: Double

Weight of the L2 regularization term. The larger this weight, the more the model coefficients shrink toward 0. This introduces bias into the model but decreases variance, potentially leading to better predictions. The default value is 0.01; setting this parameter to 0 corresponds to unregularized logistic regression.

init · iOS 16.0+

init

TypeScript
static init(): LinearRegressor_Configuration<number>
Swift declaration
init()

Creates a default linear regressor configuration.

get · iOS 16.0+

configuration

TypeScript
get configuration(): LinearRegressor_Configuration<number>
Swift declaration
var configuration: LinearRegressor<Scalar>.Configuration { get set }

The linear regressor configuration.

set · iOS 16.0+

configuration

TypeScript
set configuration(value: LinearRegressor_Configuration<number>)
Swift declaration
var configuration: LinearRegressor<Scalar>.Configuration { get set }

The linear regressor configuration.

init · iOS 16.0+

init

TypeScript
static init(configuration?: LinearRegressor_Configuration<number>): LinearRegressor<number>
Swift declaration
init(configuration: LinearRegressor<Scalar>.Configuration = Configuration())

Creates a linear regressor. - Parameter configuration: The configuration.

method · iOS 17.0+

makeTransformer

TypeScript
makeTransformer(): LinearRegressorModel<number>
Swift declaration
func makeTransformer() -> LinearRegressorModel<Scalar>

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 17.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: LinearRegressorModel<number>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> LinearRegressorModel<Scalar>

Reads the encoded transformer and optimizer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: LinearRegressorModel<number>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: LinearRegressorModel<Scalar>, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: LinearRegressorModel<number>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> LinearRegressorModel<Scalar>

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: LinearRegressorModel<number>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: LinearRegressorModel<Scalar>, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

fitted

TypeScript
fittedToValidateOnEventHandler(input: Array<AnnotatedFeature<SDKHandle, number>>, validation: Array<AnnotatedFeature<SDKHandle, number>>, eventHandler?: (((arg0: Event) => void)) | null): Promise<LinearRegressorModel<number>>
Swift declaration
func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: EventHandler? = nil) async throws -> LinearRegressorModel<Scalar> where Input : Sequence, Validation : Sequence, Input.Element == AnnotatedFeature<MLShapedArray<Scalar>, Scalar>, Validation.Element == AnnotatedFeature<MLShapedArray<Scalar>, Scalar>

Fits a linear regressor model to a sequence of examples. - Parameters: - input: A sequence of examples used for fitting the regressor. - validation: A sequence of examples used for validating the fitted regressor. - eventHandler: An event handler. This method reports maximum error and root-mean-square error metrics. - Returns: The fitted linear regressor model.

method · iOS 16.0+

fitted

TypeScript
fittedToEventHandler(input: Array<AnnotatedFeature<SDKHandle, number>>, eventHandler?: (((arg0: Event) => void)) | null): Promise<LinearRegressorModel<number>>
Swift declaration
func fitted<Input>(to input: Input, eventHandler: EventHandler? = nil) async throws -> LinearRegressorModel<Scalar> where Input : Sequence, Input.Element == AnnotatedFeature<MLShapedArray<Scalar>, Scalar>

Fits a linear regressor model to a sequence of examples. - Parameters: - input: A sequence of examples used for fitting the regressor. - eventHandler: An event handler. This method reports maximum error and root-mean-square error metrics. - Returns: The fitted linear regressor model.

method · iOS 17.0+

update

TypeScript
update(transformer: LinearRegressorModel<number>, input: Array<AnnotatedFeature<SDKHandle, number>>, eventHandler?: (((arg0: Event) => void)) | null): Promise<{ $ret: null; $out: { "transformer": LinearRegressorModel<number> } }>
Swift declaration
func update<InputSequence>(_ transformer: inout LinearRegressor<Scalar>.Transformer, with input: InputSequence, eventHandler: EventHandler?) async throws where InputSequence : Sequence, InputSequence.Element == AnnotatedFeature<MLShapedArray<Scalar>, Scalar>

Updates a transformer with a new sequence of examples. - Parameters: - transformer: A transformer to update. - input: A sequence of examples. - eventHandler: An event handler.

Omit the output parameters from the call. The result contains $ret and $out, with transformer inside $out.

init · iOS 16.0+

init

TypeScript
static init(id: TemporalSegmentIdentifier, feature: unknown): TemporalFeature<unknown>
Swift declaration
init(id: TemporalSegmentIdentifier, feature: Feature)

Creates a temporal feature. - Parameters: - id: The temporal segment identifier. - feature: The feature value.

get · iOS 16.0+

id

TypeScript
get id(): TemporalSegmentIdentifier
Swift declaration
var id: TemporalSegmentIdentifier

The temporal segment identifier for this feature.

set · iOS 16.0+

id

TypeScript
set id(value: TemporalSegmentIdentifier)
Swift declaration
var id: TemporalSegmentIdentifier

The temporal segment identifier for this feature.

get · iOS 16.0+

feature

TypeScript
get feature(): unknown
Swift declaration
var feature: Feature

The feature value.

set · iOS 16.0+

feature

TypeScript
set feature(value: unknown)
Swift declaration
var feature: Feature

The feature value.

get · iOS 16.0+

annotation

TypeScript
get annotation(): unknown
Swift declaration
var annotation: Annotation

The annotation.

set · iOS 16.0+

annotation

TypeScript
set annotation(value: unknown)
Swift declaration
var annotation: Annotation

The annotation.

init · iOS 16.0+

init

TypeScript
static init(feature: unknown, annotation: unknown): AnnotatedFeature<unknown, unknown>
Swift declaration
init(feature: Feature, annotation: Annotation)

Creates an example with a feature and an annotation.

get · iOS 16.0+

feature

TypeScript
get feature(): unknown
Swift declaration
var feature: Feature

The feature value.

set · iOS 16.0+

feature

TypeScript
set feature(value: unknown)
Swift declaration
var feature: Feature

The feature value.

function · iOS 17.0+

meanSquaredError

TypeScript
meanSquaredError(annotatedPredictions: Array<AnnotatedPrediction<number, number>>): number
Swift declaration
@backDeployed(before: macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0)
func meanSquaredError<T>(_ annotatedPredictions: [AnnotatedPrediction<T, T>]) -> T where T : FloatingPoint

Computes the root mean squared error between predicted and ground truth values. If an empty `AnnotatedPrediction` is supplied, the result will be NaN. - Parameters: - annotatedPredictions: An `AnnotatedPrediction` object. - Returns: The root mean squared error.

get · iOS 17.0+

probability

TypeScript
get probability(): number
Swift declaration
let probability: Double

The probability of applying each transformer. Default value is 0.5.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

init · iOS 16.0+

init

TypeScript
static init(value: number): ImputeTransformer<number>
Swift declaration
init(value: Element)

Creates an impute transformer. - Parameter value: The value used to replace missing values.

get · iOS 16.0+

value

TypeScript
get value(): number
Swift declaration
var value: Element

Impute value used to replace missing values.

set · iOS 16.0+

value

TypeScript
set value(value: number)
Swift declaration
var value: Element

Impute value used to replace missing values.

method · iOS 16.0+

applied

TypeScript
applied(input?: (number) | null, eventHandler?: (((arg0: Event) => void)) | null): number
Swift declaration
func applied(to input: Element?, eventHandler: EventHandler? = nil) -> Element

Imputes a single input. - Parameters: - input: The input. - eventHandler: An event handler.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

init · iOS 16.0+

init

TypeScript
static init(scale: number, offset: number): LinearTransformer<number>
Swift declaration
init(scale: Element, offset: Element)

Creates a linear transformer. - Parameters: - scale: The amount to be scaled. - offset: The amount to be offset after scaling.

get · iOS 16.0+

scale

TypeScript
get scale(): number
Swift declaration
var scale: Element

The amount to be scaled.

set · iOS 16.0+

scale

TypeScript
set scale(value: number)
Swift declaration
var scale: Element

The amount to be scaled.

get · iOS 16.0+

offset

TypeScript
get offset(): number
Swift declaration
var offset: Element

The amount to be offset after scaling.

set · iOS 16.0+

offset

TypeScript
set offset(value: number)
Swift declaration
var offset: Element

The amount to be offset after scaling.

method · iOS 16.0+

applied

TypeScript
appliedToEventHandler(input: Array<number>, eventHandler?: (((arg0: Event) => void)) | null): Array<number>
Swift declaration
func applied<S>(to input: S, eventHandler: EventHandler? = nil) -> [Element] where Element == S.Element, S : Sequence

Scales a sequence of inputs. - Parameters: - input: A sequence of input values. - eventHandler: An event handler. - Returns: An array of scaled values.

method · iOS 16.0+

applied

TypeScript
appliedToEventHandler7721(input: number, eventHandler?: (((arg0: Event) => void)) | null): number
Swift declaration
func applied(to input: Element, eventHandler: EventHandler? = nil) -> Element

Scales an input. - Parameters: - input: A floating-point value. - eventHandler: An event handler. - Returns: A scaled value.

method · iOS 16.0+

applied

TypeScript
applied(input?: (unknown) | null, eventHandler?: (((arg0: Event) => void)) | null): unknown
Swift declaration
func applied(to input: Element?, eventHandler: EventHandler? = nil) throws -> Element

Unwraps an optional element or throws if the value is `nil`. - Parameters: - input: The optional input. - eventHandler: An event handler. - Returns: The unwrapped value. - Throws: `MissingValueError` if the input is `nil`.

init · iOS 16.0+

init

TypeScript
static init(): OptionalUnwrapper<unknown>
Swift declaration
init()

Creates a transformer that unwraps an optional element or throws if the value is nil.

function · iOS 17.0+

meanAbsoluteError

TypeScript
meanAbsoluteError(annotatedPredictions: Array<AnnotatedPrediction<number, number>>): number
Swift declaration
func meanAbsoluteError<T>(_ annotatedPredictions: [AnnotatedPrediction<T, T>]) -> T where T : FloatingPoint

Computes the mean absolute error between predicted and ground truth values. If an empty `AnnotatedPrediction` is supplied, the result will be NaN. - Parameters: - annotatedPredictions: An `AnnotatedPrediction` object. - Returns: The mean absolute error.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

init · iOS 16.0+

init

TypeScript
static initConstant(constant: number): CategoricalImputer<number>
Swift declaration
init(constant: Element)

Creates an imputer with a constant value to use when replacing missing values.

get · iOS 16.0+

strategy

TypeScript
get strategy(): CategoricalImputer_Strategy<number>
Swift declaration
var strategy: CategoricalImputer<Element>.Strategy

The imputation strategy.

set · iOS 16.0+

strategy

TypeScript
set strategy(value: CategoricalImputer_Strategy<number>)
Swift declaration
var strategy: CategoricalImputer<Element>.Strategy

The imputation strategy.

init · iOS 16.0+

init

TypeScript
static init(strategy: CategoricalImputer_Strategy<number>): CategoricalImputer<number>
Swift declaration
init(_ strategy: CategoricalImputer<Element>.Strategy)

Creates an imputer with a strategy.

get · iOS 16.0+

concatenatedColumnName

TypeScript
get concatenatedColumnName(): string
Swift declaration
var concatenatedColumnName: String

The name of the concatenated column containing the shaped arrays.

set · iOS 16.0+

concatenatedColumnName

TypeScript
set concatenatedColumnName(value: string)
Swift declaration
var concatenatedColumnName: String

The name of the concatenated column containing the shaped arrays.

init · iOS 16.0+

init

TypeScript
static init(columnSelection?: ColumnSelection, concatenatedColumnName?: string): ColumnConcatenator<number>
Swift declaration
init(columnSelection: ColumnSelection = .all, concatenatedColumnName: String = "features")

Creates a concatenator that concatenates numeric columns into a new column of ML shaped array. - Parameters: - columnSelection: A selection of columns to concatenate. - concatenatedColumnName: The name of the resulting shaped array column.

get · iOS 16.0+

columnSelection

TypeScript
get columnSelection(): ColumnSelection
Swift declaration
var columnSelection: ColumnSelection

The selection of columns to concatenate.

set · iOS 16.0+

columnSelection

TypeScript
set columnSelection(value: ColumnSelection)
Swift declaration
var columnSelection: ColumnSelection

The selection of columns to concatenate.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

method · iOS 16.0+

applied

TypeScript
applied(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): _TabularData_DataFrame
Swift declaration
func applied(to input: DataFrame, eventHandler: EventHandler? = nil) throws -> DataFrame

Combines every numerical column in a data frame into to a shaped array for each row.

get · iOS 17.0+

annotation

TypeScript
get annotation(): unknown
Swift declaration
var annotation: Annotation

The ground truth annotation.

set · iOS 17.0+

annotation

TypeScript
set annotation(value: unknown)
Swift declaration
var annotation: Annotation

The ground truth annotation.

init · iOS 17.0+

init

TypeScript
static init(prediction: unknown, annotation: unknown): AnnotatedPrediction<unknown, unknown>
Swift declaration
init(prediction: Prediction, annotation: Annotation)

Creates an annotated preditction.

get · iOS 17.0+

prediction

TypeScript
get prediction(): unknown
Swift declaration
var prediction: Prediction

The predicted value.

set · iOS 17.0+

prediction

TypeScript
set prediction(value: unknown)
Swift declaration
var prediction: Prediction

The predicted value.

method · iOS 16.0+

next

TypeScript
next(): Promise<(unknown) | null>
Swift declaration
func next() async throws -> Element?

Asynchronously advances to the next element and returns it, or ends the sequence if there is no next element. - Returns: The next element, if it exists, or `nil` to signal the end of the sequence.

method · iOS 16.0+

makeAsyncIterator

TypeScript
makeAsyncIterator(): AnyTemporalIterator<TemporalFeature<unknown>>
Swift declaration
func makeAsyncIterator() -> AnyTemporalIterator<AnyTemporalSequence<Feature>.Element>

Creates the asynchronous iterator that produces elements of this asynchronous sequence. - Returns: An instance of the `AsyncIterator` type used to produce elements of the asynchronous sequence.

get · iOS 16.0+

count

TypeScript
get count(): (number) | null
Swift declaration
let count: Int?

The number of elements in the sequence if available, calculated nondestructively.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

method · iOS 16.0+

applied

TypeScript
applied(input: SDKHandle, eventHandler?: (((arg0: Event) => void)) | null): Promise<SDKHandle>
Swift declaration
func applied(to input: ComposedTransformer<Inner, Outer>.Input, eventHandler: EventHandler? = nil) async throws -> ComposedTransformer<Inner, Outer>.Output

Performs the composed transformation on a single input. - Parameters: - input: The transformer input. - eventHandler: An event handler. - Returns: An output produced by applying the transformer to the input.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

init · iOS 16.0+

init

TypeScript
static init(scale: number): NormalizationScaler_Transformer<number>
Swift declaration
init(scale: Element)

Creates a normalization scaling transformer. - Parameter scale: The normalization scale.

get · iOS 16.0+

scale

TypeScript
get scale(): number
Swift declaration
var scale: Element

The normalization scale used to scale the input.

set · iOS 16.0+

scale

TypeScript
set scale(value: number)
Swift declaration
var scale: Element

The normalization scale used to scale the input.

method · iOS 16.0+

applied

TypeScript
applied(input: number, eventHandler?: (((arg0: Event) => void)) | null): number
Swift declaration
func applied(to input: Element, eventHandler: EventHandler? = nil) -> Element

Scales the input values using the calculation `input / scale`. - Parameters: - input: A floating-point value. - eventHandler: An event handler. - Returns: A scaled value.

get · iOS 16.0+

norm

TypeScript
get norm(): NormalizationScaler_NormalizationStrategy<number>
Swift declaration
var norm: NormalizationScaler<Element>.NormalizationStrategy

The normalization strategy.

set · iOS 16.0+

norm

TypeScript
set norm(value: NormalizationScaler_NormalizationStrategy<number>)
Swift declaration
var norm: NormalizationScaler<Element>.NormalizationStrategy

The normalization strategy.

init · iOS 16.0+

init

TypeScript
static init(norm?: NormalizationScaler_NormalizationStrategy<number>): NormalizationScaler<number>
Swift declaration
init(norm: NormalizationScaler<Element>.NormalizationStrategy = .l2)

Creates a normalization scaler. - Parameter norm: A selected NormalizationStrategy to scale by. Defaults as `l2`.

method · iOS 16.0+

fitted

TypeScript
fitted(input: Array<number>, eventHandler?: (((arg0: Event) => void)) | null): NormalizationScaler_Transformer<number>
Swift declaration
func fitted<S>(to input: S, eventHandler: EventHandler? = nil) throws -> NormalizationScaler<Element>.Transformer where Element == S.Element, S : Sequence

Fits a normalization scaler to a sequence of elements. - Parameters: - input: A sequence of elements. - eventHandler: An event handler. - Returns: The fitted transformer.

get · iOS 17.0+

classCount

TypeScript
get classCount(): number
Swift declaration
var classCount: Int { get }

The number of classes.

method · iOS 16.0+

buildDataFrame

TypeScript
buildDataFrame(distributions: Array<ClassificationDistribution<number>>): _TabularData_DataFrame
Swift declaration
func buildDataFrame(_ distributions: [ClassificationDistribution<Label>]) -> DataFrame

Builds a data frame containing a labels column and a probability distribution column.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

get · iOS 17.0+

featureColumnNames

TypeScript
get featureColumnNames(): Array<string>
Swift declaration
var featureColumnNames: [String] { get }

The names of the columns containing feature values.

get · iOS 17.0+

predictionColumnName

TypeScript
get predictionColumnName(): string
Swift declaration
var predictionColumnName: String

The name of the column containing the predicted labels.

set · iOS 17.0+

predictionColumnName

TypeScript
set predictionColumnName(value: string)
Swift declaration
var predictionColumnName: String

The name of the column containing the predicted labels.

method · iOS 16.0+

applied

TypeScript
applied(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<_TabularData_DataFrame>
Swift declaration
func applied(to input: DataFrame, eventHandler: EventHandler? = nil) async throws -> DataFrame

Performs a classification on a data frame. - Parameters: - input: The input data frame. - eventHandler: An event handler. - Returns: A data frame of classifications.

get · iOS 17.0+

transformer

TypeScript
get transformer(): RandomImageCropper
Swift declaration
var transformer: RandomTransformer

The transformation applied to each element.

set · iOS 17.0+

transformer

TypeScript
set transformer(value: RandomImageCropper)
Swift declaration
var transformer: RandomTransformer

The transformation applied to each element.

get · iOS 16.0+

configuration

TypeScript
get configuration(): BoostedTreeConfiguration
Swift declaration
var configuration: BoostedTreeConfiguration { get set }

Boosted tree configuration.

set · iOS 16.0+

configuration

TypeScript
set configuration(value: BoostedTreeConfiguration)
Swift declaration
var configuration: BoostedTreeConfiguration { get set }

Boosted tree configuration.

method · iOS 17.0+

makeTransformer

TypeScript
makeTransformer(): TreeRegressorModel
Swift declaration
func makeTransformer() -> TreeRegressorModel

Creates a default-initialized transformer suitable for incremental fitting.

get · iOS 16.0+

annotationColumnID

TypeScript
get annotationColumnID(): _TabularData_ColumnID<unknown>
Swift declaration
var annotationColumnID: ColumnID<Annotation>

The annotation column identifier.

set · iOS 16.0+

annotationColumnID

TypeScript
set annotationColumnID(value: _TabularData_ColumnID<unknown>)
Swift declaration
var annotationColumnID: ColumnID<Annotation>

The annotation column identifier.

get · iOS 16.0+

featureColumnNames

TypeScript
get featureColumnNames(): Array<string>
Swift declaration
var featureColumnNames: [String]

The names of the columns containing feature values.

set · iOS 16.0+

featureColumnNames

TypeScript
set featureColumnNames(value: Array<string>)
Swift declaration
var featureColumnNames: [String]

The names of the columns containing feature values.

method · iOS 17.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: TreeRegressorModel; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> TreeRegressorModel

Reads the encoded transformer and optimizer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: TreeRegressorModel, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: TreeRegressorModel, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

init · iOS 16.0+

init

TypeScript
static init(annotationColumnName: string, featureColumnNames: Array<string>, configuration?: BoostedTreeConfiguration): BoostedTreeRegressor<unknown>
Swift declaration
init(annotationColumnName: String, featureColumnNames: [String], configuration: BoostedTreeConfiguration = BoostedTreeConfiguration())

Creates a boosted tree regressor. - Parameters - annotationColumnName: The name of the column containing the ground truth values. - featureColumnNames: The names of the feature columns. - configuration: The configuration.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: TreeRegressorModel; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> TreeRegressorModel

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: TreeRegressorModel, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: TreeRegressorModel, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

fitted

TypeScript
fitted(input: _TabularData_DataFrame, validation?: (_TabularData_DataFrame) | null, eventHandler?: (((arg0: Event) => void)) | null): Promise<TreeRegressorModel>
Swift declaration
func fitted(to input: DataFrame, validateOn validation: DataFrame? = nil, eventHandler: EventHandler? = nil) async throws -> TreeRegressorModel

Fits a boosted tree regressor model to a collection of examples. - Parameters: - input: A data frame containing examples used for fitting the transformer. - validation: A data frame containing examples used for validating the fitted transformer. - eventHandler: An event handler. This method reports maximum error and root-mean-square error metrics. - Returns: The fitted boosted tree regressor model.

method · iOS 17.0+

update

TypeScript
update(transformer: TreeRegressorModel, input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<{ $ret: null; $out: { "transformer": TreeRegressorModel } }>
Swift declaration
func update(_ transformer: inout TreeRegressorModel, with input: DataFrame, eventHandler: EventHandler?) async throws

Updates a transformer with a new sequence of examples. - Parameters: - transformer: A transformer to update. - input: A data frame containing examples. - eventHandler: An event handler.

Omit the output parameters from the call. The result contains $ret and $out, with transformer inside $out.

method · iOS 18.0+

applied

TypeScript
applied(date: globalThis.Date, eventHandler?: (((arg0: Event) => void)) | null): Array<number>
Swift declaration
func applied(to date: Date, eventHandler: EventHandler? = nil) -> [Scalar]

Extracts features of a particular date. - Parameters: - date: The date. - eventHandler: An event handler. - Returns: An array of feature values.

get · iOS 18.0+

calendar

TypeScript
get calendar(): _Foundation_Calendar
Swift declaration
let calendar: Calendar

The calendar.

init · iOS 18.0+

init

TypeScript
static init(features: DateFeatures, calendar?: _Foundation_Calendar): DateFeatureExtractor<number>
Swift declaration
init(features: DateFeatures, calendar: Calendar = Calendar.current)

Creates a date feature extractor. - Parameters: - calendar: The calendar to use, defaults to `Calendar.current`. - features: The date and time features.

get · iOS 18.0+

features

TypeScript
get features(): DateFeatures
Swift declaration
let features: DateFeatures

The date and time features.

get · iOS 17.0+

coefficients

TypeScript
get coefficients(): Array<number>
Swift declaration
var coefficients: [Scalar] { get }

The linear coefficients.

get · iOS 17.0+

featureCount

TypeScript
get featureCount(): number
Swift declaration
var featureCount: Int { get }

The number of features expected in the input.

method · iOS 16.0+

applied

TypeScript
applied(input: _CoreML_MLShapedArray<number>, eventHandler?: (((arg0: Event) => void)) | null): Promise<number>
Swift declaration
func applied(to input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) async throws -> Scalar

Performs a regression on a single input. - Parameters: - input: The regressor input. - eventHandler: An event handler. - Returns: A regression.

get · iOS 18.0+

configuration

TypeScript
get configuration(): TimeSeriesClassifierConfiguration
Swift declaration
var configuration: TimeSeriesClassifierConfiguration

The configuration.

set · iOS 18.0+

configuration

TypeScript
set configuration(value: TimeSeriesClassifierConfiguration)
Swift declaration
var configuration: TimeSeriesClassifierConfiguration

The configuration.

method · iOS 18.0+

makeTransformer

TypeScript
makeTransformer(): TimeSeriesClassifier_Model<number, SDKHandle>
Swift declaration
func makeTransformer() -> TimeSeriesClassifier<Scalar, Label>.Model

Creates a default-initialized model suitable for incremental fitting.

method · iOS 18.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: TimeSeriesClassifier_Model<number, SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> TimeSeriesClassifier<Scalar, Label>.Transformer

Reads the encoded model and optimizer with a decoder.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 18.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: TimeSeriesClassifier_Model<number, SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: TimeSeriesClassifier<Scalar, Label>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the model and optimizer to an encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 18.0+

export

TypeScript
exportToMetadata(url: string, metadata: ModelMetadata): void
Swift declaration
func export(to url: URL, metadata: ModelMetadata) throws

Exports this transformer as a CoreML model package with user-supplied metadata. - Parameters: - url: The location to write the model into. - metadata: Contextual user-provided information.

method · iOS 18.0+

export

TypeScript
exportTo(url: string): void
Swift declaration
func export(to url: URL) throws

Exports this transformer as a CoreML model package. - Parameter url: The location to write the model into.

get · iOS 18.0+

stride

TypeScript
get stride(): number
Swift declaration
var stride: Int

The number of samples between temporal predictions.

set · iOS 18.0+

stride

TypeScript
set stride(value: number)
Swift declaration
var stride: Int

The number of samples between temporal predictions.

method · iOS 18.0+

applied

TypeScript
applied(input: _CoreML_MLShapedArray<number>, eventHandler?: (((arg0: Event) => void)) | null): Promise<ClassificationDistribution<SDKHandle>>
Swift declaration
func applied(to input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) async throws -> ClassificationDistribution<Label>

Performs a classification on a shaped array of input features. - Parameters: - input: A shaped array of input features. The shape must `[sequenceLength, featureSize]`. - eventHandler: An event handler. - Returns: A classification distribution.

function · iOS 17.0+

maximumAbsoluteError

TypeScript
maximumAbsoluteError(annotatedPredictions: Array<AnnotatedPrediction<number, number>>): number
Swift declaration
func maximumAbsoluteError<T>(_ annotatedPredictions: [AnnotatedPrediction<T, T>]) -> T where T : FloatingPoint

Computes the maximum absolute error between predicted and ground truth values. If an empty `AnnotatedPrediction` is supplied, the result will be NaN. - Parameters: - annotatedPredictions: An `AnnotatedPrediction` object. - Returns: The maximum absolute error.

function · iOS 17.0+

rootMeanSquaredError

TypeScript
rootMeanSquaredError(annotatedPredictions: Array<AnnotatedPrediction<number, number>>): number
Swift declaration
func rootMeanSquaredError<T>(_ annotatedPredictions: [AnnotatedPrediction<T, T>]) -> T where T : FloatingPoint

Computes the root mean squared error between predicted and ground truth values. If an empty `AnnotatedPrediction` is supplied, the result will be NaN. - Parameters: - annotatedPredictions: An `AnnotatedPrediction` object. - Returns: The root mean squared error.

get · iOS 16.0+

configuration

TypeScript
get configuration(): BoostedTreeConfiguration
Swift declaration
var configuration: BoostedTreeConfiguration { get set }

Boosted tree configuration.

set · iOS 16.0+

configuration

TypeScript
set configuration(value: BoostedTreeConfiguration)
Swift declaration
var configuration: BoostedTreeConfiguration { get set }

Boosted tree configuration.

method · iOS 17.0+

makeTransformer

TypeScript
makeTransformer(): TreeClassifierModel<SDKHandle>
Swift declaration
func makeTransformer() -> TreeClassifierModel<Label>

Creates a default-initialized transformer suitable for incremental fitting.

get · iOS 16.0+

annotationColumnID

TypeScript
get annotationColumnID(): _TabularData_ColumnID<SDKHandle>
Swift declaration
var annotationColumnID: ColumnID<Label>

The annotation column identifier.

set · iOS 16.0+

annotationColumnID

TypeScript
set annotationColumnID(value: _TabularData_ColumnID<SDKHandle>)
Swift declaration
var annotationColumnID: ColumnID<Label>

The annotation column identifier.

get · iOS 16.0+

featureColumnNames

TypeScript
get featureColumnNames(): Array<string>
Swift declaration
var featureColumnNames: [String]

The names of the columns containing feature values.

set · iOS 16.0+

featureColumnNames

TypeScript
set featureColumnNames(value: Array<string>)
Swift declaration
var featureColumnNames: [String]

The names of the columns containing feature values.

method · iOS 17.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: TreeClassifierModel<SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> TreeClassifierModel<Label>

Reads the encoded transformer and optimizer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: TreeClassifierModel<SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: TreeClassifierModel<Label>, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: TreeClassifierModel<SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> TreeClassifierModel<Label>

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: TreeClassifierModel<SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: TreeClassifierModel<Label>, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

fitted

TypeScript
fitted(input: _TabularData_DataFrame, validation?: (_TabularData_DataFrame) | null, eventHandler?: (((arg0: Event) => void)) | null): Promise<TreeClassifierModel<SDKHandle>>
Swift declaration
func fitted(to input: DataFrame, validateOn validation: DataFrame? = nil, eventHandler: EventHandler? = nil) async throws -> TreeClassifierModel<Label>

Fits a boosted tree classifier model to a collection of examples. - Parameters: - input: A data frame of examples. - validation: A data frame of validation examples. - eventHandler: An event handler. This method reports accuracy and loss metrics. - Returns: The fitted boosted tree classifier model.

method · iOS 17.0+

update

TypeScript
update(transformer: TreeClassifierModel<SDKHandle>, input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<{ $ret: null; $out: { "transformer": TreeClassifierModel<SDKHandle> } }>
Swift declaration
func update(_ transformer: inout TreeClassifierModel<Label>, with input: DataFrame, eventHandler: EventHandler?) async throws

Updates a transformer with a new sequence of examples. - Parameters: - transformer: A transformer to update. - input: A data frame containing examples. - eventHandler: An event handler.

Omit the output parameters from the call. The result contains $ret and $out, with transformer inside $out.

method · iOS 16.0+

recallScore

TypeScript
recallScore(label: number): number
Swift declaration
func recallScore(label: Label) -> Double

Computes the recall score for a class label. Precision score is computed as the ratio `tp / (tp + fn)` where `tp` is the number of true positives and `fn` is the number of false negatives. - Parameter label: The label to use as true positive. - Returns: The recall score for the given label.

get · iOS 17.0+

exampleCount

TypeScript
get exampleCount(): number
Swift declaration
var exampleCount: Int { get }

The number of examples used to compute the metrics.

method · iOS 16.0+

precisionScore

TypeScript
precisionScore(label: number): number
Swift declaration
func precisionScore(label: Label) -> Double

Computes the precision score for a class label. Precision score is computed as the ratio `tp / (tp + fp)` where `tp` is the number of true positives and `fp` is the number of false positives. - Parameter label: The label to use as true positive. - Returns: The precision score for the given label.

method · iOS 17.0+

trueNegativeCount

TypeScript
trueNegativeCount(label: number): number
Swift declaration
func trueNegativeCount(of label: Label) -> Int

Returns the number of times a label was not in the predicted or ground truth collections. - Parameter label: A label.

method · iOS 17.0+

truePositiveCount

TypeScript
truePositiveCount(label: number): number
Swift declaration
func truePositiveCount(of label: Label) -> Int

Returns the number of times the predicted label matched the true label. - Parameter label: A label.

method · iOS 17.0+

falseNegativeCount

TypeScript
falseNegativeCount(label: number): number
Swift declaration
func falseNegativeCount(of label: Label) -> Int

Returns the number of times a true label was not predicted. - Parameter label: A label.

method · iOS 17.0+

falsePositiveCount

TypeScript
falsePositiveCount(label: number): number
Swift declaration
func falsePositiveCount(of label: Label) -> Int

Returns the number of times the predicted label did not match the true label. - Parameter label: A label.

get · iOS 17.0+

restrictToKnownLabels

TypeScript
get restrictToKnownLabels(): boolean
Swift declaration
var restrictToKnownLabels: Bool

A Boolean value indicating whether to restrict metrics to labels in the labels set.

set · iOS 17.0+

restrictToKnownLabels

TypeScript
set restrictToKnownLabels(value: boolean)
Swift declaration
var restrictToKnownLabels: Bool

A Boolean value indicating whether to restrict metrics to labels in the labels set.

method · iOS 17.0+

count

TypeScript
countLabel(label: number): number
Swift declaration
func count(label: Label) -> Int

Returns the number of times a label appeared in the ground truth collection. - Parameter label: The label.

method · iOS 17.0+

count

TypeScript
countPredictedLabel(predicted: number, label: number): number
Swift declaration
func count(predicted: Label, label: Label) -> Int

Returns the number of times a predicted, true label pair appeared in the label collections. - Parameters: - predicted: The predicted label. - label: The true label.

method · iOS 17.0+

count

TypeScript
countPredicted(predicted: number): number
Swift declaration
func count(predicted: Label) -> Int

Returns the number of times a label appeared in the predicted collection. - Parameter predicted: The label.

get · iOS 17.0+

labels

TypeScript
get labels(): Array<number>
Swift declaration
var labels: Set<Label>

The set of labels.

set · iOS 17.0+

labels

TypeScript
set labels(value: Array<number>)
Swift declaration
var labels: Set<Label>

The set of labels.

method · iOS 17.0+

f1Score

TypeScript
f1Score(label: number): number
Swift declaration
func f1Score(label: Label) -> Double

Computes the F1 score for a class label. The balanced F-score, or F1 score, is computed as the harmonic mean of the precision and recall. - Parameter label: The label to use as true positive. - Returns: The F1 score for the given label.

get · iOS 16.0+

accuracy

TypeScript
get accuracy(): number
Swift declaration
var accuracy: Double { get set }

The number of correctly classified examples out of the total number of examples.

set · iOS 16.0+

accuracy

TypeScript
set accuracy(value: number)
Swift declaration
var accuracy: Double { get set }

The number of correctly classified examples out of the total number of examples.

method · iOS 17.0+

mapLabels

TypeScript
mapLabels(transform: ((arg0: number) => number)): ClassificationMetrics<number>
Swift declaration
func mapLabels<T>(_ transform: (Label) throws -> T) rethrows -> ClassificationMetrics<T> where T : Hashable

Returns new classification metrics where the labels are the result of applying a transformation. The transformation can combine separate labels into one. The metrics will be adjusted accordingly by combining counts from the original labels. An example of this is combining mixed cased labels into lowercase: ```swift let metrics = ClassificationMetrics(predicted, groundTruth).map({ $0.lowercased() }) ```

init · iOS 17.0+

init

TypeScript
static initPredictedGroundTruthLabels(predicted: Array<number>, groundTruth: Array<number>, labels: Array<number>): ClassificationMetrics<number>
Swift declaration
init<Predicted, Correct>(predicted: Predicted, groundTruth: Correct, labels: Set<Label>) where Label == Predicted.Element, Predicted : Sequence, Correct : Sequence, Predicted.Element == Correct.Element

Creates classification metrics for predicted and ground truth labels. The predicted and ground truth collections are matched element by element in the order they are provided. Both collections must have the same number of elements. Labels not in the labels set are ignored. - Parameters - predicted: The predicted labels. - groundTruth: The true labels. - labels: The set of labels to consider.

init · iOS 17.0+

init

TypeScript
static init(): ClassificationMetrics<number>
Swift declaration
init()

Creates empty classification metrics.

init · iOS 16.0+

init

TypeScript
static init94512(predicted: Array<number>, groundTruth: Array<number>): ClassificationMetrics<number>
Swift declaration
init<Predicted, Correct>(_ predicted: Predicted, _ groundTruth: Correct) where Label == Predicted.Element, Predicted : Collection, Correct : Collection, Predicted.Element == Correct.Element

Creates classification metrics for predicted and ground truth labels. The predicted and ground truth collections are matched element by element in the order they are provided. Both collections must have the same number of elements. - Parameters - predicted: The predicted labels. - groundTruth: The true labels.

get · iOS 17.0+

defaultConfidenceThreshold

TypeScript
get defaultConfidenceThreshold(): number
Swift declaration
var defaultConfidenceThreshold: Float

The default confidence threshold. It is used as the confidence threshold for any label which does not have an explicit confidence threshold, while calculating averagePrecision and meanAveragePrecision.

set · iOS 17.0+

defaultConfidenceThreshold

TypeScript
set defaultConfidenceThreshold(value: number)
Swift declaration
var defaultConfidenceThreshold: Float

The default confidence threshold. It is used as the confidence threshold for any label which does not have an explicit confidence threshold, while calculating averagePrecision and meanAveragePrecision.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ComposedTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> PreprocessingEstimator<Preprocessor, Estimator>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: ComposedTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: PreprocessingEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

init · iOS 16.0+

init

TypeScript
static initContentsOfConfiguration(url: string, configuration: _CoreML_MLModelConfiguration): MLModelRegressorAdaptor<number>
Swift declaration
init(contentsOf url: URL, configuration: MLModelConfiguration) throws

Creates a model adaptor from a CoreML model URL.

init · iOS 16.0+

init

TypeScript
static initModel(model: _CoreML_MLModel): MLModelRegressorAdaptor<number>
Swift declaration
init(model: MLModel) throws

Creates a MLModel regressor adaptor from a model. - Parameters: - model: An MLModel.

get · iOS 16.0+

model

TypeScript
get model(): _CoreML_MLModel
Swift declaration
let model: MLModel

The CoreML model.

method · iOS 16.0+

applied

TypeScript
applied(input: _CoreML_MLShapedArray<number>, eventHandler?: (((arg0: Event) => void)) | null): Promise<number>
Swift declaration
func applied(to input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) async throws -> Double

Performs a prediction from a single input. - Parameters: - input: The input feature. - eventHandler: An event handler. - Returns: A regression result.

get · iOS 16.0+

resultsColumnName

TypeScript
get resultsColumnName(): string
Swift declaration
var resultsColumnName: String

The results column name.

set · iOS 16.0+

resultsColumnName

TypeScript
set resultsColumnName(value: string)
Swift declaration
var resultsColumnName: String

The results column name.

get · iOS 16.0+

annotationColumnID

TypeScript
get annotationColumnID(): _TabularData_ColumnID<SDKHandle>
Swift declaration
var annotationColumnID: ColumnID<AnnotatedFeatureProvider<Base, UnwrappedInput>.Annotation>

The annotation column identifier.

set · iOS 16.0+

annotationColumnID

TypeScript
set annotationColumnID(value: _TabularData_ColumnID<SDKHandle>)
Swift declaration
var annotationColumnID: ColumnID<AnnotatedFeatureProvider<Base, UnwrappedInput>.Annotation>

The annotation column identifier.

get · iOS 16.0+

featuresColumnName

TypeScript
get featuresColumnName(): string
Swift declaration
var featuresColumnName: String

The features column name.

set · iOS 16.0+

featuresColumnName

TypeScript
set featuresColumnName(value: string)
Swift declaration
var featuresColumnName: String

The features column name.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ColumnSelectorTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> AnnotatedFeatureProvider<Base, UnwrappedInput>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: ColumnSelectorTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: AnnotatedFeatureProvider<Base, UnwrappedInput>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

init · iOS 16.0+

init

TypeScript
static initContentsOfConfiguration(url: string, configuration: _CoreML_MLModelConfiguration): MLModelClassifierAdaptor<number>
Swift declaration
init(contentsOf url: URL, configuration: MLModelConfiguration) throws

Creates a model adaptor from a CoreML model URL.

init · iOS 16.0+

init

TypeScript
static initStringLiteral(value: string): MLModelClassifierAdaptor_Label<number>
Swift declaration
init(stringLiteral value: String)

Creates a Label with a string literal.

init · iOS 16.0+

init

TypeScript
static initIntegerLiteral(value: number): MLModelClassifierAdaptor_Label<number>
Swift declaration
init(integerLiteral value: Int)

Creates a Label with an integer literal.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A text representation of the label.

init · iOS 16.0+

init

TypeScript
static initModel(model: _CoreML_MLModel): MLModelClassifierAdaptor<number>
Swift declaration
init(model: MLModel) throws

Creates a MLModel classifier adaptor from a model. - Parameters: - model: An MLModel.

get · iOS 16.0+

model

TypeScript
get model(): _CoreML_MLModel
Swift declaration
let model: MLModel

The CoreML model.

method · iOS 16.0+

applied

TypeScript
applied(input: _CoreML_MLShapedArray<number>, eventHandler?: (((arg0: Event) => void)) | null): Promise<ClassificationDistribution<MLModelClassifierAdaptor_Label<number>>>
Swift declaration
func applied(to input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) async throws -> ClassificationDistribution<MLModelClassifierAdaptor<Scalar>.Label>

Performs a prediction from a single input. - Parameters: - input: The input feature. - eventHandler: An event handler. - Returns: A classification distribution.

method · iOS 16.0+

makeAsyncIterator

TypeScript
makeAsyncIterator(): SlidingWindowTransformer_WindowSequence_Iterator<number>
Swift declaration
func makeAsyncIterator() -> SlidingWindowTransformer<Input>.WindowSequence.Iterator

Creates the asynchronous iterator that produces elements of this asynchronous sequence. - Returns: An instance of the `AsyncIterator` type used to produce elements of the asynchronous sequence.

get · iOS 16.0+

count

TypeScript
get count(): (number) | null
Swift declaration
var count: Int? { get }

The number of elements in the sequence.

method · iOS 16.0+

next

TypeScript
next(): Promise<(TemporalFeature<Array<number>>) | null>
Swift declaration
mutating func next() async throws -> TemporalFeature<SlidingWindowTransformer<Input>.Output>?

Asynchronously advances to the next element and returns it, or ends the sequence if there is no next element. - Returns: The next element, if it exists, or `nil` to signal the end of the sequence.

get · iOS 16.0+

length

TypeScript
get length(): number
Swift declaration
let length: Int

The length of a window.

init · iOS 16.0+

init

TypeScript
static init(stride: number, length: number): SlidingWindowTransformer<number>
Swift declaration
init(stride: Int, length: Int)

Creates a window temporal transformer. - Parameters: - stride: The number of frames between the start of two consecutive windows. Must be greater than 0. - length: The length of a window in number of frames. Must be greater than 0.

get · iOS 16.0+

stride

TypeScript
get stride(): number
Swift declaration
let stride: Int

The number of elements between the start of two consecutive windows.

get · iOS 16.0+

columnMapping

TypeScript
get columnMapping(): Record<string, string>
Swift declaration
var columnMapping: [String : String]

A mapping of input column names to output column names.

set · iOS 16.0+

columnMapping

TypeScript
set columnMapping(value: Record<string, string>)
Swift declaration
var columnMapping: [String : String]

A mapping of input column names to output column names.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

method · iOS 16.0+

applied

TypeScript
applied(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<_TabularData_DataFrame>
Swift declaration
func applied(to input: DataFrame, eventHandler: EventHandler? = nil) async throws -> DataFrame

Performs the transformation on selected columns of the data frame. - Parameters: - input: A data frame. - eventHandler: An event handler. - Returns: A data frame produced by applying the transformer to selected columns.

init · iOS 16.0+

init

TypeScript
static initContentsOfConfiguration(url: string, configuration: _CoreML_MLModelConfiguration): MLModelTransformerAdaptor<number>
Swift declaration
init(contentsOf url: URL, configuration: MLModelConfiguration) throws

Creates a model adaptor from a CoreML model URL.

init · iOS 16.0+

init

TypeScript
static initModel(model: _CoreML_MLModel): MLModelTransformerAdaptor<number>
Swift declaration
init(model: MLModel) throws

Creates a model adaptor from an MLModel. - Parameters: - model: An MLModel.

get · iOS 16.0+

model

TypeScript
get model(): _CoreML_MLModel
Swift declaration
let model: MLModel

The CoreML model.

method · iOS 16.0+

applied

TypeScript
applied(input: _CoreML_MLShapedArray<number>, eventHandler?: (((arg0: Event) => void)) | null): Promise<_CoreML_MLShapedArray<number>>
Swift declaration
func applied(to input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) async throws -> MLShapedArray<Scalar>

Performs a transformation on a single input. - Parameters: - input: The input. - eventHandler: An event handler. - Returns: The transformed input.

get · iOS 17.0+

stringValue

TypeScript
getStringValue($self: ObjectDetectionAnnotation_Annotation_CodingKeys): string
Swift declaration
var stringValue: String { get }

The string to use in a named collection (e.g. a string-keyed dictionary).

get · iOS 17.0+

intValue

TypeScript
getIntValue($self: ObjectDetectionAnnotation_Annotation_CodingKeys): (number) | null
Swift declaration
var intValue: Int? { get }

The value to use in an integer-indexed collection (e.g. an int-keyed dictionary).

get · iOS 17.0+

rawValue

TypeScript
getRawValue($self: ObjectDetectionAnnotation_Annotation_CodingKeys): string
Swift declaration
var rawValue: String { get }

The corresponding value of the raw type. A new instance initialized with `rawValue` will be equivalent to this instance. For example: enum PaperSize: String { case A4, A5, Letter, Legal } let selectedSize = PaperSize.Letter print(selectedSize.rawValue) // Prints "Letter" print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) // Prints "true"

get · iOS 17.0+

boundingBox

TypeScript
get boundingBox(): { x: number; y: number; width: number; height: number }
Swift declaration
let boundingBox: CGRect

The bounding box that describes the spatial location of the object.

get · iOS 17.0+

stringValue

TypeScript
getStringValue($self: ObjectDetectionAnnotation_CodingKeys): string
Swift declaration
var stringValue: String { get }

The string to use in a named collection (e.g. a string-keyed dictionary).

get · iOS 17.0+

intValue

TypeScript
getIntValue($self: ObjectDetectionAnnotation_CodingKeys): (number) | null
Swift declaration
var intValue: Int? { get }

The value to use in an integer-indexed collection (e.g. an int-keyed dictionary).

get · iOS 17.0+

rawValue

TypeScript
getRawValue($self: ObjectDetectionAnnotation_CodingKeys): string
Swift declaration
var rawValue: String { get }

The corresponding value of the raw type. A new instance initialized with `rawValue` will be equivalent to this instance. For example: enum PaperSize: String { case A4, A5, Letter, Legal } let selectedSize = PaperSize.Letter print(selectedSize.rawValue) // Prints "Letter" print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) // Prints "true"

get · iOS 17.0+

imageFileName

TypeScript
get imageFileName(): string
Swift declaration
let imageFileName: String

The name of the image file.

get · iOS 17.0+

id

TypeScript
get id(): string
Swift declaration
var id: String { get }

The identifier of the object detection annotation

get · iOS 17.0+

objects

TypeScript
get objects(): Array<ObjectDetectionAnnotation_Annotation<SDKHandle>>
Swift declaration
let objects: [ObjectDetectionAnnotation<Label>.Annotation]

The list of object annotations in the image.

get · iOS 16.0+

startIndex

TypeScript
get startIndex(): number
Swift declaration
var startIndex: Int { get }

The index of the initial element in the classification distribution.

get · iOS 16.0+

mostLikelyLabel

TypeScript
get mostLikelyLabel(): (number) | null
Swift declaration
var mostLikelyLabel: Label? { get }

The label with the highest probability.

get · iOS 16.0+

labelsSortedByProbability

TypeScript
get labelsSortedByProbability(): Array<number>
Swift declaration
var labelsSortedByProbability: [Label] { get }

The labels sorted by decreasing probability.

method · iOS 16.0+

map

TypeScript
map(transform: ((arg0: Classification<number>) => Classification<number>)): ClassificationDistribution<number>
Swift declaration
func map<T>(_ transform: (Classification<Label>) throws -> Classification<T>) rethrows -> ClassificationDistribution<T> where T : Hashable

Creates a new classification distribution by applying a transformation to every element. - Parameter transform: A transformation closure.

method · iOS 16.0+

index

TypeScript
indexAfter(i: number): number
Swift declaration
func index(after i: Int) -> Int

Returns the index immediately after an element index. - Parameter i: A valid index to an element in the classification distribution.

method · iOS 16.0+

index

TypeScript
indexBefore(i: number): number
Swift declaration
func index(before i: Int) -> Int

Returns the index immediately before an element index. - Parameter i: A valid index to an element in the classification distribution.

get · iOS 16.0+

endIndex

TypeScript
get endIndex(): number
Swift declaration
var endIndex: Int { get }

The index of the final element in the classification distribution.

method · iOS 16.0+

topLabels

TypeScript
topLabels(amount: number): Array<number>
Swift declaration
func topLabels(_ amount: Int) -> [Label]

Computes the most likely labels in the classification set. - Parameter amount: The number of top labels. - Returns: The labels with the highest probabilities.

subscript · iOS 16.0+

subscript

TypeScript
subscript(index: number): Classification<number>
Swift declaration
subscript(index: Int) -> Classification<Label> { get }

Accesses a classification at an index. - Parameter index: A valid index to a classification in the classification distribution.

init · iOS 16.0+

init

TypeScript
static init(classifications: Array<Classification<number>>): ClassificationDistribution<number>
Swift declaration
init<C>(_ classifications: C) where C : Collection, C.Element == Classification<Label>

Creates a classification distribution. - Parameter classifications: A collection of classifications. - Precondition: The classifications must contain unique labels.

subscript · iOS 16.0+

subscript

TypeScript
subscript33028(label: number): (number) | null
Swift declaration
subscript(label: Label) -> Float? { get }

Accesses a probability with label. - Parameter label: A label in the classification set.

subscript · iOS 16.0+

subscript

TypeScript
subscript19732(bounds: SDKHandle): SDKHandle
Swift declaration
subscript(bounds: Range<Int>) -> Slice<ClassificationDistribution<Label>> { get }

Accesses a contiguous range of elements. - Parameter bounds: A range of valid indices in the classification distribution.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

get · iOS 16.0+

inner

TypeScript
get inner(): TreeRegressorModel
Swift declaration
var inner: Inner

The inner transformer.

set · iOS 16.0+

inner

TypeScript
set inner(value: TreeRegressorModel)
Swift declaration
var inner: Inner

The inner transformer.

get · iOS 16.0+

outer

TypeScript
get outer(): TreeRegressorModel
Swift declaration
var outer: Outer

The outer transformer.

set · iOS 16.0+

outer

TypeScript
set outer(value: TreeRegressorModel)
Swift declaration
var outer: Outer

The outer transformer.

method · iOS 16.0+

applied

TypeScript
applied(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<_TabularData_DataFrame>
Swift declaration
func applied(to input: DataFrame, eventHandler: EventHandler? = nil) async throws -> DataFrame

Performs the composed transformation on a single input. - Parameters: - input: The transformer input. - eventHandler: An event handler. - Returns: An output produced by applying the transformer to the input.

init · iOS 16.0+

init

TypeScript
static init(inner: TreeRegressorModel, outer: TreeRegressorModel): ComposedTabularTransformer<TreeRegressorModel, TreeRegressorModel>
Swift declaration
init(_ inner: Inner, _ outer: Outer)

Creates a composed tabular transformer from two tabular transformers. - Parameters: - inner: The inner transformer. - outer: The outer transformer.

method · iOS 16.0+ · Deprecated in iOS 18.0

decode

TypeScript
decode(decoder: SDKHandle): { $ret: TransformerToTemporalAdaptor<SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> EstimatorToTemporalAdaptor<Base>.Transformer

Decodes the transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encode

TypeScript
encode(transformer: TransformerToTemporalAdaptor<SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: EstimatorToTemporalAdaptor<Base>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 18.0+

configuration

TypeScript
get configuration(): LinearTimeSeriesForecasterConfiguration
Swift declaration
let configuration: LinearTimeSeriesForecaster<Scalar>.Configuration

The configuration.

init · iOS 18.0+

init

TypeScript
static init(configuration: LinearTimeSeriesForecasterConfiguration): LinearTimeSeriesForecaster<number>
Swift declaration
init(configuration: LinearTimeSeriesForecaster<Scalar>.Configuration)

Creates a linear time-series forecaster. - Parameter configuration: The configuration parameters.

get · iOS 18.0+

inputWindowSize

TypeScript
get inputWindowSize(): number
Swift declaration
var inputWindowSize: Int { get }

The number of input samples.

method · iOS 18.0+

makeTransformer

TypeScript
makeTransformer(): LinearTimeSeriesForecaster_Model<number>
Swift declaration
func makeTransformer() -> LinearTimeSeriesForecaster<Scalar>.Model

Creates a default-initialized model suitable for incremental fitting.

get · iOS 18.0+

forecastWindowSize

TypeScript
get forecastWindowSize(): number
Swift declaration
var forecastWindowSize: Int { get }

The number of predicted samples.

method · iOS 18.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: LinearTimeSeriesForecaster_Model<number>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> LinearTimeSeriesForecaster<Scalar>.Transformer

Reads the encoded model and optimizer with a decoder.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 18.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(model: LinearTimeSeriesForecaster_Model<number>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ model: LinearTimeSeriesForecaster<Scalar>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the model and optimizer to an encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 18.0+

featureSize

TypeScript
get featureSize(): number
Swift declaration
var featureSize: Int { get }

The number of features per sample.

get · iOS 18.0+

annotationSize

TypeScript
get annotationSize(): number
Swift declaration
var annotationSize: Int { get }

The number of annotations per sample.

get · iOS 18.0+

inputWindowSize

TypeScript
get inputWindowSize(): number
Swift declaration
var inputWindowSize: Int { get }

The number of input samples.

get · iOS 18.0+

forecastWindowSize

TypeScript
get forecastWindowSize(): number
Swift declaration
var forecastWindowSize: Int { get }

The number of prediction samples.

get · iOS 18.0+

bias

TypeScript
get bias(): (_CoreML_MLShapedArray<number>) | null
Swift declaration
var bias: MLShapedArray<Scalar>? { get }

The bias coefficients.

method · iOS 18.0+

export

TypeScript
exportToMetadata(url: string, metadata: ModelMetadata): void
Swift declaration
func export(to url: URL, metadata: ModelMetadata) throws

Exports this transformer as a CoreML model package with user-supplied metadata. - Parameters: - url: The location to write the model into. - metadata: Contextual user-provided information.

method · iOS 18.0+

export

TypeScript
exportTo(url: string): void
Swift declaration
func export(to url: URL) throws

Exports this transformer as a CoreML model package. - Parameter url: The location to write the model into.

get · iOS 18.0+

stride

TypeScript
get stride(): number
Swift declaration
var stride: Int

The number of samples between windows.

set · iOS 18.0+

stride

TypeScript
set stride(value: number)
Swift declaration
var stride: Int

The number of samples between windows.

get · iOS 18.0+

weight

TypeScript
get weight(): _CoreML_MLShapedArray<number>
Swift declaration
var weight: MLShapedArray<Scalar> { get }

The linear coefficients.

method · iOS 18.0+

applied

TypeScript
appliedToEventHandler(input: _CoreML_MLShapedArray<number>, eventHandler?: (((arg0: Event) => void)) | null): Promise<_CoreML_MLShapedArray<number>>
Swift declaration
func applied(to input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) async throws -> MLShapedArray<Scalar>

Performs a prediction on a shaped array of features. This method uses a sliding window to chunk the input features into ``inputWindowSize`` elements every ``stride`` elements. If you want to use a different windowing strategy, use ``applied(toWindow:eventHandler:)``. - Parameters: - input: An shaped array of features. The shape must be `[N, featureSize]` where `N` is the length of the sequence, which must be at least `inputWindowSize`. - eventHandler: An event handler. - Returns: A shaped array of predictions with shape `[M, forecastWindowSize, annotationSize]` where `M` is the number of predictions based on the input sequence length and the ``stride`` property.

method · iOS 18.0+

applied

TypeScript
appliedToWindowEventHandler(input: _CoreML_MLShapedArray<number>, eventHandler?: (((arg0: Event) => void)) | null): Promise<_CoreML_MLShapedArray<number>>
Swift declaration
func applied(toWindow input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) async throws -> MLShapedArray<Scalar>

Performs a prediction on a window of input features. - Parameters: - input: An window of input features with shape `[inputWindowSize, featureSize]`. - eventHandler: An event handler. - Returns: A shaped array of predictions with shape `[forecastWindowSize, annotationSize]`.

method · iOS 18.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: LinearTimeSeriesForecaster_Model<number>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> LinearTimeSeriesForecaster<Scalar>.Transformer

Decodes a previously fitted model.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 18.0+

encode

TypeScript
encode(model: LinearTimeSeriesForecaster_Model<number>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ model: LinearTimeSeriesForecaster<Scalar>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted model.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 18.0+

update

TypeScript
update(model: LinearTimeSeriesForecaster_Model<number>, input: AnnotatedBatch<number>): Promise<{ $ret: number; $out: { "model": LinearTimeSeriesForecaster_Model<number> } }>
Swift declaration
func update(_ model: inout LinearTimeSeriesForecaster<Scalar>.Transformer, with input: AnnotatedBatch<Scalar>) async throws -> Scalar

Updates a model with a new batch of examples. Use ``TimeSeriesForecasterBatches`` to convert a shaped array of features into batches of windowed features and annotations. Here is an example of training a forecaster: ``` let estimator = LinearTimeSeriesForecaster<Float>(configuration: configuration) var model = estimator.makeTransformer() let batches = try TimeSeriesForecasterBatches( features: features, // shape [N, featureSize] annotations: annotations, // shape [N, annotationSize] batchSize: 32, inputWindowSize: configuration.inputWindowSize, forecastWindowSize: configuration.forecastWindowSize, shufflesBatches: true ) for iteration in 0 ..< configuration.maximumIterationCount { for batch in batches { let loss = try await estimator.update(&model, with: batch) print("Loss: \(loss)") } } ``` - Parameters: - model: The model to update. - input: A shaped array of windowed features. The shape should be `[batchSize, inputWindowSize, featureSize]`.

Omit the output parameters from the call. The result contains $ret and $out, with model inside $out.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

get · iOS 18.0+

configuration

TypeScript
get configuration(): MultivariateLinearRegressorConfiguration
Swift declaration
var configuration: MultivariateLinearRegressor<Scalar>.Configuration

The linear regressor configuration.

set · iOS 18.0+

configuration

TypeScript
set configuration(value: MultivariateLinearRegressorConfiguration)
Swift declaration
var configuration: MultivariateLinearRegressor<Scalar>.Configuration

The linear regressor configuration.

method · iOS 18.0+

makeTransformer

TypeScript
makeTransformer(): MultivariateLinearRegressor_Model<number>
Swift declaration
func makeTransformer() -> MultivariateLinearRegressor<Scalar>.Model

Creates a default-initialized model suitable for incremental fitting.

method · iOS 18.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: MultivariateLinearRegressor_Model<number>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> MultivariateLinearRegressor<Scalar>.Model

Reads the encoded model and optimizer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded model.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 18.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(model: MultivariateLinearRegressor_Model<number>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ model: MultivariateLinearRegressor<Scalar>.Model, to encoder: inout any EstimatorEncoder) throws

Encodes the model and optimizer to an encoder. - Parameters: - model: A model this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 18.0+

outputSize

TypeScript
get outputSize(): number
Swift declaration
var outputSize: Int { get }

The output size.

get · iOS 18.0+

bias

TypeScript
get bias(): (_CoreML_MLShapedArray<number>) | null
Swift declaration
var bias: MLShapedArray<Scalar>? { get }

The bias coefficients.

init · iOS 18.0+

init

TypeScript
static init(weight: _CoreML_MLShapedArray<number>, bias?: (_CoreML_MLShapedArray<number>) | null): MultivariateLinearRegressor_Model<number>
Swift declaration
init(weight: MLShapedArray<Scalar>, bias: MLShapedArray<Scalar>?)

Creates a multivariate linear regressor. - Parameters: - weight: A shaped array of linear weights. - bias: A one-dimensional shaped array of biases.

get · iOS 18.0+

weight

TypeScript
get weight(): _CoreML_MLShapedArray<number>
Swift declaration
var weight: MLShapedArray<Scalar> { get }

The linear coefficients.

method · iOS 18.0+

applied

TypeScript
applied(input: _CoreML_MLShapedArray<number>, eventHandler?: (((arg0: Event) => void)) | null): Promise<_CoreML_MLShapedArray<number>>
Swift declaration
func applied(to input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) async throws -> MLShapedArray<Scalar>

Performs a prediction on a shaped array. - Parameters: - input: A shaped array of features. The last dimension must be `inputSize`. - eventHandler: An event handler. - Returns: A shaped array of predictions. The shape of the predictions matches the shape of the input except for the last dimension, which is `outputSize`.

get · iOS 18.0+

inputSize

TypeScript
get inputSize(): number
Swift declaration
var inputSize: Int { get }

The input size.

method · iOS 18.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: MultivariateLinearRegressor_Model<number>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> MultivariateLinearRegressor<Scalar>.Model

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 18.0+

encode

TypeScript
encode(model: MultivariateLinearRegressor_Model<number>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ model: MultivariateLinearRegressor<Scalar>.Model, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 18.0+

fitted

TypeScript
fitted(input: AnnotatedBatch<number>, validation?: (AnnotatedBatch<number>) | null, eventHandler?: (((arg0: Event) => void)) | null): Promise<MultivariateLinearRegressor_Model<number>>
Swift declaration
func fitted(to input: AnnotatedBatch<Scalar>, validateOn validation: AnnotatedBatch<Scalar>?, eventHandler: EventHandler? = nil) async throws -> MultivariateLinearRegressor<Scalar>.Model

Fits a linear regressor model to shaped arrays of features and annotations. - Parameters: - input: An annotated batch containing the features and annotations. The last dimension of the features is the model's input size and the last dimension of the annotations is the model's output size. All the leading dimensions of the features must match all leading dimensions of the annotations. For example, the feature shape can be `[N, X]` and the annotation shape can be `[N, Y]` for `N` examples where `X` is the input size and `Y` is the output size. - validation: An annotated batch containing the validation features and annotations. The last dimension of the features must be `inputSize` and the last dimension of the annotations must be `outputSize`. All the leading dimensions of the features must match all leading dimensions of the annotations. - eventHandler: An event handler. This method reports the mean squared errors. - Returns: The fitted model.

method · iOS 18.0+

update

TypeScript
update(model: MultivariateLinearRegressor_Model<number>, input: AnnotatedBatch<number>): Promise<{ $ret: number; $out: { "model": MultivariateLinearRegressor_Model<number> } }>
Swift declaration
func update(_ model: inout MultivariateLinearRegressor<Scalar>.Model, with input: AnnotatedBatch<Scalar>) async throws -> Scalar

Updates a model with a new shaped array of examples. - Parameters: - model: A model to update. - input: An annotated batch containing the features and annotations. The last dimension of the features is the model's input size and the last dimension of the annotations is the model's output size. All the leading dimensions of the features must match all leading dimensions of the annotations. For example, the feature shape can be `[N, X]` and the annotation shape can be `[N, Y]` for `N` examples where `X` is the input size and `Y` is the output size. - Returns: The mean squared error for the batch, also known as the batch loss.

Omit the output parameters from the call. The result contains $ret and $out, with model inside $out.

method · iOS 16.0+

next

TypeScript
next(): (TemporalFeature<unknown>) | null
Swift declaration
mutating func next() -> TemporalFeature<Feature>?

Asynchronously advances to the next element and returns it, or ends the sequence if there is no next element. - Returns: The next element, if it exists, or `nil` to signal the end of the sequence.

method · iOS 16.0+

makeAsyncIterator

TypeScript
makeAsyncIterator(): PreprocessedFeatureSequence_AsyncIterator<unknown>
Swift declaration
func makeAsyncIterator() -> PreprocessedFeatureSequence<Feature>.AsyncIterator

Creates the asynchronous iterator that produces elements of this asynchronous sequence. - Returns: An instance of the `AsyncIterator` type used to produce elements of the asynchronous sequence.

get · iOS 16.0+

count

TypeScript
get count(): (number) | null
Swift declaration
var count: Int? { get }

The stored temporal feature count.

get · iOS 16.0+

features

TypeScript
get features(): Array<TemporalFeature<unknown>>
Swift declaration
var features: [TemporalFeature<Feature>]

The stored temporal features.

set · iOS 16.0+

features

TypeScript
set features(value: Array<TemporalFeature<unknown>>)
Swift declaration
var features: [TemporalFeature<Feature>]

The stored temporal features.

get · iOS 18.0+

shufflesBatches

TypeScript
get shufflesBatches(): boolean
Swift declaration
var shufflesBatches: Bool

A Boolean value indicating whether to shuffle the batches.

set · iOS 18.0+

shufflesBatches

TypeScript
set shufflesBatches(value: boolean)
Swift declaration
var shufflesBatches: Bool

A Boolean value indicating whether to shuffle the batches.

get · iOS 18.0+

annotations

TypeScript
get annotations(): _CoreML_MLShapedArray<number>
Swift declaration
let annotations: MLShapedArray<Scalar>

The original annotations.

method · iOS 18.0+

makeIterator

TypeScript
makeIterator(): TimeSeriesForecasterBatches_Iterator<number>
Swift declaration
func makeIterator() -> TimeSeriesForecasterBatches<Scalar>.Iterator

Returns an iterator over the elements of this sequence.

get · iOS 18.0+

inputWindowSize

TypeScript
get inputWindowSize(): number
Swift declaration
let inputWindowSize: Int

The input sample count.

get · iOS 18.0+

forecastWindowSize

TypeScript
get forecastWindowSize(): number
Swift declaration
let forecastWindowSize: Int

The prediction sample count.

get · iOS 18.0+

underestimatedCount

TypeScript
get underestimatedCount(): number
Swift declaration
var underestimatedCount: Int { get }

A value less than or equal to the number of elements in the sequence, calculated nondestructively. The default implementation returns 0. If you provide your own implementation, make sure to compute the value nondestructively. - Complexity: O(1), except if the sequence also conforms to `Collection`. In this case, see the documentation of `Collection.underestimatedCount`.

method · iOS 18.0+

next

TypeScript
next(): (AnnotatedBatch<number>) | null
Swift declaration
mutating func next() -> AnnotatedBatch<Scalar>?

Advances to the next element and returns it, or `nil` if no next element exists. Repeatedly calling this method returns, in order, all the elements of the underlying sequence. As soon as the sequence has run out of elements, all subsequent calls return `nil`. You must not call this method if any other copy of this iterator has been advanced with a call to its `next()` method. The following example shows how an iterator can be used explicitly to emulate a `for`-`in` loop. First, retrieve a sequence's iterator, and then call the iterator's `next()` method until it returns `nil`. let numbers = [2, 3, 5, 7] var numbersIterator = numbers.makeIterator() while let num = numbersIterator.next() { print(num) } // Prints "2" // Prints "3" // Prints "5" // Prints "7" - Returns: The next element in the underlying sequence, if a next element exists; otherwise, `nil`.

init · iOS 18.0+

init

TypeScript
static init(features: _CoreML_MLShapedArray<number>, annotations: _CoreML_MLShapedArray<number>, batchSize: number, inputWindowSize: number, forecastWindowSize: number, shufflesBatches?: boolean): TimeSeriesForecasterBatches<number>
Swift declaration
init(features: MLShapedArray<Scalar>, annotations: MLShapedArray<Scalar>, batchSize: Int, inputWindowSize: Int, forecastWindowSize: Int, shufflesBatches: Bool = true) throws

Creates a batch sequence. - Parameters: - features: A shaped array of features, it must have two dimensions. - annotations: A shaped array of annotations, it must have two dimensions. - batchSize: The batch size. Must be positive. - inputWindowSize: The number of input samples. Must be positive. - forecastWindowSize: The number of prediction samples. Must be positive. - shufflesBatches: A Boolean value indicating whether to shuffle the batches.

get · iOS 18.0+

features

TypeScript
get features(): _CoreML_MLShapedArray<number>
Swift declaration
let features: MLShapedArray<Scalar>

The original features.

get · iOS 18.0+

batchSize

TypeScript
get batchSize(): number
Swift declaration
let batchSize: Int

The batch size.

function · iOS 17.0+

meanAbsolutePercentageError

TypeScript
meanAbsolutePercentageError(annotatedPredictions: Array<AnnotatedPrediction<number, number>>): number
Swift declaration
func meanAbsolutePercentageError<T>(_ annotatedPredictions: [AnnotatedPrediction<T, T>]) -> T where T : FloatingPoint

Computes the mean absolute percentage error between predicted and ground truth values. If an empty `AnnotatedPrediction` is supplied, the result will be NaN. - Parameters: - annotatedPredictions: An `AnnotatedPrediction` object. - Returns: The mean absolute percentage error as a decimal value.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: unknown; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> EstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer

Returns the pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: unknown, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: EstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any EstimatorEncoder) throws

Does nothing since this estimator uses a pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 17.0+

scaleFeatures

TypeScript
get scaleFeatures(): boolean
Swift declaration
var scaleFeatures: Bool

A Boolean value indicating whether to scale the input features. Scaling the features reduces numerical errors.

set · iOS 17.0+

scaleFeatures

TypeScript
set scaleFeatures(value: boolean)
Swift declaration
var scaleFeatures: Bool

A Boolean value indicating whether to scale the input features. Scaling the features reduces numerical errors.

get · iOS 16.0+

maximumIterations

TypeScript
get maximumIterations(): number
Swift declaration
var maximumIterations: Int

The maximum number of allowed passes through the data. More passes over the data can result in a more accurately trained model. Consider increasing this if the training accuracy is low. Defaults to 25. - Note: This parameter is only used by the `fitted` method. When using the `update` method it's up to you to decide when to stop.

set · iOS 16.0+

maximumIterations

TypeScript
set maximumIterations(value: number)
Swift declaration
var maximumIterations: Int

The maximum number of allowed passes through the data. More passes over the data can result in a more accurately trained model. Consider increasing this if the training accuracy is low. Defaults to 25. - Note: This parameter is only used by the `fitted` method. When using the `update` method it's up to you to decide when to stop.

get · iOS 16.0+

convergenceThreshold

TypeScript
get convergenceThreshold(): number
Swift declaration
var convergenceThreshold: Double

The convergence threshold. When the residual is within the convergence threshold of the objective, training stops. The threshold is also used by the `fitted` method to decide when progress is no longer being made, in which case the training process will stop before convergence and before the specified maximum number of iterations (known as early stopping). Consider reducing this value for a more accurately trained model. But beware of overfitting if the it is set to a very low value. Defaults to 0.01.

set · iOS 16.0+

convergenceThreshold

TypeScript
set convergenceThreshold(value: number)
Swift declaration
var convergenceThreshold: Double

The convergence threshold. When the residual is within the convergence threshold of the objective, training stops. The threshold is also used by the `fitted` method to decide when progress is no longer being made, in which case the training process will stop before convergence and before the specified maximum number of iterations (known as early stopping). Consider reducing this value for a more accurately trained model. But beware of overfitting if the it is set to a very low value. Defaults to 0.01.

get · iOS 17.0+

optimizationStrategy

TypeScript
get optimizationStrategy(): OptimizationStrategy
Swift declaration
var optimizationStrategy: OptimizationStrategy { get set }

The optimization strategy.

set · iOS 17.0+

optimizationStrategy

TypeScript
set optimizationStrategy(value: OptimizationStrategy)
Swift declaration
var optimizationStrategy: OptimizationStrategy { get set }

The optimization strategy.

get · iOS 17.0+

earlyStopIterationCount

TypeScript
get earlyStopIterationCount(): number
Swift declaration
var earlyStopIterationCount: Int

The number of iterations to use when evaluating whether to stop early. The `fitted` method will stop if no significant progress is made for this many iterations. Significant progress happens when the validation accuracy increases by at least `convergenceThreshold`. - Note: Early stopping only happens when using the `fitted` method with validation data.

set · iOS 17.0+

earlyStopIterationCount

TypeScript
set earlyStopIterationCount(value: number)
Swift declaration
var earlyStopIterationCount: Int

The number of iterations to use when evaluating whether to stop early. The `fitted` method will stop if no significant progress is made for this many iterations. Significant progress happens when the validation accuracy increases by at least `convergenceThreshold`. - Note: Early stopping only happens when using the `fitted` method with validation data.

get · iOS 16.0+

stepSize

TypeScript
get stepSize(): number
Swift declaration
var stepSize: Double

The starting step size to use for the solver. Defaults to 1.0. If the first iteration takes a considerable amount of time, reducing this parameter may speed up model training.

set · iOS 16.0+

stepSize

TypeScript
set stepSize(value: number)
Swift declaration
var stepSize: Double

The starting step size to use for the solver. Defaults to 1.0. If the first iteration takes a considerable amount of time, reducing this parameter may speed up model training.

get · iOS 16.0+

l1Penalty

TypeScript
get l1Penalty(): number
Swift declaration
var l1Penalty: Double

Weight of the L1 regularization term. Like the l2 penalty, the higher the l1 penalty, the more the estimated coefficients shrink toward 0. The l1 penalty, however, completely zeros out sufficiently small coefficients, automatically indicating features that are not useful for the model. The default weight of 0 prevents any features from being discarded.

set · iOS 16.0+

l1Penalty

TypeScript
set l1Penalty(value: number)
Swift declaration
var l1Penalty: Double

Weight of the L1 regularization term. Like the l2 penalty, the higher the l1 penalty, the more the estimated coefficients shrink toward 0. The l1 penalty, however, completely zeros out sufficiently small coefficients, automatically indicating features that are not useful for the model. The default weight of 0 prevents any features from being discarded.

get · iOS 16.0+

l2Penalty

TypeScript
get l2Penalty(): number
Swift declaration
var l2Penalty: Double

Weight of the L2 regularization term. The larger this weight, the more the model coefficients shrink toward 0. This introduces bias into the model but decreases variance, potentially leading to better predictions. The default is 0.01.

set · iOS 16.0+

l2Penalty

TypeScript
set l2Penalty(value: number)
Swift declaration
var l2Penalty: Double

Weight of the L2 regularization term. The larger this weight, the more the model coefficients shrink toward 0. This introduces bias into the model but decreases variance, potentially leading to better predictions. The default is 0.01.

get · iOS 16.0+

configuration

TypeScript
get configuration(): LogisticRegressionClassifier_Configuration<number, SDKHandle>
Swift declaration
var configuration: LogisticRegressionClassifier<Scalar, Label>.Configuration { get set }

The logistic regression classifier configuration.

set · iOS 16.0+

configuration

TypeScript
set configuration(value: LogisticRegressionClassifier_Configuration<number, SDKHandle>)
Swift declaration
var configuration: LogisticRegressionClassifier<Scalar, Label>.Configuration { get set }

The logistic regression classifier configuration.

method · iOS 17.0+

makeTransformer

TypeScript
makeTransformer(): LogisticRegressionClassifierModel<number, SDKHandle>
Swift declaration
func makeTransformer() -> LogisticRegressionClassifier<Scalar, Label>.Transformer

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 17.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: LogisticRegressionClassifierModel<number, SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> LogisticRegressionClassifier<Scalar, Label>.Transformer

Reads the encoded transformer and optimizer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: LogisticRegressionClassifierModel<number, SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: LogisticRegressionClassifier<Scalar, Label>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: LogisticRegressionClassifierModel<number, SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> LogisticRegressionClassifierModel<Scalar, Label>

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: LogisticRegressionClassifierModel<number, SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: LogisticRegressionClassifierModel<Scalar, Label>, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 17.0+

preprocessed

TypeScript
preprocessed(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<_TabularData_DataFrame>
Swift declaration
func preprocessed(from input: DataFrame, eventHandler: EventHandler? = nil) async throws -> DataFrame

Preprocesses a data frame of examples. - Parameters: - input: A data frame of examples. - eventHandler: An event handler. - Returns: The preprocessed examples.

get · iOS 17.0+

preprocessor

TypeScript
get preprocessor(): TreeRegressorModel
Swift declaration
var preprocessor: Preprocessor

The preprocessing transformer.

set · iOS 17.0+

preprocessor

TypeScript
set preprocessor(value: TreeRegressorModel)
Swift declaration
var preprocessor: Preprocessor

The preprocessing transformer.

method · iOS 17.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ComposedTabularTransformer<TreeRegressorModel, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> PreprocessingTabularEstimator<Preprocessor, Estimator>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encode

TypeScript
encode(transformer: ComposedTabularTransformer<TreeRegressorModel, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: PreprocessingTabularEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 17.0+

fitted

TypeScript
fittedToPreprocessedEventHandler(preprocessed: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<ComposedTabularTransformer<TreeRegressorModel, unknown>>
Swift declaration
func fitted(toPreprocessed preprocessed: DataFrame, eventHandler: EventHandler? = nil) async throws -> PreprocessingTabularEstimator<Preprocessor, Estimator>.Transformer

Fits a transformer to a data frame of preprocessed features. - Parameters: - preprocessed: A data frame of preprocessed features. - eventHandler: An event handler. - Returns: The fitted transformer.

method · iOS 17.0+

fitted

TypeScript
fittedToEventHandler(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<ComposedTabularTransformer<TreeRegressorModel, unknown>>
Swift declaration
func fitted(to input: DataFrame, eventHandler: EventHandler? = nil) async throws -> PreprocessingTabularEstimator<Preprocessor, Estimator>.Transformer

Fits a composed transformer to a data frame of examples. - Parameters: - input: A data frame of examples. - eventHandler: An event handler. - Returns: The fitted transformer.

get · iOS 17.0+

range

TypeScript
get range(): SDKHandle
Swift declaration
final var range: Range<Parameter>

The range of a random number to use as input to the transformer.

set · iOS 17.0+

range

TypeScript
set range(value: SDKHandle)
Swift declaration
final var range: Range<Parameter>

The range of a random number to use as input to the transformer.

get · iOS 17.0+

transformer

TypeScript
get transformer(): RandomImageCropper
Swift declaration
let transformer: RandomTransformer

The transformation applied to each element.

get · iOS 16.0+

configuration

TypeScript
get configuration(): FullyConnectedNetworkConfiguration
Swift declaration
var configuration: FullyConnectedNetworkConfiguration

The fully-connected-network configuration.

set · iOS 16.0+

configuration

TypeScript
set configuration(value: FullyConnectedNetworkConfiguration)
Swift declaration
var configuration: FullyConnectedNetworkConfiguration

The fully-connected-network configuration.

init · iOS 16.0+

init

TypeScript
static init(configuration?: FullyConnectedNetworkConfiguration): FullyConnectedNetworkRegressor<number>
Swift declaration
init(configuration: FullyConnectedNetworkConfiguration = .init())

Creates a fully connected network regressor. - Parameter configuration: The configuration.

method · iOS 16.0+

makeTransformer

TypeScript
makeTransformer(): FullyConnectedNetworkRegressorModel<number>
Swift declaration
func makeTransformer() -> FullyConnectedNetworkRegressorModel<Scalar>

Creates a default-initialized fully connected network regressor model suitable for incremental fitting.

method · iOS 16.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: FullyConnectedNetworkRegressorModel<number>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> FullyConnectedNetworkRegressor<Scalar>.Transformer

Decodes a previously fitted transformer with an optimizer. - Parameter decoder: A decoder for the estimator. - Returns: A fully connected network regressor model.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: FullyConnectedNetworkRegressorModel<number>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: FullyConnectedNetworkRegressor<Scalar>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer with an optimizer. - Parameters: - transformer: A fully connected network regressor model. - encoder: An encoder for the estimator.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: FullyConnectedNetworkRegressorModel<number>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> FullyConnectedNetworkRegressorModel<Scalar>

Decodes the estimator. - Parameter decoder: A decoder for the estimator. - Returns: A fully connected network regressor model.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

fitted

TypeScript
fittedToValidateOnEventHandler(input: Array<AnnotatedFeature<SDKHandle, number>>, validation: Array<AnnotatedFeature<SDKHandle, number>>, eventHandler?: (((arg0: Event) => void)) | null): Promise<FullyConnectedNetworkRegressorModel<number>>
Swift declaration
func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: EventHandler? = nil) async throws -> FullyConnectedNetworkRegressorModel<Scalar> where Input : Sequence, Validation : Sequence, Input.Element == AnnotatedFeature<MLShapedArray<Scalar>, Float>, Validation.Element == AnnotatedFeature<MLShapedArray<Scalar>, Float>

Fits a fully connected network regressor model to a sequence of examples. The training process partitions the input into random batches according to the batch size configuration parameter. Training stops when the validation loss stops improving or when the maximum number of iterations is reached. - Parameters: - input: A sequence of examples used for fitting the regressor. - validation: A sequence of examples used for validating the fitted regressor. - eventHandler: An event handler. - Returns: The fitted fully connected network regressor model.

method · iOS 16.0+

fitted

TypeScript
fittedToEventHandler(input: Array<AnnotatedFeature<SDKHandle, number>>, eventHandler?: (((arg0: Event) => void)) | null): Promise<FullyConnectedNetworkRegressorModel<number>>
Swift declaration
func fitted<Input>(to input: Input, eventHandler: EventHandler? = nil) async throws -> FullyConnectedNetworkRegressor<Scalar>.Transformer where Input : Sequence, Input.Element == AnnotatedFeature<MLShapedArray<Scalar>, Float>

Fits a fully connected network regressor model to a sequence of examples. The training process partitions the input into random batches according to the batch size configuration parameter. Training stops when the maximum number of iterations is reached. - Note: This method does not do early-stopping, using a high value for `maximumIterations` may lead to over-fitting. Consider providing a validation set. - Parameters: - input: A sequence of examples used for fitting the transformer. - eventHandler: An event handler. - Returns: The fitted transformer.

method · iOS 16.0+

update

TypeScript
update(transformer: FullyConnectedNetworkRegressorModel<number>, input: Array<AnnotatedFeature<SDKHandle, number>>, eventHandler?: (((arg0: Event) => void)) | null): Promise<{ $ret: null; $out: { "transformer": FullyConnectedNetworkRegressorModel<number> } }>
Swift declaration
func update<InputSequence>(_ transformer: inout FullyConnectedNetworkRegressorModel<Scalar>, with input: InputSequence, eventHandler: EventHandler? = nil) async throws where InputSequence : Sequence, InputSequence.Element == AnnotatedFeature<MLShapedArray<Scalar>, Float>

Updates a fully connected network regressor model with a new sequence of examples. - Parameters: - transformer: A fully connected network regressor model to update. - input: A sequence of examples. - eventHandler: An event handler.

Omit the output parameters from the call. The result contains $ret and $out, with transformer inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ComposedTemporalTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> PreprocessingTemporalEstimator<Preprocessor, Estimator>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encode

TypeScript
encode(transformer: ComposedTemporalTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: PreprocessingTemporalEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 16.0+

configuration

TypeScript
get configuration(): FullyConnectedNetworkConfiguration
Swift declaration
var configuration: FullyConnectedNetworkConfiguration

The fully-connected-network configuration.

set · iOS 16.0+

configuration

TypeScript
set configuration(value: FullyConnectedNetworkConfiguration)
Swift declaration
var configuration: FullyConnectedNetworkConfiguration

The fully-connected-network configuration.

method · iOS 16.0+

makeTransformer

TypeScript
makeTransformer(): FullyConnectedNetworkClassifierModel<number, SDKHandle>
Swift declaration
func makeTransformer() -> FullyConnectedNetworkClassifierModel<Scalar, Label>

Creates a default-initialized fully connected network classifier model suitable for incremental fitting.

method · iOS 16.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: FullyConnectedNetworkClassifierModel<number, SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> FullyConnectedNetworkClassifier<Scalar, Label>.Transformer

Decodes a previously fitted transformer with an optimizer. - Parameter decoder: A decoder for the estimator. - Returns: A fully connected network classifier model.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: FullyConnectedNetworkClassifierModel<number, SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: FullyConnectedNetworkClassifier<Scalar, Label>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer with an optimizer. - Parameters: - transformer: A fully connected network classifier model. - encoder: An encoder for the estimator.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: FullyConnectedNetworkClassifierModel<number, SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> FullyConnectedNetworkClassifierModel<Scalar, Label>

Decodes the estimator. - Parameter decoder: A decoder for the estimator. - Returns: A fully connected network classifier model.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

recallScore

TypeScript
recallScore(label: number): number
Swift declaration
func recallScore(for label: Label) -> Float

Computes the recall score for a class label. Recall score is computed as the ratio `truePositive / (truePositive + falseNegative)`. - Parameter label: The label to use as true positive. - Returns: The recall score for the given label.

get · iOS 17.0+

exampleCount

TypeScript
get exampleCount(): number
Swift declaration
var exampleCount: Int { get }

The number of examples used to compute the metrics.

method · iOS 17.0+

precisionScore

TypeScript
precisionScore(label: number): number
Swift declaration
func precisionScore(for label: Label) -> Float

Computes the precision score for a class label. Precision score is computed as the ratio `truePositive / (truePositive + falsePositive)`. - Parameter label: The label to use as true positive. - Returns: The precision score for the given label.

method · iOS 17.0+

trueNegativeCount

TypeScript
trueNegativeCount(label: number): number
Swift declaration
func trueNegativeCount(of label: Label) -> Int

Returns the number of times a label was not in the predicted or ground truth collections. If the label does not have a confidence threshold, the true negative count is 0. If the label has a confidence threshold NaN, the true negative count is the number elements in the ground truth collection that do not contain the label. If the label is not in the known set of labels, the true negative count is 0. - Parameter label: The label to use as true positive. - Returns: The true negative count.

method · iOS 17.0+

truePositiveCount

TypeScript
truePositiveCount(label: number): number
Swift declaration
func truePositiveCount(of label: Label) -> Int

Returns the number of times the predicted label matched the true label. If the label does not have a confidence threshold, the true positive count is number of elements in the ground truth labels collection that contains the label. If the label has a confidence threshold NaN, the true positive count is 0. If the label is not in the known set of labels, the true positive count is 0. - Parameter label: The label to use as true positive. - Returns: The true positive count.

method · iOS 17.0+

falseNegativeCount

TypeScript
falseNegativeCount(label: number): number
Swift declaration
func falseNegativeCount(of label: Label) -> Int

Returns the number of times a true label was not predicted. If the label does not have a confidence threshold, the false negative count is 0. If the label has a confidence threshold NaN, the false negative count is the number of elements in the ground truth labels collection that do not contain the label. If the label is not in the known set of labels, the false negative count is 0. - Parameter label: The label to use as true positive. - Returns: The false negative count.

method · iOS 17.0+

falsePositiveCount

TypeScript
falsePositiveCount(label: number): number
Swift declaration
func falsePositiveCount(of label: Label) -> Int

Returns the number of times the predicted label did not match the true label. If the label does not have a confidence threshold, the false positive count is the number of elements in the ground truth labels collection that do not contain the label. If the label has a confidence threshold NaN, the false positive count is 0. If the label is not in the known set of labels, the false positive count is 0. - Parameter label: The label to use as true positive. - Returns: The false positive count.

init · iOS 17.0+

init

TypeScript
static init(confidenceThresholds: Record<number, number>): MultiLabelClassificationMetrics<number>
Swift declaration
init(confidenceThresholds: [Label : Float])

Creates empty multi-label classification metrics. - Parameter confidenceThresholds: A dictionary of label and confidence thresholds.

get · iOS 17.0+

confidenceThresholds

TypeScript
get confidenceThresholds(): Record<number, number>
Swift declaration
var confidenceThresholds: [Label : Float] { get }

A dictionary of label and confidence thresholds.

get · iOS 17.0+

meanAveragePrecision

TypeScript
get meanAveragePrecision(): number
Swift declaration
var meanAveragePrecision: Float { get }

The mean average precision. An average precision score summarizes the precision-recall curve for a label. The mean average precision is the mean of the average precision scores for all the classification labels.

method · iOS 17.0+

count

TypeScript
count(label: number): number
Swift declaration
func count(of label: Label) -> Int

Returns the number of times a label appeared in the ground truth collection. - Parameter label: The label.

get · iOS 17.0+

labels

TypeScript
get labels(): Array<number>
Swift declaration
var labels: Set<Label> { get }

The classifier labels.

method · iOS 17.0+

f1Score

TypeScript
f1Score(label: number): number
Swift declaration
func f1Score(for label: Label) -> Float

Computes the F1 score from predicted and ground truth values. The balanced F-score, or F1 score, is computed as the harmonic mean of the precision and recall. If the provided label does not have a confidence threshold, the F1 score is NaN. - Parameter label: The label to use as true positive. - Returns: The F1 score for the given label.

method · iOS 16.0+

makeTransformer

TypeScript
makeTransformer(): ComposedTransformer<SDKHandle, unknown>
Swift declaration
func makeTransformer() -> PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 16.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: ComposedTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer

Reads the encoded transformer and optimizer. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: ComposedTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ComposedTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: ComposedTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ComposedTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> PreprocessingSupervisedEstimator<Preprocessor, Estimator>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: ComposedTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: PreprocessingSupervisedEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 17.0+

coefficients

TypeScript
get coefficients(): Array<number>
Swift declaration
var coefficients: [Scalar] { get }

The linear coefficients.

get · iOS 17.0+

featureCount

TypeScript
get featureCount(): number
Swift declaration
var featureCount: Int { get }

The number of features expected in the input.

method · iOS 16.0+

applied

TypeScript
applied(input: _CoreML_MLShapedArray<number>, eventHandler?: (((arg0: Event) => void)) | null): Promise<ClassificationDistribution<SDKHandle>>
Swift declaration
func applied(to input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) async throws -> ClassificationDistribution<Label>

Performs a classification on a single input. - Parameters: - input: The classifier input. - eventHandler: An event handler. - Returns: A classification distribution.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

method · iOS 16.0+

applied

TypeScript
applied(input: _CoreML_MLShapedArray<number>, eventHandler?: (((arg0: Event) => void)) | null): Promise<number>
Swift declaration
func applied(to input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) async throws -> FullyConnectedNetworkRegressorModel<Scalar>.Target

Performs regression on a shaped array. - Parameters: - input: The regressor input. - eventHandler: An event handler. - Returns: A regression.

get · iOS 16.0+

annotationColumnID

TypeScript
get annotationColumnID(): _TabularData_ColumnID<unknown>
Swift declaration
var annotationColumnID: ColumnID<Annotation>

The annotation column identifier.

set · iOS 16.0+

annotationColumnID

TypeScript
set annotationColumnID(value: _TabularData_ColumnID<unknown>)
Swift declaration
var annotationColumnID: ColumnID<Annotation>

The annotation column identifier.

get · iOS 17.0+

range

TypeScript
get range(): SDKHandle
Swift declaration
var range: ClosedRange<Parameter>

The range of a random number to use as input to the transformer.

set · iOS 17.0+

range

TypeScript
set range(value: SDKHandle)
Swift declaration
var range: ClosedRange<Parameter>

The range of a random number to use as input to the transformer.

method · iOS 16.0+ · Deprecated in iOS 18.0

makeTransformer

TypeScript
makeTransformer(): TransformerToTemporalAdaptor<SDKHandle>
Swift declaration
func makeTransformer() -> UpdatableEstimatorToTemporalAdaptor<Base>.Transformer

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 16.0+ · Deprecated in iOS 18.0

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: TransformerToTemporalAdaptor<SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> UpdatableEstimatorToTemporalAdaptor<Base>.Transformer

Reads the encoded transformer and optimizer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: TransformerToTemporalAdaptor<SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: UpdatableEstimatorToTemporalAdaptor<Base>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer created by this estimator. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

decode

TypeScript
decode(decoder: SDKHandle): { $ret: TransformerToTemporalAdaptor<SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> UpdatableEstimatorToTemporalAdaptor<Base>.Transformer

Decodes the transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encode

TypeScript
encode(transformer: TransformerToTemporalAdaptor<SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: UpdatableEstimatorToTemporalAdaptor<Base>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

method · iOS 16.0+

applied

TypeScript
applied(input: _CoreML_MLShapedArray<number>, eventHandler?: (((arg0: Event) => void)) | null): Promise<ClassificationDistribution<SDKHandle>>
Swift declaration
func applied(to input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) async throws -> ClassificationDistribution<Label>

Performs a classification on a shaped array. - Parameters: - input: The classifier input. - eventHandler: An event handler. - Returns: A classification distribution.

method · iOS 16.0+ · Deprecated in iOS 18.0

decode

TypeScript
decode(decoder: SDKHandle): { $ret: TransformerToTemporalAdaptor<SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> SupervisedEstimatorToTemporalAdaptor<Base>.Transformer

Decodes the transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encode

TypeScript
encode(transformer: TransformerToTemporalAdaptor<SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: SupervisedEstimatorToTemporalAdaptor<Base>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 16.0+

transformer

TypeScript
get transformer(): TreeRegressorModel
Swift declaration
let transformer: Transformer

A pre-defined tabular transformer.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: TreeRegressorModel; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> Transformer

Returns the pre-defined tabular transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: TreeRegressorModel, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: Transformer, to encoder: inout any EstimatorEncoder) throws

Does nothing since this tabular estimator uses a pre-defined tabular transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

fitted

TypeScript
fitted(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<TreeRegressorModel>
Swift declaration
func fitted(to input: DataFrame, eventHandler: EventHandler? = nil) async throws -> Transformer

Returns the pre-defined tabular transformer. - Parameters: - input: A data frame. - eventHandler: An event handler. - Returns: The pre-defined tabular transformer.

init · iOS 16.0+

init

TypeScript
static init(transformer: TreeRegressorModel): TabularTransformerToEstimatorAdaptor<TreeRegressorModel>
Swift declaration
init(_ transformer: Transformer)

Creates a trivial tabular estimator.

method · iOS 16.0+ · Deprecated in iOS 18.0

decode

TypeScript
decode(decoder: SDKHandle): { $ret: unknown; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> TemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer

Returns the pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encode

TypeScript
encode(transformer: unknown, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: TemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any EstimatorEncoder) throws

Does nothing since this estimator uses a pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 18.0+

annotations

TypeScript
get annotations(): _CoreML_MLShapedArray<number>
Swift declaration
let annotations: MLShapedArray<Scalar>

The original annotations.

method · iOS 18.0+

makeIterator

TypeScript
makeIterator(): TimeSeriesForecasterAnnotatedWindows_Iterator<number>
Swift declaration
func makeIterator() -> TimeSeriesForecasterAnnotatedWindows<Scalar>.Iterator

Returns an iterator over the elements of this sequence.

get · iOS 18.0+

inputWindowSize

TypeScript
get inputWindowSize(): number
Swift declaration
let inputWindowSize: Int

The input sample count.

get · iOS 18.0+

shufflesElements

TypeScript
get shufflesElements(): boolean
Swift declaration
var shufflesElements: Bool

A Boolean value indicating whether to shuffle the elements.

set · iOS 18.0+

shufflesElements

TypeScript
set shufflesElements(value: boolean)
Swift declaration
var shufflesElements: Bool

A Boolean value indicating whether to shuffle the elements.

get · iOS 18.0+

forecastWindowSize

TypeScript
get forecastWindowSize(): number
Swift declaration
let forecastWindowSize: Int

The prediction sample count.

get · iOS 18.0+

underestimatedCount

TypeScript
get underestimatedCount(): number
Swift declaration
var underestimatedCount: Int { get }

A value less than or equal to the number of elements in the sequence, calculated nondestructively. The default implementation returns 0. If you provide your own implementation, make sure to compute the value nondestructively. - Complexity: O(1), except if the sequence also conforms to `Collection`. In this case, see the documentation of `Collection.underestimatedCount`.

get · iOS 18.0+

stride

TypeScript
get stride(): number
Swift declaration
var stride: Int

The number of samples between windows.

set · iOS 18.0+

stride

TypeScript
set stride(value: number)
Swift declaration
var stride: Int

The number of samples between windows.

method · iOS 18.0+

next

TypeScript
next(): (AnnotatedFeature<_CoreML_MLShapedArray<number>, _CoreML_MLShapedArray<number>>) | null
Swift declaration
mutating func next() -> AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>?

Advances to the next element and returns it, or `nil` if no next element exists. Repeatedly calling this method returns, in order, all the elements of the underlying sequence. As soon as the sequence has run out of elements, all subsequent calls return `nil`. You must not call this method if any other copy of this iterator has been advanced with a call to its `next()` method. The following example shows how an iterator can be used explicitly to emulate a `for`-`in` loop. First, retrieve a sequence's iterator, and then call the iterator's `next()` method until it returns `nil`. let numbers = [2, 3, 5, 7] var numbersIterator = numbers.makeIterator() while let num = numbersIterator.next() { print(num) } // Prints "2" // Prints "3" // Prints "5" // Prints "7" - Returns: The next element in the underlying sequence, if a next element exists; otherwise, `nil`.

init · iOS 18.0+

init

TypeScript
static init(features: _CoreML_MLShapedArray<number>, annotations: _CoreML_MLShapedArray<number>, inputWindowSize: number, forecastWindowSize: number, stride?: number, shufflesElements?: boolean): TimeSeriesForecasterAnnotatedWindows<number>
Swift declaration
init(features: MLShapedArray<Scalar>, annotations: MLShapedArray<Scalar>, inputWindowSize: Int, forecastWindowSize: Int, stride: Int = 1, shufflesElements: Bool = true) throws

Creates a batch sequence. - Parameters: - features: A shaped array of features, it must have two dimensions. - annotations: A shaped array of annotations, it must have two dimensions. - inputWindowSize: The number of input samples. Must be positive. - forecastWindowSize: The number of prediction samples. Must be positive. - stride: The number of samples between windows. Must be positive. Defaults to 1. - shufflesElements: A Boolean value indicating whether to shuffle the elements. Defaults to true.

get · iOS 18.0+

features

TypeScript
get features(): _CoreML_MLShapedArray<number>
Swift declaration
let features: MLShapedArray<Scalar>

The original features.

get · iOS 16.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 16.0+

filePathType

TypeScript
get filePathType(): DataFrameTemporalAnnotationParameters_FilePathType<number>
Swift declaration
var filePathType: DataFrameTemporalAnnotationParameters<Annotation>.FilePathType

The file path type in the annotation file. The default value is `.absolute`.

set · iOS 16.0+

filePathType

TypeScript
set filePathType(value: DataFrameTemporalAnnotationParameters_FilePathType<number>)
Swift declaration
var filePathType: DataFrameTemporalAnnotationParameters<Annotation>.FilePathType

The file path type in the annotation file. The default value is `.absolute`.

get · iOS 16.0+

endTimeColumnID

TypeScript
get endTimeColumnID(): (_TabularData_ColumnID<number>) | null
Swift declaration
var endTimeColumnID: ColumnID<Double>?

The column id that contains the end time. The default value is `nil`.

set · iOS 16.0+

endTimeColumnID

TypeScript
set endTimeColumnID(value: (_TabularData_ColumnID<number>) | null)
Swift declaration
var endTimeColumnID: ColumnID<Double>?

The column id that contains the end time. The default value is `nil`.

get · iOS 16.0+

filePathColumnID

TypeScript
get filePathColumnID(): _TabularData_ColumnID<string>
Swift declaration
var filePathColumnID: ColumnID<String>

The column id that contains the file path. The default value is "filePath" with String type.

set · iOS 16.0+

filePathColumnID

TypeScript
set filePathColumnID(value: _TabularData_ColumnID<string>)
Swift declaration
var filePathColumnID: ColumnID<String>

The column id that contains the file path. The default value is "filePath" with String type.

get · iOS 16.0+

startTimeColumnID

TypeScript
get startTimeColumnID(): (_TabularData_ColumnID<number>) | null
Swift declaration
var startTimeColumnID: ColumnID<Double>?

The column id that contains the start time. The default value is `nil`.

set · iOS 16.0+

startTimeColumnID

TypeScript
set startTimeColumnID(value: (_TabularData_ColumnID<number>) | null)
Swift declaration
var startTimeColumnID: ColumnID<Double>?

The column id that contains the start time. The default value is `nil`.

get · iOS 16.0+

annotationColumnID

TypeScript
get annotationColumnID(): _TabularData_ColumnID<number>
Swift declaration
var annotationColumnID: ColumnID<Annotation>

The column id that contains the annotation. The default value is "annotation" with `Annotation` type.

set · iOS 16.0+

annotationColumnID

TypeScript
set annotationColumnID(value: _TabularData_ColumnID<number>)
Swift declaration
var annotationColumnID: ColumnID<Annotation>

The column id that contains the annotation. The default value is "annotation" with `Annotation` type.

init · iOS 16.0+

init

TypeScript
static init(): DataFrameTemporalAnnotationParameters<number>
Swift declaration
init()

Creates a DataFrameTemporalAnnotationParameters by using default options.

method · iOS 16.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: unknown; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer

Reads the encoded transformer and optimizer. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: unknown, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer created by this estimator. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: unknown; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer

Returns the pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: unknown, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any EstimatorEncoder) throws

Does nothing since this estimator uses a pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 17.0+

preprocessed

TypeScript
preprocessed(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<_TabularData_DataFrame>
Swift declaration
func preprocessed(from input: DataFrame, eventHandler: EventHandler? = nil) async throws -> DataFrame

Preprocesses a data frame of examples. - Parameters: - input: A data frame of examples. - eventHandler: An event handler. - Returns: The preprocessed examples.

get · iOS 17.0+

preprocessor

TypeScript
get preprocessor(): TreeRegressorModel
Swift declaration
var preprocessor: Preprocessor

The preprocessing transformer.

set · iOS 17.0+

preprocessor

TypeScript
set preprocessor(value: TreeRegressorModel)
Swift declaration
var preprocessor: Preprocessor

The preprocessing transformer.

method · iOS 17.0+

makeTransformer

TypeScript
makeTransformer(): ComposedTabularTransformer<TreeRegressorModel, unknown>
Swift declaration
func makeTransformer() -> PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 17.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: ComposedTabularTransformer<TreeRegressorModel, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer

Reads the encoded transformer and optimizer. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: ComposedTabularTransformer<TreeRegressorModel, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 17.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ComposedTabularTransformer<TreeRegressorModel, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encode

TypeScript
encode(transformer: ComposedTabularTransformer<TreeRegressorModel, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 17.0+

fitted

TypeScript
fittedToPreprocessedEventHandler(preprocessed: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<ComposedTabularTransformer<TreeRegressorModel, unknown>>
Swift declaration
func fitted(toPreprocessed preprocessed: DataFrame, eventHandler: EventHandler? = nil) async throws -> PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer

Fits a transformer to a data frame of preprocessed features. - Parameters: - preprocessed: A data frame of preprocessed features. - eventHandler: An event handler. - Returns: The fitted transformer.

method · iOS 17.0+

fitted

TypeScript
fittedToEventHandler(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<ComposedTabularTransformer<TreeRegressorModel, unknown>>
Swift declaration
func fitted(to input: DataFrame, eventHandler: EventHandler? = nil) async throws -> PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer

Fits a composed transformer to a data frame of examples. - Parameters: - input: A data frame of examples. - eventHandler: An event handler. - Returns: The fitted transformer.

method · iOS 17.0+

update

TypeScript
updateWithPreprocessedEventHandler(transformer: ComposedTabularTransformer<TreeRegressorModel, unknown>, preprocessed: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<{ $ret: null; $out: { "transformer": ComposedTabularTransformer<TreeRegressorModel, unknown> } }>
Swift declaration
func update(_ transformer: inout PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer, withPreprocessed preprocessed: DataFrame, eventHandler: EventHandler? = nil) async throws

Updates a transformer with a new data frame of preprocessed features. - Parameters: - transformer: A transformer to update. - preprocessed: A data frame of preprocessed features. - eventHandler: An event handler.

Omit the output parameters from the call. The result contains $ret and $out, with transformer inside $out.

method · iOS 17.0+

update

TypeScript
updateWithEventHandler(transformer: ComposedTabularTransformer<TreeRegressorModel, unknown>, input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<{ $ret: null; $out: { "transformer": ComposedTabularTransformer<TreeRegressorModel, unknown> } }>
Swift declaration
func update(_ transformer: inout PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer, with input: DataFrame, eventHandler: EventHandler? = nil) async throws

Updates a transformer with a new data frame of examples. - Parameters: - transformer: A transformer to update. - input: A data frame of examples. - eventHandler: An event handler.

Omit the output parameters from the call. The result contains $ret and $out, with transformer inside $out.

method · iOS 17.0+

preprocessed

TypeScript
preprocessed(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<_TabularData_DataFrame>
Swift declaration
func preprocessed(from input: DataFrame, eventHandler: EventHandler? = nil) async throws -> DataFrame

Preprocesses a data frame of examples. - Parameters: - input: A data frame of examples. - eventHandler: An event handler. - Returns: The preprocessed examples.

get · iOS 17.0+

preprocessor

TypeScript
get preprocessor(): TreeRegressorModel
Swift declaration
var preprocessor: Preprocessor

The preprocessing transformer.

set · iOS 17.0+

preprocessor

TypeScript
set preprocessor(value: TreeRegressorModel)
Swift declaration
var preprocessor: Preprocessor

The preprocessing transformer.

method · iOS 17.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ComposedTabularTransformer<TreeRegressorModel, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encode

TypeScript
encode(transformer: ComposedTabularTransformer<TreeRegressorModel, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 17.0+

fitted

TypeScript
fittedToPreprocessedValidateOnEventHandler(preprocessedInput: _TabularData_DataFrame, preprocessedValidation?: (_TabularData_DataFrame) | null, eventHandler?: (((arg0: Event) => void)) | null): Promise<ComposedTabularTransformer<TreeRegressorModel, unknown>>
Swift declaration
func fitted(toPreprocessed preprocessedInput: DataFrame, validateOn preprocessedValidation: DataFrame?, eventHandler: EventHandler? = nil) async throws -> PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer

Fits a transformer to a data frame of preprocessed examples while validating. - Parameters: - preprocessedInput: A data frame of preprocessed features used for fitting the transformer. - preprocessedValidation: A data frame of preprocessed features used for validating the fitted transformer. - eventHandler: An event handler. - Returns: The fitted transformer.

method · iOS 17.0+

fitted

TypeScript
fittedToValidateOnEventHandler(input: _TabularData_DataFrame, validation?: (_TabularData_DataFrame) | null, eventHandler?: (((arg0: Event) => void)) | null): Promise<ComposedTabularTransformer<TreeRegressorModel, unknown>>
Swift declaration
func fitted(to input: DataFrame, validateOn validation: DataFrame?, eventHandler: EventHandler? = nil) async throws -> PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer

Fits a transformer to a data frame - Parameters: - input: A data frame containing examples used for fitting the transformer. - validation: A data frame containing examples used for validating the fitted transformer. - eventHandler: An event handler. - Returns: The fitted transformer.

method · iOS 16.0+ · Deprecated in iOS 18.0

makeTransformer

TypeScript
makeTransformer(): ComposedTemporalTransformer<SDKHandle, unknown>
Swift declaration
func makeTransformer() -> PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 16.0+ · Deprecated in iOS 18.0

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: ComposedTemporalTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer

Reads the encoded transformer and optimizer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: ComposedTemporalTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ComposedTemporalTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encode

TypeScript
encode(transformer: ComposedTemporalTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ComposedTemporalTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encode

TypeScript
encode(transformer: ComposedTemporalTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 17.0+

configuration

TypeScript
get configuration(): FullyConnectedNetworkConfiguration
Swift declaration
var configuration: FullyConnectedNetworkConfiguration

The fully-connected network configuration.

set · iOS 17.0+

configuration

TypeScript
set configuration(value: FullyConnectedNetworkConfiguration)
Swift declaration
var configuration: FullyConnectedNetworkConfiguration

The fully-connected network configuration.

method · iOS 17.0+

makeTransformer

TypeScript
makeTransformer(): FullyConnectedNetworkMultiLabelClassifierModel<number, SDKHandle>
Swift declaration
func makeTransformer() -> FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>

Creates a default-initialized fully-connected network multi-label classifier model suitable for incremental fitting.

method · iOS 17.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: FullyConnectedNetworkMultiLabelClassifierModel<number, SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> FullyConnectedNetworkMultiLabelClassifier<Scalar, Label>.Transformer

Decodes a previously fitted transformer with an optimizer. - Parameter decoder: A decoder for the estimator. - Returns: A fully-connected network multi-label classifier model.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: FullyConnectedNetworkMultiLabelClassifierModel<number, SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: FullyConnectedNetworkMultiLabelClassifier<Scalar, Label>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer with an optimizer. - Parameters: - transformer: A fully-connected network multi-label classifier model. - encoder: An encoder for the estimator.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 17.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: FullyConnectedNetworkMultiLabelClassifierModel<number, SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>

Decodes the estimator. - Parameter decoder: A decoder for the estimator. - Returns: A fully-connected network multi-label classifier model.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

makeTransformer

TypeScript
makeTransformer(): ComposedTransformer<SDKHandle, unknown>
Swift declaration
func makeTransformer() -> PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 16.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: ComposedTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer

Reads the encoded transformer and optimizer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: ComposedTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ComposedTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: ComposedTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 16.0+

annotationColumnID

TypeScript
get annotationColumnID(): _TabularData_ColumnID<number>
Swift declaration
var annotationColumnID: ColumnID<Annotation>

The annotation column identifier.

set · iOS 16.0+

annotationColumnID

TypeScript
set annotationColumnID(value: _TabularData_ColumnID<number>)
Swift declaration
var annotationColumnID: ColumnID<Annotation>

The annotation column identifier.

method · iOS 16.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: unknown; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer

Reads the encoded transformer and optimizer. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: unknown, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer created by this estimator. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: unknown; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer

Returns the pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: unknown, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any EstimatorEncoder) throws

Does nothing since this estimator uses a pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

fitted

TypeScript
fitted(input: _TabularData_DataFrame, validation?: (_TabularData_DataFrame) | null, eventHandler?: (((arg0: Event) => void)) | null): Promise<unknown>
Swift declaration
func fitted(to input: DataFrame, validateOn validation: DataFrame?, eventHandler: EventHandler? = nil) async throws -> UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer

Fits a transformer to a data frame. - Parameters: - input: A data frame containing examples used for fitting the transformer. - validation: A data frame containing examples used for validating the fitted transformer. - eventHandler: An event handler. - Returns: The fitted transformer.

method · iOS 16.0+

update

TypeScript
update(transformer: unknown, input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<{ $ret: null; $out: { "transformer": unknown } }>
Swift declaration
func update(_ transformer: inout UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, with input: DataFrame, eventHandler: EventHandler? = nil) async throws

Updates a transformer with a new data frame containing examples. - Parameters: - transformer: A transformer to update. - input: A sequence of examples. - eventHandler: An event handler.

Omit the output parameters from the call. The result contains $ret and $out, with transformer inside $out.

method · iOS 16.0+

makeTransformer

TypeScript
makeTransformer(): TreeRegressorModel
Swift declaration
func makeTransformer() -> Transformer

Creates a default-initialized transformer suitable for incremental fitting.

get · iOS 16.0+

transformer

TypeScript
get transformer(): TreeRegressorModel
Swift declaration
let transformer: Transformer

A pre-defined transformer.

method · iOS 16.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: TreeRegressorModel; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> Transformer

Returns the pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: TreeRegressorModel, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: Transformer, to encoder: inout any EstimatorEncoder) throws

Does nothing since this estimator uses a pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: TreeRegressorModel; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> Transformer

Returns the pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+

encode

TypeScript
encode(transformer: TreeRegressorModel, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: Transformer, to encoder: inout any EstimatorEncoder) throws

Does nothing since this estimator uses a pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+

fitted

TypeScript
fitted(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<TreeRegressorModel>
Swift declaration
func fitted(to input: DataFrame, eventHandler: EventHandler? = nil) async throws -> Transformer

Returns the pre-defined transformer. - Parameters: - input: A data frame containing examples. - eventHandler: An event handler. - Returns: The pre-defined transformer.

method · iOS 16.0+

update

TypeScript
update(transformer: TreeRegressorModel, input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<{ $ret: null; $out: { "transformer": TreeRegressorModel } }>
Swift declaration
func update(_ transformer: inout Transformer, with input: DataFrame, eventHandler: EventHandler? = nil) async throws

Does nothing since this estimator uses a pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with transformer inside $out.

init · iOS 16.0+

init

TypeScript
static init(transformer: TreeRegressorModel): TabularTransformerToUpdatableEstimatorAdaptor<TreeRegressorModel>
Swift declaration
init(_ transformer: Transformer)

Creates an updatable tabular estimator from a tabular transformer.

method · iOS 16.0+ · Deprecated in iOS 18.0

makeTransformer

TypeScript
makeTransformer(): TransformerToTemporalAdaptor<SDKHandle>
Swift declaration
func makeTransformer() -> UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 16.0+ · Deprecated in iOS 18.0

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: TransformerToTemporalAdaptor<SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer

Reads the encoded transformer and optimizer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: TransformerToTemporalAdaptor<SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

decode

TypeScript
decode(decoder: SDKHandle): { $ret: TransformerToTemporalAdaptor<SDKHandle>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer

Decodes the transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encode

TypeScript
encode(transformer: TransformerToTemporalAdaptor<SDKHandle>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: unknown; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer

Reads the encoded transformer and optimizer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: unknown, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

decode

TypeScript
decode(decoder: SDKHandle): { $ret: unknown; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer

Returns the pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encode

TypeScript
encode(transformer: unknown, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any EstimatorEncoder) throws

Does nothing since this estimator uses a pre-defined transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 17.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

method · iOS 17.0+

applied

TypeScript
applied(input: _CoreML_MLShapedArray<number>, eventHandler?: (((arg0: Event) => void)) | null): ClassificationDistribution<SDKHandle>
Swift declaration
func applied(to input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) throws -> ClassificationDistribution<Label>

Performs a classification on a shaped array. - Parameters: - input: The classifier input. - eventHandler: An event handler. - Returns: A classification distribution.

method · iOS 17.0+

preprocessed

TypeScript
preprocessed(input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<_TabularData_DataFrame>
Swift declaration
func preprocessed(from input: DataFrame, eventHandler: EventHandler? = nil) async throws -> DataFrame

Preprocesses a data frame. - Parameters: - input: A data frame of examples. - eventHandler: An event handler. - Returns: The preprocessed examples.

get · iOS 17.0+

preprocessor

TypeScript
get preprocessor(): TreeRegressorModel
Swift declaration
var preprocessor: Preprocessor

The preprocessing transformer.

set · iOS 17.0+

preprocessor

TypeScript
set preprocessor(value: TreeRegressorModel)
Swift declaration
var preprocessor: Preprocessor

The preprocessing transformer.

method · iOS 17.0+

makeTransformer

TypeScript
makeTransformer(): ComposedTabularTransformer<TreeRegressorModel, unknown>
Swift declaration
func makeTransformer() -> PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 17.0+

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: ComposedTabularTransformer<TreeRegressorModel, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer

Reads the encoded transformer and optimizer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: ComposedTabularTransformer<TreeRegressorModel, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 17.0+

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ComposedTabularTransformer<TreeRegressorModel, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 17.0+

encode

TypeScript
encode(transformer: ComposedTabularTransformer<TreeRegressorModel, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 17.0+

fitted

TypeScript
fittedToPreprocessedValidateOnEventHandler(preprocessedInput: _TabularData_DataFrame, preprocessedValidation?: (_TabularData_DataFrame) | null, eventHandler?: (((arg0: Event) => void)) | null): Promise<ComposedTabularTransformer<TreeRegressorModel, unknown>>
Swift declaration
func fitted(toPreprocessed preprocessedInput: DataFrame, validateOn preprocessedValidation: DataFrame?, eventHandler: EventHandler? = nil) async throws -> PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer

Fits a composed transformer to a data frame of examples. - Parameters: - preprocessedInput: A data frame of preprocessed features used for fitting the transformer. - preprocessedValidation: A data frame of preprocessed features used for validating the fitted transformer. - eventHandler: An event handler. - Returns: The fitted transformer.

method · iOS 17.0+

fitted

TypeScript
fittedToValidateOnEventHandler(input: _TabularData_DataFrame, validation?: (_TabularData_DataFrame) | null, eventHandler?: (((arg0: Event) => void)) | null): Promise<ComposedTabularTransformer<TreeRegressorModel, unknown>>
Swift declaration
func fitted(to input: DataFrame, validateOn validation: DataFrame?, eventHandler: EventHandler? = nil) async throws -> PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer

Fits a composed transformer to a data frame of examples. - Parameters: - input: A data frame containing examples used for fitting the transformer. - validation: A data frame containing examples used for validating the fitted transformer. - eventHandler: An event handler. - Returns: The fitted transformer.

method · iOS 17.0+

update

TypeScript
updateWithPreprocessedEventHandler(transformer: ComposedTabularTransformer<TreeRegressorModel, unknown>, preprocessed: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<{ $ret: null; $out: { "transformer": ComposedTabularTransformer<TreeRegressorModel, unknown> } }>
Swift declaration
func update(_ transformer: inout PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer, withPreprocessed preprocessed: DataFrame, eventHandler: EventHandler? = nil) async throws

Updates a transformer with a new data frame of preprocessed features. - Parameters: - transformer: A transformer to update. - preprocessed: A data frame of preprocessed features. - eventHandler: An event handler.

Omit the output parameters from the call. The result contains $ret and $out, with transformer inside $out.

method · iOS 17.0+

update

TypeScript
updateWithEventHandler(transformer: ComposedTabularTransformer<TreeRegressorModel, unknown>, input: _TabularData_DataFrame, eventHandler?: (((arg0: Event) => void)) | null): Promise<{ $ret: null; $out: { "transformer": ComposedTabularTransformer<TreeRegressorModel, unknown> } }>
Swift declaration
func update(_ transformer: inout PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer, with input: DataFrame, eventHandler: EventHandler? = nil) async throws

Updates a transformer with a new data frame of examples. - Parameters: - transformer: A transformer to update. - input: A data frame of examples. - eventHandler: An event handler.

Omit the output parameters from the call. The result contains $ret and $out, with transformer inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

makeTransformer

TypeScript
makeTransformer(): ComposedTemporalTransformer<SDKHandle, unknown>
Swift declaration
func makeTransformer() -> PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer

Creates a default-initialized transformer suitable for incremental fitting.

method · iOS 16.0+ · Deprecated in iOS 18.0

decodeWithOptimizer

TypeScript
decodeWithOptimizer(decoder: SDKHandle): { $ret: ComposedTemporalTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer

Reads the encoded transformer and optimizer with a decoder. - Parameter decoder: A decoder. - Returns: The decoded transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encodeWithOptimizer

TypeScript
encodeWithOptimizer(transformer: ComposedTemporalTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encodeWithOptimizer(_ transformer: PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes the transformer and optimizer to an encoder. - Parameters: - transformer: A transformer this estimator creates. - encoder: An encoder.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

decode

TypeScript
decode(decoder: SDKHandle): { $ret: ComposedTemporalTransformer<SDKHandle, unknown>; $out: { "decoder": SDKHandle } }
Swift declaration
func decode(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer

Decodes a previously fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with decoder inside $out.

method · iOS 16.0+ · Deprecated in iOS 18.0

encode

TypeScript
encode(transformer: ComposedTemporalTransformer<SDKHandle, unknown>, encoder: SDKHandle): { $ret: null; $out: { "encoder": SDKHandle } }
Swift declaration
func encode(_ transformer: PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any EstimatorEncoder) throws

Encodes a fitted transformer.

Omit the output parameters from the call. The result contains $ret and $out, with encoder inside $out.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

get · iOS 16.0+

shape

TypeScript
get shape(): Array<number>
Swift declaration
var shape: [Int]

The target shape.

set · iOS 16.0+

shape

TypeScript
set shape(value: Array<number>)
Swift declaration
var shape: [Int]

The target shape.

method · iOS 16.0+

applied

TypeScript
applied(input: _CoreML_MLShapedArray<SDKHandle>, eventHandler?: (((arg0: Event) => void)) | null): _CoreML_MLShapedArray<SDKHandle>
Swift declaration
func applied(to input: MLShapedArray<Scalar>, eventHandler: EventHandler? = nil) throws -> MLShapedArray<Scalar>

Reshapes the input. - Parameters: - input: A shaped array. - eventHandler: An event handler. - Returns: A shaped array with the target shape.

Skipped declarations

502 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

Transformer.adaptedAsRandomTransformer()

This protocol needs associated types that cannot yet cross the bridge.

ApplyEachRandomly.init(probability:_:)

callback cannot propagate synchronous failure

ApplyEachRandomly.applied(to:generator:eventHandler:)

This parameter hides a concrete Swift type.

UpdatableEstimator.appending(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Other)

UpdatableEstimator.appending(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Other)

UpdatableTemporalEstimator.appending(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Other)

UpdatableTemporalEstimator.appending(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Other)

UpdatableTemporalEstimator.appending(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Other)

UpdatableTemporalEstimator.appending(_:)

The iOS SDK compiler rejected this binding: 'some' types are only permitted in properties, subscripts, and functions

AudioFeaturePrint.applied(to:eventHandler:)

This declaration needs Swift generic type arguments. (no canonical witness for S)

TemporalEstimator.write(_:to:overwrite:)

The iOS SDK compiler rejected this binding: cannot access associated type 'Transformer' from 'TemporalEstimator'; use a concrete type or generic parameter base instead

SupervisedTemporalEstimator.write(_:to:overwrite:)

The iOS SDK compiler rejected this binding: cannot access associated type 'Transformer' from 'SupervisedTemporalEstimator'; use a concrete type or generic parameter base instead

UpdatableSupervisedTemporalEstimator.writeWithOptimizer(_:to:overwrite:)

The iOS SDK compiler rejected this binding: cannot access associated type 'Transformer' from 'UpdatableSupervisedTemporalEstimator'; use a concrete type or generic parameter base instead

ComposedTemporalTransformer.inner

This declaration needs Swift generic type arguments. (no canonical witness for Inner)

ComposedTemporalTransformer.outer

This declaration needs Swift generic type arguments. (no canonical witness for Outer)

ComposedTemporalTransformer.init(_:_:)

This declaration needs Swift generic type arguments. (no canonical witness for Inner)

ComposedTemporalTransformer.applied(to:eventHandler:)

This declaration needs Swift generic type arguments. (no canonical witness for S)

Transformer.appending(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Other)

Transformer.appending(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Other)

TemporalTransformer.appending(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Other)

TemporalTransformer.appending(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Other)

TemporalTransformer.appending(_:)

This protocol needs associated types that cannot yet cross the bridge.

DetectedObject.label

This declaration needs Swift generic type arguments. (no canonical witness for Label)

DetectedObject.init(boundingBox:label:probability:)

This declaration needs Swift generic type arguments. (no canonical witness for Label)

EstimatorToSupervisedAdaptor.estimator

This declaration needs Swift generic type arguments. (no canonical witness for Estimator)

EstimatorToSupervisedAdaptor.init(_:)

This declaration needs Swift generic type arguments. (no canonical witness for Estimator)

EstimatorToSupervisedAdaptor.fitted(to:eventHandler:)

This declaration needs Swift generic type arguments. (no canonical witness for Estimator.Transformer.Input)

EstimatorToSupervisedAdaptor.fitted(to:validateOn:eventHandler:)

This declaration needs Swift generic type arguments. (no canonical witness for Estimator.Transformer.Input)

Estimator.adaptedAsSupervised(annotationType:)

This protocol needs associated types that cannot yet cross the bridge.

UpdatableEstimatorToSupervisedAdaptor.estimator

This declaration needs Swift generic type arguments. (no canonical witness for Estimator)