>  Docs Center  >  IDL Reference  >  Machine Learning  >  IDLmllfCrossEntropy

IDLmllfCrossEntropy

IDLmllfCrossEntropy

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 IDLmllfCrossEntropy (Cross Entropy) loss function is best used with classification; it does not perform well with regression. It 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 = IDLmllfCrossEntropy()
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=IDLmllfCrossEntropy()

Syntax


Kernel = IDLmllfCrossEntropy()

Arguments


None

Keywords


None

Version History


8.7.1

Introduced

See Also


IDLmllfHuber, IDLmllfLogCosh, IDLmllfMeanAbsoluteError, IDLmllfMeanSquaredError



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us