Tangjiahui,
Thank you very much for posting this code for MIT 6.036. I am writing to point our an error in the xo_more theta and theta_0 in your post.
The perceptron actually requires 554 iterations of T to find the correct separator. Your code has a limit of 100. The theta and theta_0 you report is the last one generated, but not the correct separator. I have attached a graph of your separator (Screenshot xo_more).
Again, thank you very much for posting this code. I would be lost without it. You are a far, far better coder and Machine Learning student than me.



Tangjiahui,
Thank you very much for posting this code for MIT 6.036. I am writing to point our an error in the xo_more theta and theta_0 in your post.
The perceptron actually requires 554 iterations of T to find the correct separator. Your code has a limit of 100. The theta and theta_0 you report is the last one generated, but not the correct separator. I have attached a graph of your separator (Screenshot xo_more).
Again, thank you very much for posting this code. I would be lost without it. You are a far, far better coder and Machine Learning student than me.