Linear Regression: Machine Learning Course - CS-433
Linear Regression: Machine Learning Course - CS-433
Version
Linear Regression
÷ :*
IR
Simple linear regression
to
With only one input dimension, we
get simple linear regression.
" ""
yn ⇡ f (xn) := w0 + w1xn1
÷
wD .
=: x̃>
n w̃
E
"
now
=
: e "
Learning / Estimation / Fitting
Given data, we would like to find
w̃ = [w0, w1, . . . , wD ]. This is
called learning or estimating the pa-
rameters or fitting the model.
To do so, we need an optimization
algorithm, which we will discuss in
the chapter after the next.
Additional Notes
r
Alternative when not using an ’o↵set’ term
Above we have used D + 1 model parameters, to fit data of dimen-
sion D. An alternative also often used in practice, in particular for
high-dimensional data, is to ignore the o↵set term w0.
As a warning, you should be aware that for some machine learning mod-
els, the number of weight parameters (elements of w) can in general be
very di↵erent from D (being the dimension of the input data). For an
ML model where they do not coincide, think for example of a neural
network (more details later).
\
Matrix multiplication
To go any further, one must revise matrix multiplication. Remember
that multiplication of M ⇥ N matrix with a N ⇥ D matrix results in a
M ⇥ D matrix. Also, two matrices of size M ⇥ N1 and N2 ⇥ M can
only be multiplied when N1 = N2.