![]() We can examine our data quickly using Pandas correlation function to pick a suitable feature for our logistic regression. We will use the confusion matrix to evaluate the accuracy of the classification and plot it using matplotlib:ĭf = pd.DataFrame(data.data, columns=data.feature_names) For data I will use the popular Iris dataset (to read more about it reference ). Let’s go through a quick Logistic Regression example using Scikit-Learn. This is a mockup of the look I am trying to achieve: The documentation for Confusion Matrix is pretty good, but I struggled to find a quick way to add labels and visualize the output into a 2×2 table.įor a good introductory read on confusion matrix check out this great post: I will be using the confusion martrix from the Scikit-Learn library ( trics) and Matplotlib for displaying the results in a more intuitive visual format. In this post I will demonstrate how to plot the Confusion Matrix.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |