Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

Loss functions

Matias Vazquez-Levi edited this page Jan 26, 2021 · 16 revisions

loss functions written below are provided as default by dannjs, see how to add more

These functions are represented below with yhat being the dannjs model predictions and y being the target values. The value n represents the length of the target & input list.


bce

Binary Cross Entropy Loss. This function is common in machine learning especially for classification tasks.

Definition:



mse

Mean Squared Error, this is one of the most commonly used loss functions in deep learning. This function determines a loss value by averaging the square of the difference between the predicted and desired output. It is also the default value for a Dannjs model.

Definition:



mce

Mean Cubed Error, this is an experimental function. The aim is to let the loss value have more gradient with near 0 values, cubing a number can output a negative value this explains the |x|.

Definition:



rmse

Root Mean Squared Error, this function is the root of an mse output.

Definition:



mae

Mean Absolute Error, this function determines the loss value by averaging the absolute difference between predicted and desired output.

Definition:



mbe

Mean Bias Error, this function determines a loss value by averaging the raw difference between the predicted and desired output. The output of this function can be negative, which makes this function less preferable than others.

Definition:



lcl

Log Cosh Loss, this function determines a loss value by averaging the of the difference between the predicted and desired output.

Definition:



Clone this wiki locally