liveBook · Manning

Training

As explained in Advanced Algorithms and Data Structures

Training is the process of fitting a model's parameters from data so that the model approximates the desired relation.

Training fits a model’s parameters to data after a model family has been chosen. For a line, the parameters are its slope and intercept; training uses gradient descent to find values that reduce prediction error. section 16.4.1

In linear regression, a loss function sums squared vertical distances between predictions and observed values. The loss depends on the model parameters, so gradient descent updates them. Training uses a subset of the data; reserve other points for testing. section 16.4.1

Figure 16.19 The cost function of the example in figure 16.18 (B). Using the sum of squared errors, the cost is a function of m and b.

The cost surface shows how the sum of squared errors varies with a line’s slope and intercept. section 16.4.1

How Advanced Algorithms and Data Structures covers it

How deep it goes
Defines parameter fitting through squared-error loss and gradient descent, while deferring training-set selection details.
Examples
Uses a line fitted to data points, minimizing squared vertical errors by adjusting its slope and intercept.
What it assumes
Assumes a chosen model family and dataset, and notes that some data points should be held out for testing.
What you can do after
Apply gradient descent to adjust a line’s slope and intercept toward lower squared prediction error.
How it connects
Connects gradient descent, linear regression, loss functions, model parameters, and train-test splitting.

Also explained in

Compare how 24 books explain training →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Advanced Algorithms and Data Structures. The section links point to the parts of the book it draws on.