ActiveClassification

ActiveClassification[f,{conf1,conf2,}]

gives an object representing the result of active classification obtained by using the function f to determine classes for the example configurations confi.

ActiveClassification[f,reg]

generates configurations within the region specified by reg.

ActiveClassification[f,sampler]

generates configurations by applying the function sampler.

ActiveClassification[f,{conf1,conf2,}nsampler]

applies the function nsampler to successively generate configurations starting from one of the confi.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Train an ActiveClassificationObject[] to classify whether an integer is greater than 50:

Extract the resulting classifier:

Classify new examples:

Train a classification object with the domain defined by an interval:

Extract the classifier:

Classify new examples:

Train a classification object to classify whether a matrix is positive semidefinite, with the domain defined by a configuration generator:

Extract the classifier:

Classify new examples:

Scope  (2)

Define a piecewise function with three possible output values:

Train a classification object to classify the possible outputs from the function, with the domain defined by a configuration generator:

Obtain the list of object properties:

Obtain the history of explored configurations:

Obtain the classifiers trained during the active classification, along with their properties:

Obtain the final classifier:

Obtain the method used to choose configurations to add to the training set:

Obtain some other properties:

Display the performances of the classifiers trained during active classification:

Display the confusion matrix of the final classifier for a test set:

Define a function that checks whether a point belongs to a given region, then define a neighborhood configuration generator:

Train a classification object to classify whether a point is a member of a given region:

Display the confusion matrix of the classifier on a test set:

Options  (3)

InitialEvaluationHistory  (1)

Define a function that checks whether the ASCII character corresponding to an integer is a letter, then define a set of configurations:

Construct an initial training set:

Train a classification object to classify whether an integer corresponds to a letter by including the preceding information:

The examples in the first row in the training history now correspond to the initial training set:

MaxIterations  (1)

Train a classification object to classify whether a number in a given interval is positive:

Obtain the number of function evaluations:

Specify the maximum number of iterations:

Check the number of function evaluations now:

Method  (1)

Define a region composed of a number of subregions, and a function that tells whether the blood pressure corresponding to a point in the region is "Low", "Ideal" or "High":

Train a classification object by specifying the method:

The configurations are explored randomly, with the data generating distribution:

Specify a different method for active classification:

The algorithm now prefers to explore configurations near the boundaries where the model is more uncertain:

Specify the method as an association, choosing the evaluation strategy and the classification method:

Applications  (3)

Grade Classifier  (1)

Define a "grade function" that gives a letter grade corresponding to a real score between 0 and 10:

Train a classification object to classify letter grades, with the domain specified by a configuration generator:

Obtain the classifier:

Display the confusion matrix of the classifier on a test set:

Region Member Classifier  (1)

Construct a geometric region corresponding to the map of the USA:

Define a function that tells whether a point lies inside this region:

Train a classification object for this function:

Obtain the corresponding classifier:

Plot the configurations explored during training. The density is higher close to the region boundary:

Visualize the classification region:

Program Choice Classifier  (1)

Define two programs to compute the ManhattanDistance between two elements:

Define a function that selects the program that more quickly computes the ManhattanDistance between two elements constructed from the three integers:

Set the domain of the function via a configuration generator:

Train a classification object to classify which program is faster:

Obtain the classifier:

Display the accuracy and confusion matrix of the classifier on a test set:

Possible Issues  (1)

Specifying the domain of the function via a neighborhood configuration generator requires care.

Define a function that checks whether a point belongs to the unit rectangle, then define a neighborhood configuration generator:

Active classification may not work properly if the initial configuration and neighborhood configuration generator are not chosen properly:

Wolfram Research (2017), ActiveClassification, Wolfram Language function, https://reference.wolfram.com/language/ref/ActiveClassification.html (updated 2017).

Text

Wolfram Research (2017), ActiveClassification, Wolfram Language function, https://reference.wolfram.com/language/ref/ActiveClassification.html (updated 2017).

CMS

Wolfram Language. 2017. "ActiveClassification." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/ActiveClassification.html.

APA

Wolfram Language. (2017). ActiveClassification. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ActiveClassification.html

BibTeX

@misc{reference.wolfram_2024_activeclassification, author="Wolfram Research", title="{ActiveClassification}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/ActiveClassification.html}", note=[Accessed: 03-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_activeclassification, organization={Wolfram Research}, title={ActiveClassification}, year={2017}, url={https://reference.wolfram.com/language/ref/ActiveClassification.html}, note=[Accessed: 03-December-2024 ]}