function PEGASOS ( 𝛼 , 𝜆 , 𝑥 , 𝑦 , 𝑡 , 𝑤 )
𝑙 = m a x ( 0 , 1 𝛼 , 𝑥 𝑦 )
𝜎 = 𝐼 ( 𝑙 > 0 )
𝜂 = 1 / 𝜆 𝑡
𝛼 = ( 1 𝜂 𝜆 ) 𝛼 + 𝑤 𝜎 𝜂 𝑦 𝑥
𝛼 = m i n ( 1 , 1 / ( 𝑤 2 𝜆 ) ) 𝛼
end function
Algorithm 1: The Pegasos algorithm with weighted samples.