In Machine Learning, linear refers to a method of modeling the relationship between a dependent variable and one or more independent variables. The method is based on the assumption that this relationship is linear, which means that the change in the dependent variable is proportional to the change in the independent variable. Linear models are widely used in Machine Learning because they are simple to implement and interpret.

Linear models are of two types – Simple Linear Regression and Multiple Linear Regression.

Simple Linear Regression:

Simple Linear Regression (SLR) is a type of linear model that predicts the value of a dependent variable based on the value of a single independent variable. The mathematical equation for SLR is as follows:

y = β0 + β1x + ε

Where y is the dependent variable, x is the independent variable, β0 is the intercept, β1 is the slope of the line, and ε is the error term. The slope (β1) represents the change in the dependent variable for a unit change in the independent variable.

SLR assumes that the relationship between the dependent and independent variable is linear, which means that the change in the dependent variable is proportional to the change in the independent variable.

Example – Predicting house prices based on the area of the house. The larger the house is, the more expensive it will be. The relationship is expected to be linear, which means that the increase in price will be proportional to the increase in house area.

Multiple Linear Regression:

Multiple Linear Regression (MLR) is a type of linear model that predicts the value of a dependent variable based on the value of more than one independent variable. The mathematical equation for MLR is as follows:

y = β0 + β1×1 + β2×2 +…+ βnxn + ε

Where y is the dependent variable, x1, x2,…,xn are the independent variables, β0 is the intercept, β1, β2,…, βn are the slopes of the lines, and ε is the error term.

MLR assumes that the relationship between the dependent variable and independent variables is linear. Each independent variable’s slope represents the change in the dependent variable for a unit change in the respective independent variable, holding all other independent variables constant.

Example – Predicting employee salaries based on multiple factors such as education, experience, age, etc. The relationship between salary and each of these factors is expected to be linear, which means that the increase in salary will be proportional to the increase in each factor.

Conclusion:

Linear models are one of the simplest and most commonly used methods in Machine Learning. They are easy to implement and interpret, making them useful in many applications. However, their simplicity also limits their power as they can only model linear relationships between independent and dependent variables. Non-linear models are required to model complex relationships.