View Single Post
  #10  
Old 04-09-2013, 08:21 AM
Elroch Elroch is offline
Invited Guest
 
Join Date: Mar 2013
Posts: 143
Default Re: PLA computing speed

Quote:
Originally Posted by jlaurentum View Post
Hello.

I used R too. I did 500 iterations for N=100 and it took forever. I used a while loop for the main part of the PLA. R is very inefficient with while loops and I don't see an easy way to vectorize the code. I also have the same question as Isidro - can the misclassification point chosen at each iteration affect the speed? Is there a better choice than just taking the first misclassified point you bump into?

Oh and btw, you guys did vectorize the classification for the N points with a good old sapply didnt you?
Good point about sapply!

In answer to your question, I have observed empirically that the way you choose the misclassified point has quite a large effect on the convergence. Beyond the scope of the actual problem, we could attempt to improve on randomisation by using the information in the value of w.x when sign(w.x) is wrong. But should we prefer large modulus of w.x or small?
Reply With Quote