Back to Linear Regression

Linear regression equation

In algebraic terms, the model would be defined as:


y = mx + b

Where:

  • y is miles per gallon—the value we want to predict.
  • m is the slope of the line.
  • x is pounds—our input value.
  • b is the y-intercept of the line.

In ML, we write the equation for a linear regression model as follows:

y' = b + w 1 x 1

Where:

  • y' is the predicted label—the output.
  • b Bias is a parameter of the model and is calculated during training.
  • w 1 Weight is a parameter of the model and is calculated during training.
  • x 1 is a feature—the input.

Key Concepts: