python - How can I plot a multi-class confusion matrix? -


i trying plot confusion matrix topic classification. however, when plot it, can't see clearly. scribbled x , y axis without plotted. how can plot in better way see how documents being classified? have 22465 documents , 88 topics.

here code:

from pandas_confusion import confusionmatrix import matplotlib.pyplot plt model = logisticregression() model = model.fit(matrix_tmp, label_tmp) pred = model.predict(matrix_tmp_test)  print(metrics.accuracy_score(label_tmp_test,pred)) print(metrics.classification_report(label_tmp_test,pred))  cm=confusionmatrix(label_tmp_test,pred) print(cm) cm.plot() plt.show() 

this plot receive. enter image description here


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -