({{, (RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject])[…] 
represents an object generated by (RefLink[ClassifierMeasurements, paclet:ref/ClassifierMeasurements]) that can be applied to properties.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject])[…][prop] is used to look up property prop from the (RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject]).

(RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject])[…][{(Subscript[prop, 1]),(Subscript[prop, 2]),…}] is used to look up many properties.

(RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject])[…][…,opts] specifies that the classifier should use the options opts when applied to the test set. It supersedes options given to (RefLink[ClassifierMeasurements, paclet:ref/ClassifierMeasurements]).

Possible options are as given in (RefLink[ClassifierFunction, paclet:ref/ClassifierFunction])[…], with the following addition:

When ComputeUncertainty->(RefLink[True, paclet:ref/True]), numerical measures will be returned as (RefLink[Around, paclet:ref/Around])[result,err], where err represents the standard error (corresponding to a 68% confidence interval) associated with measure result.

Properties returning a single numeric value related to classification abilities on the test set include:

Examples classified as (RefLink[Indeterminate, paclet:ref/Indeterminate]) are discarded when measuring properties related to classification abilities on the test set, such as "Accuracy", "Error", or "MeanCrossEntropy".

Confusion matrix–related properties include:

Timing-related properties include:

Properties returning one value for each test-set example include:

Properties returning graphics include:

Properties returning examples from the test set include:

Examples are in the form (Subscript[input, i])->(Subscript[class, i]), where (Subscript[class, i]) is the actual class from the test set.

Properties such as "WorstClassifiedExamples" or "MostCertainExamples" output up to 10 examples. (RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject])[…][prop->n] can be used to output n examples.

Properties returning one measure for each class include:

(RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject])[…][prop->class] can be used to only return the measure associated with the specified class.

(RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject])[…][prop-><|(Subscript[class, 1])->(Subscript[w, 1]),(Subscript[class, 2])->(Subscript[w, 2]),…|>] can be used to return a weighted average of each class measure.

(RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject])[…][prop->f] can be used to apply function f to the returned class measures (e.g. (RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject])[…][prop->Mean]).

Properties such as "Precision" or "Recall" give one measure for each possible "positive class". The "negative class" is the union of all the classes that are not the positive class. For such properties, one can average the measures for all possible positive classes using (RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject])[…][prop->average], where average can be:

Other properties include:

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Define a training set and a test set:

trainingset={1->"A",2->"A",3.5->"B",4->"A", 5-> "B", 6-> "B"};

testset={2.2->"A",2.7->"A",4.5->"B",1.4->"B"};

Create a classifier on the training set:

c=Classify[trainingset]

Generate a (RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject]) of the classifier with the test set:

cm = ClassifierMeasurements[c,testset]

Measure accuracy and F-score and plot the confusion matrix from the (RefLink[ClassifierMeasurementsObject, paclet:ref/ClassifierMeasurementsObject]):

cm /@ {"Accuracy", "FScore", "ConfusionMatrixPlot"} // TableForm

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ClassifierMeasurements, paclet:ref/ClassifierMeasurements])  ▪  (RefLink[ClassifierFunction, paclet:ref/ClassifierFunction])  ▪  (RefLink[Classify, paclet:ref/Classify])  ▪  (RefLink[Information, paclet:ref/Information])  ▪  (RefLink[PredictorMeasurementsObject, paclet:ref/PredictorMeasurementsObject])}})}})