BUILT-IN WOLFRAM LANGUAGE SYMBOL

ValidationSet

ValidationSet
is an option for Predict, Classify, and related functions that specifies the validation set to be used during the training phase.

DetailsDetails

  • With ValidationSetdata, model and hyperparameter selections are done by testing performance on data. data can be given in any format allowed for the training set.
  • With ValidationSetAutomatic, cross-validation methods on the original data supplied to Predict, Classify, etc. will be used instead.
  • ValidationSetdata is typically used when the data in the training set and the data that one wishes to predict or classify come from different sources.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Train a classifier:

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

The automatically selected validation set yielded a 1-neighbor classifier:

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

Specify the validation set explicitly:

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

The explicit validation set yields a 2-neighbor classifier:

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

Train a predictor with a specified validation set:

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

Obtain the L2 regularization coefficient of the trained classifier:

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

Train a predictor without a specified validation set:

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

A different L2 regularization coefficient has been selected:

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