Structure

MLTextClassifier.ModelParameters

Parameters that affect the process of training a model.

Declaration

struct MLTextClassifier.ModelParameters

Topics

Creating Parameters

init(validationData: [String : [String]], algorithm: MLTextClassifier.ModelAlgorithmType, language: NLLanguage?)

Creates parameters for a text classifier with validation data stored in a dictionary.

Deprecated
init(validationData: MLTextClassifier.DataSource, algorithm: MLTextClassifier.ModelAlgorithmType, language: NLLanguage?)

Creates parameters for a text classifier with validation data stored in a set of labeled directories.

Deprecated
struct NLLanguage

The languages supported by the Natural Language framework.

enum MLTextClassifier.ModelAlgorithmType

The type of algorithm used by a text classifier.

Accessing Parameters

var algorithm: MLTextClassifier.ModelAlgorithmType

The parameter’s algorithm setting.

var language: NLLanguage?

The parameter’s language setting.

var validationData: MLDataTable?

The parameter’s validation data set.

Deprecated
var textColumnValidationData: String?

The name of the text column in the validation data table.

Deprecated
var labelColumnValidationData: String?

The name of the label column in the validation data table.

Deprecated

Describing Parameters

var description: String

A text representation of the model parameters.

var debugDescription: String

A text representation of the model parameters that’s suitable for output during debugging.

var playgroundDescription: Any

A description of the model parameters shown in a playground.

See Also

Creating and Training a Text Classifier

init(trainingData: [String : [String]], parameters: MLTextClassifier.ModelParameters)

Creates a classifier from a training set in a dictionary.

init(trainingData: MLTextClassifier.DataSource, parameters: MLTextClassifier.ModelParameters)

Creates a classifier from a training set stored in a set of directories.

enum MLTextClassifier.DataSource

A data source for a text classifier.

let modelParameters: MLTextClassifier.ModelParameters

The configuration parameters that the text classifier used for training during initialization.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software