Information about a model, primarily the expected input and output format for each feature, and optional metadata.


class MLModelDescription : NSObject


Accessing Feature Descriptions

var inputDescriptionsByName: [String : MLFeatureDescription]

Descriptions of this model's various input features, keyed by each feature's name.

var outputDescriptionsByName: [String : MLFeatureDescription]

Descriptions of this model's various output features, keyed by each feature's name.

class MLFeatureDescription

The name, type, and constraints of an input or output feature.

Accessing Metadata

var metadata: [MLModelMetadataKey : Any]

Metadata object that has information related to the model, as defined by the keys in the MLModelMetadataKey.

struct MLModelMetadataKey

Keys for the metadata dictionary used by the model.

Accessing Prediction Names

var predictedFeatureName: String?

The name of the value that is being predicted.

var predictedProbabilitiesName: String?

The name of the probabilities for the prediction.

Accessing Update Descriptions

var isUpdatable: Bool

A Boolean value that indicates whether you can update the model with additional training.

var trainingInputDescriptionsByName: [String : MLFeatureDescription]

Provides access to each training input as a feature description, given the name of the input.

class MLParameterKey

A key for model and update parameter dictionaries.

class MLParameterDescription

The description of a model parameter that includes a default value and a constraint, if applicable.


Inherits From

See Also

Inspecting a Model

var configuration: MLModelConfiguration

The configuration of the model set during initialization.

var modelDescription: MLModelDescription

Information about this model, intended for use during development, which is also displayed in the Xcode view of the model.