ValidationSet

ValidationSet

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

Details

  • 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.

Examples

open allclose all

Basic Examples  (2)

Train a classifier:

Obtain the L2 regularization coefficient of the classifier:

Specify the validation set explicitly:

A different L2 regularization coefficient has been selected:

Train a predictor with a specified validation set:

Obtain the L2 regularization coefficient of the trained predictor:

Train a predictor without a specified validation set:

A different L2 regularization coefficient has been selected:

Applications  (1)

Load handwritten digits from the MNIST dataset:

Construct a set of digits from your own writing:

Train a classifier that uses the MNIST digits for training and your own digits for validating models and hyperparameters:

Wolfram Research (2014), ValidationSet, Wolfram Language function, https://reference.wolfram.com/language/ref/ValidationSet.html.

Text

Wolfram Research (2014), ValidationSet, Wolfram Language function, https://reference.wolfram.com/language/ref/ValidationSet.html.

CMS

Wolfram Language. 2014. "ValidationSet." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ValidationSet.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_validationset, author="Wolfram Research", title="{ValidationSet}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/ValidationSet.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_validationset, organization={Wolfram Research}, title={ValidationSet}, year={2014}, url={https://reference.wolfram.com/language/ref/ValidationSet.html}, note=[Accessed: 21-November-2024 ]}