Enumeration

MLTextClassifier.ModelAlgorithmType

The type of algorithm used by a text classifier.

Declaration

enum MLTextClassifier.ModelAlgorithmType

Overview

Typically, maxEnt is the fastest training algorithm. If the text classifier’s performance isn’t good enough, consider training again with the transferLearning algorithm.

Topics

Selecting an Algorithm Type

case crf(revision: Int?)

A conditional random field model.

case maxEnt(revision: Int?)

A maximum entropy model.

enum MLTextClassifier.FeatureExtractorType

The feature extractors that are available to train a text classifier using transfer learning.

Describing an Algorithm Type

var description: String

A text representation of the algorithm type.

var debugDescription: String

A text representation of the algorithm type that’s suitable for output during debugging.

var playgroundDescription: Any

A description of the algorithm type shown in a playground.

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.