- Activation
- Derivative
- Loss
- LossGradient
- RegressionMetric
- ConfusionMatrix
- ConfusionMatrixMultilabel
- ClassificationMetric
- ClassificationScore
- PrecisionRecall
- ReceiverOperatingCharacteristic
Loss
Compute the value of the loss function.
double vector::Loss(
|
Parameters
vect_true/matrix_true
[in] Vector or matrix of true values.
loss
[in] Loss function from the ENUM_LOSS_FUNCTION enumeration.
axis
[in] ENUM_MATRIX_AXIS enumeration value (AXIS_HORZ — horizontal axis, AXIS_VERT — vertical axis).
...
[in] Additional parameter 'delta' can only be used by the Hubert loss function (LOSS_HUBER)
Return Value
double value.
How the 'delta' parameter is used in the Hubert loss function (LOSS_HUBER)
double delta = 1.0;
|
Note
A neural network aims at finding the algorithms that minimize the error on the training sample, for which the loss function is used.
The value of the loss function indicates by how much the value predicted by the model deviates from the real one.
Different loss functions are used depending on the problem. For example, Mean Squared Error (MSE) is used for regression problems, and Binary Cross-Entropy (BCE) is used for binary classification purposes.
Example of calling the Hubert loss function:
vector y_true = {0.0, 1.0, 0.0, 0.0};
|