Linear Regression is one of the simplest and most fundamental algorithms in the field of machine learning and statistics, primarily used for predicting a quantitative response. Itβs a parametric approach meaning it assumes a linear relationship between the input variables (independent variables) and the single output variable (dependent variable). Hereβs a more detailed look at Linear Regression, including its types, method of operation and assumptions.
Simple Linear Regression: This involves a single independent variable used to predict a dependent variable. It attempts to establish a linear relationship between the two variables by fitting a linear equation to observed data. The equation of a simple linear regression line
π¦ = π½0+π½1π₯+π
where π¦ is the dependent variable, π₯ is the independent variable, π½0Ξ²0β is the intercept, π½1Ξ²1β is the slope, and πΟ΅ is the error term.
Multiple Linear Regression: This involves two or more independent variables used to predict a dependent variable by fitting a linear equation to the observed data. The equation for multiple linear regression is:
π¦=π½0+π½1π₯1+π½2π₯2+β―+π½ππ₯π+π
where each π₯ represents a different independent variable, and each π½ represents the coefficient (or slope) of that variable.
Linear Regression works by estimating the coefficients of the linear equation, involving one or more independent variables that best predict the value of the dependent variable. The process involves:
Linear Regression is based on several key assumptions: