Updated loss function docs

This commit is contained in:
Adarsh Kumar 2020-03-01 12:00:11 +05:30 committed by GitHub
parent 57c1b67d08
commit 08dabce57e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -29,7 +29,7 @@ msle(ŷ, y;ϵ1=eps.(ŷ),ϵ2=eps.(eltype(ŷ).(y))) = sum((log.(ŷ+ϵ1).-log.(
huber_loss(, y,delta=1.0) huber_loss(, y,delta=1.0)
Computes the mean of the Huber loss. By default, delta is set to 1.0. Computes the mean of the Huber loss. By default, delta is set to 1.0.
| 0.5*|(-y)|, for |-y|<delta | 0.5*|(-y)|, for |-y|<=delta
Hubber loss = | Hubber loss = |
| delta*(|-y| - 0.5*delta), otherwise | delta*(|-y| - 0.5*delta), otherwise
@ -169,7 +169,7 @@ poisson(ŷ, y) = sum(ŷ .- y .* log.(ŷ)) *1 // size(y,2)
Measures the loss given the prediction `` and true labels `y` (containing 1 or -1). Measures the loss given the prediction `` and true labels `y` (containing 1 or -1).
[Hinge Loss](https://en.wikipedia.org/wiki/Hinge_loss) [Hinge Loss](https://en.wikipedia.org/wiki/Hinge_loss)
See also [`squared_hinge`](@ref) See also [`squared_hinge`](@ref).
""" """
hinge(, y) = sum(max.(0, 1 .- .* y)) *1 // size(y,2) hinge(, y) = sum(max.(0, 1 .- .* y)) *1 // size(y,2)
@ -178,7 +178,7 @@ hinge(ŷ, y) = sum(max.(0, 1 .- ŷ .* y)) *1 // size(y,2)
Computes squared hinge loss given the prediction `` and true labels `y` (conatining 1 or -1) Computes squared hinge loss given the prediction `` and true labels `y` (conatining 1 or -1)
See also [`hinge`](@ref) See also [`hinge`](@ref).
""" """
squared_hinge(, y) = sum((max.(0,1 .- .* y)).^2) *1//size(y,2) squared_hinge(, y) = sum((max.(0,1 .- .* y)).^2) *1//size(y,2)
@ -186,8 +186,8 @@ squared_hinge(ŷ, y) = sum((max.(0,1 .-ŷ .* y)).^2) *1//size(y,2)
dice_coeff_loss(y_pred,y_true,smooth = 1) dice_coeff_loss(y_pred,y_true,smooth = 1)
Loss function used in Image Segmentation. Calculates loss based on dice coefficient. Similar to F1_score Loss function used in Image Segmentation. Calculates loss based on dice coefficient. Similar to F1_score
Dice_Coefficient(A,B) = 2*sum(|A*B|+smooth)/(sum(A^2)+sum(B^2)+ smooth) Dice_Coefficient(A,B) = 2 * sum( |A*B| + smooth) / (sum( A^2 ) + sum( B^2 )+ smooth)
Dice_loss = 1-Dice_Coefficient Dice_loss = 1 - Dice_Coefficient
Ref: [V-Net: Fully Convolutional Neural Networks forVolumetric Medical Image Segmentation](https://arxiv.org/pdf/1606.04797v1.pdf) Ref: [V-Net: Fully Convolutional Neural Networks forVolumetric Medical Image Segmentation](https://arxiv.org/pdf/1606.04797v1.pdf)
""" """