Linear regression is a method for modeling the relationship between two scalar values: the input variable x and the output variable y. The model assumes that $y$ is a linear function or a weighted sum of the input variable. $y = f(x)$ Or, stated with the coefficients. $y = b_0 + b_1 x_1$ The model can also be used to model an output variable given multiple input variables called multivariate linear regression $y = b_0 + (b_1.x_1) + (b_2.x_2) + ....+(b_n.x_n)$ The objective of creating a linear regression model is to find the values for the coefficient values ($b$) that minimize the error in the prediction of the output variable $y$. Matrix Formulation of Linear Regression Linear regression can be stated using Matrix notation; for example: $y = X.b$ Where $X$ is the input data and each column is a data feature, $b$ is a vector of coefficients and $y$ is a vector of output variables for each row in $X$. Reformulated, the problem becomes a system of linea...
This blog is written for the following two courses of KTU using python. CST284-Mathematics for Machine Learning-KTU Minor course and CST294-Computational Fundamentals for Machine Learning-KTU honors course. Queries can be send to Dr Binu V P. 9847390760