Reader small image

You're reading from  The Statistics and Machine Learning with R Workshop

Product typeBook
Published inOct 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781803240305
Edition1st Edition
Languages
Right arrow
Author (1)
Liu Peng
Liu Peng
author image
Liu Peng

Peng Liu is an Assistant Professor of Quantitative Finance (Practice) at Singapore Management University and an adjunct researcher at the National University of Singapore. He holds a Ph.D. in statistics from the National University of Singapore and has ten years of working experience as a data scientist across the banking, technology, and hospitality industries.
Read more about Liu Peng

Right arrow

Solving a system of linear equations

The matrix-vector multiplication operation gives rise to a system of equations. In a typical machine learning algorithm, data comes in the form of a matrix, X, and the target outcome is a vector, y. When the model that’s used is a straightforward linear model, we assume the input-output relationship as Xw = y, where w represents the vector of features/coefficients. An n x p matrix of input data multiplies a p x 1 vector, w, of features to produce, as expected, an n x 1 output vector, y. The essence of linear regress is thus to solve for the exact values in w such that the system of linear equations in Xw = y are satisfied.

The equivalence between matrix-vector multiplication and the system of linear equations may take some time to become noticeable. Let’s pause and look at this equivalence.

System of linear equations

We are already familiar with the process of calculating a matrix-vector multiplication operation. A 2x2 matrix...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
The Statistics and Machine Learning with R Workshop
Published in: Oct 2023Publisher: PacktISBN-13: 9781803240305

Author (1)

author image
Liu Peng

Peng Liu is an Assistant Professor of Quantitative Finance (Practice) at Singapore Management University and an adjunct researcher at the National University of Singapore. He holds a Ph.D. in statistics from the National University of Singapore and has ten years of working experience as a data scientist across the banking, technology, and hospitality industries.
Read more about Liu Peng