i am trying to classify certain articles as fake or real.by applying logistic regression i want to extract the percentage of veracity [on hold]
i am trying to classify certain articles as fake or real.by applying logistic regression i want to extract the percentage of veracity [on hold] clf = LogisticRegression(random_state=0) clf.fit(tidf_train, y_train) pred = clf.predict(tfidf_test) score = metrics.accuracy_score(y_test, pred) print("accuracy: %0.3f" % score) cm = metrics.confusion_matrix(y_test, pred, labels=['FAKE', 'REAL']) plot_confusion_matrix(cm, classes=['FAKE', 'REAL']) print(cm) This code gives me no error but doesnt produce the confusion matrix.Kindly suggest what might be wrong Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question. Hi, welcome to sta...
