In machine learning, a loss function is a mathematical function that must be minimized in order to achieve convergence. Choosing the proper loss function is an important step in designing your neural network. The IDLmllfMeanSquaredError (Mean Square Error) loss function is implemented with the following formula:

where x is the calculated output of the model and y is the predicted output or truth.

Example


Compile_opt idl2
LossFunction = IDLmllfMeanSquaredError()
Print, LossFunction(Findgen(10)/9.0, Fltarr(10))
 

Typically, you will pass an object of this class to a neural network model definition:

Classifier = IDLmlFeedForwardNeuralNetwork([3, 7, 1],
LOSS_FUNCTION=IDLmllfMeanSquaredError()

Syntax


Kernel = IDLmllfMeanSquaredError()

Arguments


None

Keywords


None

Version History


8.7.1

Introduced

See Also


IDLmllfCrossEntropy, IDLmllfHuber, IDLmllfLogCosh, IDLmllfMeanAbsoluteError