The special case of linear support-vector machines can be solved more efficiently by the same kind of algorithms to optimize its close cousin , logistic regression ; this class of algorithms includes Stochastic gradient descent ( e.g. , PEGASOS ) .