A linear regression model makes predictions by simply computing a weighted sum of the input features, plus a constant called the bias term. For example, if we want to predict the average marks of a…