Squishy123 / CPS803-Project

Fake News Detection
GNU Affero General Public License v3.0
0 stars 0 forks source link

Performance Metrics #5

Open dahkimr opened 3 years ago

dahkimr commented 3 years ago

Code to check the performance of different models.

dahkimr commented 3 years ago

Got this from: https://analyticsindiamag.com/hands-on-guide-to-predict-fake-news-using-logistic-regression-svm-and-naive-bayes-methods/

print("Accuracy of Logistic Regression Classifier: {}%".format(round(accuracy_score(test_y, lr_pred) * 100, 2)))  
print("\nConfusion Matrix of Logistic Regression Classifier:\n")      
print(confusion_matrix(test_y, lr_pred))      
print("\nCLassification Report of Logistic Regression Classifier:\n")     
print(classification_report(test_y, lr_pred))  

I have yet to fully understand it but it's a start if y'all need accuracy print outs.