Initializer

init(validationData:algorithm:language:textColumnValidationData:labelColumnValidationData:)

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

Declaration

init(validationData: MLDataTable? = nil, algorithm: MLTextClassifier.ModelAlgorithmType = .maxEnt(revision: 1), language: NLLanguage? = nil, textColumnValidationData: String? = nil, labelColumnValidationData: String? = nil)

Parameters

validationData

A data table the text classifier uses for validation data during training.

algorithm

An algorithm type for the classifier.

language

The language of the text to classify.

textColumnValidationData

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

labelColumnValidationData

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

See Also

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.