You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Linear regression and logistic regression are two of the most fundamental algorithms in machine learning. Despite the shared name, they solve different tasks: linear regression predicts continuous values (regression), while logistic regression predicts discrete categories (classification).
Linear regression models the relationship between one or more input features and a continuous target variable by fitting a straight line (or hyperplane in multiple dimensions) through the data.
With one feature, the model is:
y = w * x + b
Where:
With multiple features, the model becomes:
y = w1 * x1 + w2 * x2 + ... + wn * xn + b
Linear regression finds the line of best fit by minimising the sum of squared residuals (Ordinary Least Squares — OLS).
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.