CoolFace
Modelpublic

andreshenao/obesity-weight-regression

sourceHugging Facemitupdated 11mo agoView on Hugging Face
0likes
Model Card

This model predicts a person’s weight (kg) from height (m) and age (years) using a Linear Regression model from scikit-learn. It is for educational demonstration in a URI data science course.

FeatureTypeDescription
HeightContinuousHeight in meters
AgeContinuousAge in years
Weight (target)ContinuousWeight in kilograms

Model Performance

MetricValue
Mean Squared Error (MSE)511.55
R² Score0.2777

The model explains about 28% of weight variation — it recognizes the trend that taller and older people weigh more, but the predictions are not highly accurate.


Evaluation Summary

  • —Clear positive correlation in predictions
  • —Spread increases for heavier individuals
  • —Indicates missing key predictors:
  • —Diet
  • —Muscle mass
  • —Body composition
  • —Lifestyle factors like exercise

Strengths & Weaknesses

Strengths

  • —Simple and interpretable linear model
  • —Works as a learning tool for regression
  • —Fast and easy to run

Weaknesses

  • —Low predictive power
  • —Sensitive to outliers
  • —Not reliable for real-world medical prediction

Training Details

  • —Model: LinearRegression()
  • —Train/Test: 75% / 25%
  • —Dataset: ObesityDataSet_raw_and_data_synthetic.csv
  • —Frameworks: Python, scikit-learn
  • —Random State: 42

⚠ Limitations

  • —Should not be used for health decisions
  • —Trained on a limited synthetic dataset
  • —Does not model non-linear relationships important for weight

How to Use

python
import skops.io as sio
model = sio.load("regression_model.skops", trusted=True)
prediction = model.predict([[1.75, 21]])
print(prediction)