View Single Post
  #3  
Old 01-14-2013, 01:55 PM
gah44 gah44 is offline
Invited Guest
 
Join Date: Jul 2012
Location: Seattle, WA
Posts: 153
Default Re: Detecting convergence for PLA

Since it takes longer to check for misclassified points than to do the update, what I do is actually:

Loop up to 10000 times:
Choose a random point.
If misclassified, update it and count the update.
Every 20 such tries, test for no more misclassified points and exit loop.

The 10000 avoids infinite loops due to mistakes in the algorithm.

My first PLA was in AWK, which is pretty slow.

I now have PLA in Java, which is plenty fast no matter how you do it.

Any number besides 20 will also work, that was my guess as a balance between the update time and testing time.
Reply With Quote