Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created February 10, 2021 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/4e8a03030cd35ceb8509411d2fb5d9b0 to your computer and use it in GitHub Desktop.
Save amankharwal/4e8a03030cd35ceb8509411d2fb5d9b0 to your computer and use it in GitHub Desktop.
from sklearn.linear_model import PassiveAggressiveClassifier
pac = PassiveAggressiveClassifier(max_iter=50)
pac.fit(train, ytrain)
ypred = pac.predict(test)
from sklearn.metrics import accuracy_score, confusion_matrix
accuracy = accuracy_score(ytest, ypred)
print(f'Accuracy Score of Passive Aggresive Scassifier: {round(accuracy*100,2)}%')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment