All courses › Machine Learning and Data Analysis › Linear model

Linear model

The simplest model that learns from data is a straight line. The weight says how much the answer changes when the feature increases by one, and the intercept moves the line up or down. Learning means finding the values that give the smallest error.

y^=w x+b\hat y = w\,x + blinear model
y^=w1x1+w2x2+⋯+b\hat y = w_1 x_1 + w_2 x_2 + \dots + bwith several features

Symbols

wwweight (slope)
bbintercept
y^\hat ymodel prediction

Example

y^=2x+1\hat y = 2x + 1 predicts 9 for x=4x = 4.

Neural networks are basically many such linear terms combined with non-linear functions.
Practise linear regression and gradient descent for free →

← Mean squared error · Gradient descent →

Part of Machine Learning and Data Analysis: Linear regression and gradient descent.