Sunday, 2 August 2026

Database Info

 

The "Information Part" in Regression Table

Regression Table - Info
  • Dep. Variable: is short for "Dependent Variable". Calorie_Burnage is here the dependent variable. The Dependent variable is here assumed to be explained by Average_Pulse.
  • Model: OLS is short for Ordinary Least Squares. This is a type of model that uses the Least Square method.
  • Date: and Time: shows the date and time the output was calculated in Python.

The "Coefficients Part" in Regression Table

Regression Table - Coefficients
  • Coef is short for coefficient. It is the output of the linear regression function.

The linear regression function can be rewritten mathematically as:

Calorie_Burnage = 0.3296 * Average_Pulse + 346.8662

These numbers means:

  • If Average_Pulse increases by 1, Calorie_Burnage increases by 0.3296 (or 0,3 rounded)
  • If Average_Pulse = 0, the Calorie_Burnage is equal to 346.8662 (or 346.9 rounded).
  • Remember that the intercept is used to adjust the model's precision of predicting!

Do you think that this is a good model?


Define the Linear Regression Function in Python

Define the linear regression function in Python to perform predictions.

What is Calorie_Burnage if Average_Pulse is: 120, 130, 150, 180?

Example

def Predict_Calorie_Burnage(Average_Pulse):
 return(0.3296*Average_Pulse + 346.8662)

print(Predict_Calorie_Burnage(120))
print(Predict_Calorie_Burnage(130))
print(Predict_Calorie_Burnage(150))
print(Predict_Calorie_Burnage(180))



No comments:

Post a Comment