Home » Machine Learning

Linear Regression Algorithm in Machine Learning

Linear Regression is a supervised machine learning algorithm where the predicted output is continuous and has a constant slope. It’s used to predict values within a continuous range, (e.g. sales, price) rather than trying to classify them into categories (e.g. cat, dog)

Machine learning Linear Regression

True, the line doesn't pass through every dot, but the line does clearly show the relationship between chirps and temperature. Using the equation for a line, you could write down this relationship as follows:

y=theta0 + theta1 * x


  • y is the temperature in Celsius—the value we're trying to predict
  • theta1 is the slope of the line.
  • x is the number of chirps per minute—the value of our input feature.
  • theta0 is the y-intercept or bias

Next Section: Logistic Regression