Hello,

The Perceptron can be seen as a SGD algorithm optimizing the loss \sum_i
max{t - y_i w^T x_i, 0} where t=0. On the other hand, online SVM optimizes
the same loss but with t=1 (the advantage of setting t=1 rather than t=0 is
that it then upper-bounds the zero-one loss).

You can check that our implementation behaves correctly here:
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/tests/test_perceptron.py

The advantage of our implementation is that it benefits of all the effort
we have already put into SGD.

Mathieu

On Thu, Sep 6, 2012 at 8:46 PM, Jaidev Deshpande <deshpande.jai...@gmail.com
> wrote:

> Hello,
>
> I've been playing around with the Perceptron class in scikit-learn. I
> have a theoretical understanding of the perceptron algorithm. In
> sklearn it has been subclassed from the SGDClassifier class, very
> different from how I would have expected the perceptron to be
> implemented (I'd have thought it was simply something like this -
> http://en.wikipedia.org/wiki/Perceptron#Learning_algorithm_steps).
>
> Anyhow, I have some questions about the methods used in the
> SGDClassifier class. Would it be better if I asked them here on the
> list or should I comment on the code in github? I would prefer the
> latter, since I have a feeling that the discussion might grow long.
>
> Thanks
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to