Hi Jaidev. I think it is ok to discuss on the list. I didn't implement the Perceptron but I think it is basically "as simple" as the one on the wikipedia page - efficiency and dealing with sparse / dense data make the code a bit longer, though ;)
It is a stochastic gradient decent procedure (meaning updated after each example) to minimize the zero-one loss (ie. loss 1 on misclassification, loss 0 on correct), which is the only difference from SGDClassifier afaik. The sklearn implementation also supports l2 regularization (aka weight decay) and learn rate schedules (i.e. alpha in the wiki formulation gets smaller). You can few them as optional tweaks if you whish, but they help a lot in practice. Btw, Mathieu, if I say something wrong, please correct me ;) Cheers, Andy ----- Ursprüngliche Mail ----- Von: "Jaidev Deshpande" <deshpande.jai...@gmail.com> An: scikit-learn-general@lists.sourceforge.net Gesendet: Donnerstag, 6. September 2012 12:46:22 Betreff: [Scikit-learn-general] Conceptual questions about linear_model.perceptron 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