Update README.md
Browse files
README.md
CHANGED
|
@@ -1,125 +1,87 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
"- Not production-ready\n",
|
| 89 |
-
"\n",
|
| 90 |
-
"## Citation \n",
|
| 91 |
-
"- \"Estimation of Obesity Levels Based On Eating Habits and Physical Condition .\" UCI Machine Learning Repository, 2019, https://doi.org/10.24432/C5H31Z.\n",
|
| 92 |
-
"\n"
|
| 93 |
-
]
|
| 94 |
-
},
|
| 95 |
-
{
|
| 96 |
-
"cell_type": "code",
|
| 97 |
-
"execution_count": null,
|
| 98 |
-
"id": "51036e3d-c32b-4102-b965-9759eb873131",
|
| 99 |
-
"metadata": {},
|
| 100 |
-
"outputs": [],
|
| 101 |
-
"source": []
|
| 102 |
-
}
|
| 103 |
-
],
|
| 104 |
-
"metadata": {
|
| 105 |
-
"kernelspec": {
|
| 106 |
-
"display_name": "Python 3 (ipykernel)",
|
| 107 |
-
"language": "python",
|
| 108 |
-
"name": "python3"
|
| 109 |
-
},
|
| 110 |
-
"language_info": {
|
| 111 |
-
"codemirror_mode": {
|
| 112 |
-
"name": "ipython",
|
| 113 |
-
"version": 3
|
| 114 |
-
},
|
| 115 |
-
"file_extension": ".py",
|
| 116 |
-
"mimetype": "text/x-python",
|
| 117 |
-
"name": "python",
|
| 118 |
-
"nbconvert_exporter": "python",
|
| 119 |
-
"pygments_lexer": "ipython3",
|
| 120 |
-
"version": "3.13.2"
|
| 121 |
-
}
|
| 122 |
-
},
|
| 123 |
-
"nbformat": 4,
|
| 124 |
-
"nbformat_minor": 5
|
| 125 |
-
}
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: scikit-learn
|
| 4 |
+
tags:
|
| 5 |
+
- regression
|
| 6 |
+
- linear-regression
|
| 7 |
+
- obesity
|
| 8 |
+
datasets:
|
| 9 |
+
- ObesityDataSet_raw_and_data_sinthetic.csv
|
| 10 |
+
model-index:
|
| 11 |
+
- name: Obesity Weight Prediction Model
|
| 12 |
+
results:
|
| 13 |
+
- task:
|
| 14 |
+
type: regression
|
| 15 |
+
name: Weight prediction (kg)
|
| 16 |
+
dataset:
|
| 17 |
+
name: ObesityDataSet_raw_and_data_sinthetic.csv
|
| 18 |
+
type: tabular
|
| 19 |
+
metrics:
|
| 20 |
+
- type: mean_squared_error
|
| 21 |
+
value: 511.55
|
| 22 |
+
- type: r2
|
| 23 |
+
value: 0.2777
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# Obesity Weight Prediction Model — Linear Regression
|
| 27 |
+
|
| 28 |
+
## Overview
|
| 29 |
+
This model predicts a person’s **weight (kg)** based on **height (m)** and **age (years)** using a Linear Regression model from scikit-learn.
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## Training
|
| 34 |
+
|
| 35 |
+
| Detail | Value |
|
| 36 |
+
|--------|-------|
|
| 37 |
+
| Algorithm | `LinearRegression()` |
|
| 38 |
+
| Features | Height, Age |
|
| 39 |
+
| Target | Weight |
|
| 40 |
+
| Train/Test Split | 75% / 25% |
|
| 41 |
+
| Random State | 42 |
|
| 42 |
+
| Dataset | ObesityDataSet_raw_and_data_sinhtetic.csv |
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
## Performance
|
| 47 |
+
|
| 48 |
+
| Metric | Score |
|
| 49 |
+
|--------|-------|
|
| 50 |
+
| MSE (Mean Squared Error) | **511.55** |
|
| 51 |
+
| R^2 Score | **0.2777** |
|
| 52 |
+
|
| 53 |
+
These results indicate that height and age alone **do not fully explain** weight — important factors like diet, genetics, and exercise are missing.
|
| 54 |
+
|
| 55 |
+
---
|
| 56 |
+
|
| 57 |
+
## Visualization
|
| 58 |
+
|
| 59 |
+
Below is a scatter plot showing predicted vs true weights:
|
| 60 |
+
|
| 61 |
+

|
| 62 |
+
|
| 63 |
+
The wide spread around the regression line shows prediction uncertainty for heavier individuals.
|
| 64 |
+
|
| 65 |
+
---
|
| 66 |
+
|
| 67 |
+
## Limitations
|
| 68 |
+
- Only two features used → reduced explanatory power
|
| 69 |
+
- Synthetic dataset — not reflective of real population variation
|
| 70 |
+
- Performance not suitable for real-world medical decisions
|
| 71 |
+
|
| 72 |
+
This model is intended for **educational use only**.
|
| 73 |
+
|
| 74 |
+
---
|
| 75 |
+
## Strengths
|
| 76 |
+
- Easy to interpret
|
| 77 |
+
- Fast and simple
|
| 78 |
+
- Good educational model
|
| 79 |
+
|
| 80 |
+
## Weaknesses
|
| 81 |
+
- Low accuracy
|
| 82 |
+
- Missing key health variables
|
| 83 |
+
- Not production-ready
|
| 84 |
+
|
| 85 |
+
## Citation
|
| 86 |
+
- "Estimation of Obesity Levels Based On Eating Habits and Physical Condition ." UCI Machine Learning Repository, 2019, https://doi.org/10.24432/C5H31Z.
|
| 87 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|