Perceptron Classification and Model Training
- by jake pinedo
I'm having an issue with understanding how the Perceptron algorithm works and implementing it.
cLabel = 0 #class label: corresponds directly with featureVectors and tweets
for m in range(miters):
for point in featureVectors:
margin = answers[cLabel] * self.dot_product(point, w)
if margin <=…