1 What is machine learning? It is common sense, except done by a computer
This chapter welcomes readers into machine learning by framing it as common-sense pattern finding done by computers. It emphasizes accessibility over intimidation: you don’t need deep math or heavy coding to begin—curiosity, visual intuition, and a willingness to learn are the main ingredients. The author demystifies formulas and code by treating them as languages that become clear through small, concrete examples, beginning with building models from scratch and later leveraging libraries to tackle more complex tasks. The takeaway is that machine learning is already woven into everyday life and is within reach for anyone motivated to apply it.
The text distinguishes artificial intelligence (computers making decisions) from machine learning (decisions based on data) and deep learning (neural-network-based methods within ML). It connects ML to how humans decide: we recall experiences (data), formulate a general rule (a model), and predict outcomes—captured in the remember–formulate–predict framework. Through intuitive stories (like recognizing apples in images), the chapter shows why coding rigid rules can fail, and how learning from examples lets computers extract patterns that generalize to new situations.
Key ML concepts are introduced: a model is the set of rules used for prediction; an algorithm is the procedure that builds that model; and features are the data attributes that drive decisions. A progressive spam-filter scenario illustrates moving from simple frequency rules to richer feature-based models, and how computers efficiently search through many candidate rules or formulas to find those that fit data and, crucially, generalize. The chapter closes by contrasting predictive ML (classification and regression) with generative ML (creating text or images), noting that while the book focuses on predictive methods, understanding these foundations—especially neural networks—prepares readers to step into generative modeling.
Machine learning is a part of artificial intelligence.
Machine learning encompasses all the tasks in which computers make decisions based on data. In the same way that humans make decisions based on previous experiences, computers can make decisions based on previous data.
Deep learning is a part of machine learning.
The remember-formulate-predict framework is the main framework we use in this book. It consists of three steps: (1) We remember previous data; (2) we formulate a general rule; and (3) we use that rule to make predictions about the future.
A very simple machine learning model
A slightly more complex machine learning model
Another slightly more complex machine learning model
An even more complex machine learning model
A much more complex machine learning model, found by a computer
Predictive machine learning is akin to answering questions, such as multiple choice. Generative learning is akin to writing an essay or drawing an image.
Summary
- Machine learning is easy! Anyone can learn it and use it, regardless of their background. All that is needed is a desire to learn and great ideas to implement!
- Machine learning is tremendously useful, and it is used in most disciplines. From science to technology to social problems and medicine, machine learning is making an impact and will continue doing so.
- Machine learning is common sense, done by a computer. It mimics the ways humans think to make decisions quickly and accurately.
- Just as humans make decisions based on experience, computers can make decisions based on previous data. This is what machine learning is all about.
- Machine learning uses the remember-formulate-predict framework:
- - Remember: look at the previous data.
- - Formulate: build a model, or a rule, based on this data.
- - Predict: use the model to make predictions about future data.
Grokking Machine Learning, Second Edition ebook for free