Overview

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.

FAQ

What is machine learning, and how does it differ from artificial intelligence?Artificial intelligence is any approach where computers make decisions to solve problems. Machine learning is a subset of AI focused on making those decisions from data—computers learn patterns from past examples (experience) to make future predictions.
Is machine learning hard? Do I need a lot of math and coding?Not necessarily. The chapter emphasizes common sense, pattern-spotting, and visual intuition, plus some basic math. You can learn the necessary math and code as you go, and many tools (like Scikit‑Learn, Turi Create, and Keras) reduce how much code you need to write.
How do humans make decisions from experience, and how does ML mirror that?We remember similar past situations, formulate a general rule, and use it to predict. Machine learning follows the same remember–formulate–predict framework: collect data, build a model from it, and use the model to make predictions.
What is a “model” in machine learning?A model is a set of rules that represents the data and can be used to make predictions. It’s a simplified description of reality that captures patterns found in the training data.
What is an “algorithm” in this context?An algorithm is the procedure used to build a model. It’s a sequence of steps that searches for rules or parameters that best fit the data.
What are “features,” and why do they matter?Features are measurable properties or characteristics the model uses to make predictions. In the chapter’s spam examples, features include email size, day of week, sender, number of spelling mistakes, and the presence of specific words.
How is machine learning different from traditional programming?Traditional programming hand-codes explicit rules. Machine learning learns the rules from data: given many labeled examples (like images with and without apples), the computer discovers patterns that let it make accurate predictions on new inputs.
How does a computer actually build a model?It evaluates many candidate rules or formulas against a large dataset, measuring how well each fits the data. The aim is to find a model that fits past data well and, more importantly, generalizes to new, unseen data.
Where is machine learning used in real life?Across many domains: recommendations, image recognition, text processing, spam detection, medical diagnosis, self-driving, and more. Growth has accelerated thanks to abundant data and increased computing power.
What are deep learning and generative ML, and how do they relate to this book?Deep learning is a subfield of ML that uses neural networks and powers state-of-the-art applications like image and text understanding. Predictive ML answers classification/regression questions, while generative ML creates new content (text or images). This book focuses mainly 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