Instance Method

evaluation(on:textColumn:labelColumn:)

Evaluates the classifier with a test data table.

Declaration

func evaluation(on labeledTexts: MLDataTable, textColumn: String, labelColumn: String) -> MLClassifierMetrics

Parameters

labeledTexts

The text and labels that you use to test the text classifier, contained in an MLDataTable.

textColumn

The name of the column containing text samples for the model to classify.

labelColumn

The name of the column containing the labels for the text samples.

Return Value

The metrics for the accuracy of the classifier on the passed in data set.

See Also

Evaluating a Text Classifier

func evaluation(on: MLTextClassifier.DataSource) -> MLClassifierMetrics

Evaluates the classifier with a test data source.

func evaluation(on: [String : [String]]) -> MLClassifierMetrics

Evaluates the classifier with a test dictionary.