liveBook · Manning

Machine learning

As explained in Grokking AI Algorithms, Second Edition

Machine learning is the field of building systems that learn patterns or behavior from data rather than relying solely on explicitly programmed rules.

Machine learning uses algorithms to find patterns in data and turn them into useful predictions or decisions. It is especially helpful when a dataset is too large or complex to inspect by eye. You still need data and a question the data might answer: the algorithm cannot produce useful answers by magic. section 8.1 section 8.2

Estimating apartment rent

Suppose a one-bedroom apartment in the city center costs $5,000 per month, while a similar apartment outside the center costs $3,000. A second bedroom and a garage also tend to raise the price. From these observations, you might estimate about $8,000 for a two-bedroom apartment in the center with a garage. Machine learning applies this kind of pattern-finding to larger, more complex collections of properties. section 8.1

Figure 8.2 Example visualization of relationships among data
08_02

The plotted properties make two relationships visible: rent tends to fall with distance from the city center, and apartments with more rooms tend to cost more. section 8.1

Choose an approach according to the question and the data available:

  • Supervised learning trains on examples with known outcomes, such as fruit attributes paired with fruit labels. section 1.21
  • Unsupervised learning looks for hidden relationships, such as groups of fruits with similar properties. section 1.21
  • Reinforcement learning uses rewards and penalties to encourage useful actions. section 1.21

Keep the algorithm and the model distinct. The learning algorithm examines data and builds a model; the trained model is the resulting artifact used to solve problems. A practical workflow therefore includes preparing data and selecting an algorithm suited to the task, such as linear regression for prediction or a decision tree for classification. section 1.5 section 8.0

How Grokking AI Algorithms, Second Edition covers it

How deep it goes
Introduces the learning life cycle, data preparation, algorithm selection, and implementation goals without detailing regression or tree mechanics in the cited passages.
Examples
Illustrates rent prediction with apartment features, labeled classification with fruit, and reward-driven learning with a report-card analogy.
What it assumes
Starts with familiar pattern-spotting and distinguishes algorithms from models before introducing learning approaches.
What you can do after
Build it from scratch by implementing linear regression for prediction and decision-tree learning for classification.
How it connects
Connects supervised, unsupervised, and reinforcement learning with models, linear regression, and decision-tree classification.

Also explained in

Compare how 42 books explain machine learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking AI Algorithms, Second Edition. The section links point to the parts of the book it draws on.