WOLFRAM

ActivePrediction[f,{conf1,conf2, }]

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

ActivePrediction[f,reg]

generates configurations within the region specified by reg.

ActivePrediction[f,sampler]

generates configurations by applying the function sampler.

ActivePrediction[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)Summary of the most common use cases

Train an ActivePredictionObject[] to find the predictor for a function, given a set of configurations:

Out[1]=1

Extract the resulting predictor:

Out[2]=2

Predict new examples:

Out[3]=3

Train a prediction object to find the predictor for a function whose domain is defined by an interval:

Out[1]=1

Extract the predictor:

Out[2]=2

Predict new examples:

Out[3]=3

Train a prediction object to find the predictor for the Det function, with the domain defined by a configuration generator:

Out[1]=1

Extract the predictor:

Out[2]=2

Predict new examples:

Out[3]=3

Scope  (3)Survey of the scope of standard use cases

Train a prediction object to find a predictor for the sine function in an interval:

Out[1]=1

Obtain the list of available object properties:

Out[2]=2

Obtain the history of explored configurations:

Out[3]=3

Obtain the predictors trained during active prediction, along with some of their properties:

Out[4]=4

Obtain the final predictor:

Out[5]=5

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

Out[6]=6

Obtain some other properties:

Out[7]=7

Display the performances of the predictors trained during active prediction:

Out[8]=8

Visualize the predictions of the predictor on new examples:

Out[9]=9

Train a prediction object to find the predictor for a function that computes the color distance between a given color and the red color, with the domain defined by a random color generator:

Out[1]=1

Obtain the predictor:

Out[2]=2

Display the performances of the predictors trained during active prediction:

Out[3]=3

Display the comparison plot of the predictor for a test set:

Out[4]=4

Define a nontrivial function, with the domain defined by a neighborhood configuration generator:

Train a prediction object to find a predictor for the function, starting with some initial configurations:

Out[2]=2

Obtain the predictor:

Out[3]=3

Visualize the predictions of the predictor. It provides a good model of the function in the neighborhood of the initial configurations:

Out[4]=4

Options  (3)Common values & functionality for each option

InitialEvaluationHistory  (1)

Define a quadratic function whose domain is defined by a set of numbers:

Construct an initial "training set":

Out[2]=2

Train a prediction object to find a predictor for the function using the preceding information:

Out[3]=3

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

Out[4]=4

MaxIterations  (1)

Define a nontrivial two-dimensional function:

Train a prediction object to find a predictor for the function within a unit disk:

Out[2]=2

Obtain the number of function evaluations:

Out[3]=3

Specify the maximum number of iterations:

Out[4]=4

Check the number of function evaluations now:

Out[5]=5

Method  (1)

Define a nontrivial stochastic function:

Train a prediction object by specifying the method as an association, choosing the evaluation strategy and the prediction method:

Out[2]=2

Obtain the predictor:

Out[3]=3

Specify a different method for active prediction:

Out[4]=4

Obtain the predictor again:

Out[5]=5

Visualize the predictions of the two predictors. "GaussianProcess" produces a smoother predictor relative to "NearestNeighbors":

Out[6]=6

Applications  (2)Sample problems that can be solved with this function

Efficiently train a model to predict the elevation at a specific location:

Sample 1000 random locations to test the quality of the model:

Compare the predicted elevation versus the actual elevation obtained via a server call:

Out[310]=310
Out[12]=12

LogLikelihood Function Predictor  (1)

Load Fisher's Iris dataset and divide it into a training set and a test set:

Construct a LogLikelihood function that trains a classifier on the training sample and then gives the "LogLikelihoodRate" on the test sample for a given choice of the hyperparameters:

Train a prediction object to find a predictor for the LogLikelihood function over a rectangular domain:

Out[3]=3

Obtain the predictor:

Out[4]=4

Obtain the coordinates of the explored configurations and their values:

Visualize the prediction of the predictor together with the explored configurations:

Out[6]=6
Wolfram Research (2017), ActivePrediction, Wolfram Language function, https://reference.wolfram.com/language/ref/ActivePrediction.html (updated 2017).

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2025_activeprediction, author="Wolfram Research", title="{ActivePrediction}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/ActivePrediction.html}", note=[Accessed: 07-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_activeprediction, organization={Wolfram Research}, title={ActivePrediction}, year={2017}, url={https://reference.wolfram.com/language/ref/ActivePrediction.html}, note=[Accessed: 07-April-2025 ]}