Skip to main content

hinge_loss

Function hinge_loss 

Source
pub fn hinge_loss(
    graph: &mut Graph,
    prediction: NodeId,
    target: NodeId,
    margin: f32,
) -> Result<NodeId, ModelError>
Expand description

Mean hinge loss: mean(max(0, margin - prediction * target)).