Initializer

init(trainingData:textColumn:labelColumn:parameters:)

Creates a classifier from a training set in a data table.

Declaration

init(trainingData: MLDataTable, textColumn: String, labelColumn: String, parameters: MLTextClassifier.ModelParameters = MLTextClassifier.defaultParameters) throws

Discussion

Creating a Text Classifier Model has an example of using this initializer.

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.

struct MLTextClassifier.ModelParameters

Parameters that affect the process of training a model.

let modelParameters: MLTextClassifier.ModelParameters

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