Updated squared_hinge
This commit is contained in:
parent
7ac647a7ac
commit
643086c8db
|
@ -223,5 +223,5 @@ hinge(ŷ, y) = sum(max.(0, 1 .- ŷ .* y)) *1 // size(y,2)
|
|||
|
||||
L2 loss function. Computes squared hinge loss over the prediction ŷ and true labels y(conatining 1 or -1)
|
||||
"""
|
||||
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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue