PredictorMeasurements

PredictorMeasurements[predictor,testset,prop]
gives measurements associated with property prop when predictor is evaluated on testset.

PredictorMeasurements[predictor,testset]
yields a PredictorMeasurements[] object that can applied to any property.

Details and OptionsDetails and Options

  • The predictor is typically a PredictorFunction object as generated by Predict.
  • The following properties can be measured:
  • "ComparisonPlot"plot of predicted values versus test values
    "LogLikelihood"log-likelihood of the model given the test data
    "LogLikelihoodRate"average log-likelihood per test example
    "MeanDeviation"mean absolute value of the residuals
    "MeanSquare"mean square of the residuals
    "Properties"list of measurement properties available
    "RejectionRate"fraction of examples predicted as Indeterminate
    "Residuals"list of differences between predicted and test values
    "ResidualPlot"plot of the residuals
    "ResidualHistogram"histogram of residuals
    "StandardDeviation"root mean square of the residuals
  • PredictorMeasurements[,opts] specifies that the predictor should use the options opts when applied to the test set.
  • The following options can be given:
  • IndeterminateThresholdAutomaticbelow what probability density to return Indeterminate
    UtilityFunctionAutomaticutility expressed as a function of actual and predicted value
  • PredictorMeasurements[][prop] can be used to look up prop in a PredictorMeasurements[] object. When repeated property lookups are required, this is typically more efficient.
  • PredictorMeasurements[][prop,opts] specifies that the predictor should use the options opts when applied to the test set. It will supersede options given to PredictorMeasurements.
  • Test examples classified as Indeterminate will be discarded when measuring properties , , , , , and .

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Define a training set and a test set:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input

Create a predictor with the training set:

In[3]:=
Click for copyable input
Out[3]=

Visualize the residual values:

In[4]:=
Click for copyable input
Out[4]=

Compute the root mean square of the residuals:

In[5]:=
Click for copyable input
Out[5]=

Generate a PredictorMeasurements[] object of the predictor with the test set:

In[6]:=
Click for copyable input
Out[6]=

Perform the previous measurements using the PredictorMeasurements[] object:

In[7]:=
Click for copyable input
Out[7]=
Introduced in 2014
(10.0)