In this chapter, we started with an introduction to a typical machine learning problem, online advertising click-through prediction, and the inherent challenges, including categorical features. We then looked at tree-based algorithms that can take in both numerical and categorical features. We then had an in-depth discussion about the decision tree algorithm: the mechanics, different types, how to construct a tree, and two metrics (Gini Impurity and entropy) that measure the effectiveness of a split at a node. After constructing a tree in an example by hand, we implemented the algorithm from scratch. We also learned how to use the decision tree package from scikit-learn and applied it to predict click-through. We continued to improve the performance by adopting the feature-based random forest bagging algorithm and the chapter ended with some ways to tune a random forest...
Python Machine Learning By Example - Second Edition
By :
Python Machine Learning By Example - Second Edition
By:
Overview of this book
The surge in interest in machine learning (ML) is due to the fact that it revolutionizes automation by learning patterns in data and using them to make predictions and decisions. If you’re interested in ML, this book will serve as your entry point to ML.
Python Machine Learning By Example begins with an introduction to important ML concepts and implementations using Python libraries. Each chapter of the book walks you through an industry adopted application. You’ll implement ML techniques in areas such as exploratory data analysis, feature engineering, and natural language processing (NLP) in a clear and easy-to-follow way.
With the help of this extended and updated edition, you’ll understand how to tackle data-driven problems and implement your solutions with the powerful yet simple Python language and popular Python packages and tools such as TensorFlow, scikit-learn, gensim, and Keras. To aid your understanding of popular ML algorithms, the book covers interesting and easy-to-follow examples such as news topic modeling and classification, spam email detection, stock price forecasting, and more.
By the end of the book, you’ll have put together a broad picture of the ML ecosystem and will be well-versed with the best practices of applying ML techniques to make the most out of new opportunities.
Table of Contents (15 chapters)
Preface
Free Chapter
Section 1: Fundamentals of Machine Learning
Getting Started with Machine Learning and Python
Section 2: Practical Python Machine Learning By Example
Exploring the 20 Newsgroups Dataset with Text Analysis Techniques
Mining the 20 Newsgroups Dataset with Clustering and Topic Modeling Algorithms
Detecting Spam Email with Naive Bayes
Classifying Newsgroup Topics with Support Vector Machines
Predicting Online Ad Click-Through with Tree-Based Algorithms
Predicting Online Ad Click-Through with Logistic Regression
Scaling Up Prediction to Terabyte Click Logs
Stock Price Prediction with Regression Algorithms
Section 3: Python Machine Learning Best Practices
Machine Learning Best Practices
Other Books You May Enjoy
Customer Reviews