Algorithm 1 Training Barista
Input: labeled proteins (ri, yi)
repeat
    Pick a random protein (ri, yi)
    Compute F (ri) given by Equation 1.
    if 1 − yF (ri) > 0 then
        Make a gradient step to optimize L(F (ri),yi)
    end if
until convergence.