Skip to content

Instantly share code, notes, and snippets.

@Niranjankumar-c
Created February 21, 2019 14:04
Show Gist options
  • Save Niranjankumar-c/197767ac84a66a857b51645bc2795f6d to your computer and use it in GitHub Desktop.
Save Niranjankumar-c/197767ac84a66a857b51645bc2795f6d to your computer and use it in GitHub Desktop.
perceptron evaluation
perceptron = Perceptron()
#epochs = 10000 and lr = 0.3
wt_matrix = perceptron.fit(X_train, Y_train, 10000, 0.3)
#making predictions on test data
Y_pred_test = perceptron.predict(X_test)
#checking the accuracy of the model
print(accuracy_score(Y_pred_test, Y_test))
@monalisa151996
Copy link

I am getting an error in line 4 as Perceptron has no attribute called fit, please help me out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment