Summary
This chapter illustrates popular machine learning algorithms with examples. A brief introduction to linear and logistic regression was discussed. Using the college acceptance criteria for linear regression and the Titanic survivors for logistic regression, this chapter also illustrated how you can use the statsmodels.formula.api, pandas, and sklearn.linear_model packages for these regression methods. In both these examples, matplotlib has been used for visualization methods.
You learned about decision trees. Using the sports example (golf and tennis), we looked at the decision tree using the sklearn and pydot packages. Further, we discussed Bayes theorem and the Naïve Bayes classifier. Using the TextBlob package and the movie reviews data from the nltk corpora, we looked at the example of a word cloud visually using the wordcloud package.
You learned about the k-nearest neighbors algorithm. Here, we looked at an example that classified fruits based on their weight and shape,...