Overview

1 What is machine learning? It is common sense, except done by a computer

This chapter opens by warmly inviting readers into machine learning with the promise that it’s far more approachable than its reputation suggests. Rather than demanding heavy math or nonstop coding, it emphasizes common sense, visual intuition, and curiosity about patterns in data. The author demystifies formulas and code by treating them as languages for expressing simple ideas, noting that the field’s explosive growth comes from abundant data and computing power—and that ML now quietly powers everyday experiences from recommendations to medical support.

To ground the field, the chapter distinguishes artificial intelligence (computers making decisions), machine learning (computers making decisions from data), and deep learning (a powerful ML subfield using neural networks). It connects ML to how humans decide: we use logic or we rely on experience; ML formalizes the latter. This becomes the remember–formulate–predict framework: remember past data, formulate a rule (a model), and predict on new cases. Along the way, it clarifies core terms—models as decision rules learned from data, algorithms as procedures for building models, and features as the data attributes models use—while stressing that good models are those that generalize to unseen data.

Through a running spam-detection example, the chapter shows how models evolve from simple frequency counts to rules that use informative features (like day of week or email size), then to richer combinations a computer can search efficiently. The lesson is that ML scales this rule-finding process: computers explore many candidate models and select those that fit past data and, ideally, generalize. The chapter closes by contrasting predictive ML (classification and regression) with generative ML (creating text or images), noting that the book focuses on predictive methods—building intuition from scratch implementations before using popular libraries—while offering a glimpse of generative techniques once the foundations are in place.

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 like 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, as follows:

  • 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.

FAQ

How does artificial intelligence differ from machine learning and deep learning?Artificial intelligence is any task where computers make decisions. Machine learning is the subset where those decisions are driven by data. Deep learning is a subset of machine learning that relies on neural networks and powers many cutting‑edge applications. A handy analogy: AI ~ vehicles, ML ~ cars, DL ~ high‑performance sports cars.
Is machine learning hard, and do I need heavy math or lots of coding?No. You need basic math, visual intuition, curiosity, and a willingness to learn. Coding ranges from little to a lot depending on the role, and modern tools and libraries let you do ML with minimal code. The book introduces math only when it’s needed and explains code step by step.
What does “machine learning is common sense, except done by a computer” mean?Like people, ML learns from experience—except the “experience” is data. It spots patterns in past data and uses them to make predictions about new situations, attaching formulas and numbers so a computer can do the same pattern spotting.
What is the remember–formulate–predict framework?It mirrors how humans think with experience: - Remember: recall relevant past situations (data). - Formulate: derive a general rule that explains them (a model). - Predict: apply that rule to new cases. ML systems follow the same three steps with data and algorithms.
What are models, algorithms, and features in ML?- Model: a set of rules that represents the data and is used to make predictions. - Algorithm: the procedure (steps) used to build the model from data. - Feature: any measurable property of the data the model can use (for example, email size or day of week in a spam filter).
Can you show a simple example of building a model?Consider spam detection for a friend’s emails. You might notice weekend emails are usually spam while weekday emails are not, or that larger emails tend to be spam. Each observation can become a rule (model). You can also combine features (day and size) into more expressive models.
How does a computer pick the “best” model?It tries many possible rules and formulas and selects the one that fits the existing data well and, more importantly, generalizes to new, unseen data. This search is fast and systematic compared to doing it by hand.
Where is machine learning used in real life?Examples include recommendation systems, image recognition, text processing, self‑driving cars, spam detection, and medical diagnosis. Any task involving repeated judgments over data can often benefit from ML.
How does this book handle formulas and code?Formulas are introduced through small, concrete examples so their meaning is clear. Code is broken into simple steps with explanations. Early chapters build models from scratch; later chapters use libraries like Scikit‑Learn, Turi Create, and Keras.
What is generative machine learning, and how is it different from predictive ML?Predictive ML answers multiple‑choice or numeric questions (classification and regression). Generative ML creates new content, such as text or images, and is generally harder. This book focuses on predictive ML, with a later chapter introducing generative methods.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Grokking Machine Learning, Second Edition ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Grokking Machine Learning, Second Edition ebook for free