EnYa32 commited on
Commit
1902da4
Β·
verified Β·
1 Parent(s): 30bbb1e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -5
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  title: BodyFatPredictor
3
- emoji: πŸš€
4
  colorFrom: red
5
  colorTo: red
6
  sdk: docker
@@ -12,9 +12,41 @@ short_description: Streamlit app with BodyFat (%) predictor
12
  license: mit
13
  ---
14
 
15
- # Welcome to Streamlit!
16
 
17
- Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
18
 
19
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
20
- forums](https://discuss.streamlit.io).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: BodyFatPredictor
3
+ emoji: πŸ§β€β™‚οΈ
4
  colorFrom: red
5
  colorTo: red
6
  sdk: docker
 
12
  license: mit
13
  ---
14
 
15
+ # πŸ§β€β™‚οΈ BodyFat Predictor (Ridge Regression)
16
 
17
+ This app predicts **Body Fat Percentage (BodyFat %)** from anthropometric measurements using a trained **Ridge Regression** model.
18
 
19
+ It first predicts **Body Fat Density (Density)** and then converts it to **BodyFat (%)** using the Siri equation:
20
+
21
+ **BodyFat = 495 / Density βˆ’ 450**
22
+
23
+ ## βœ… Files
24
+ - `app.py` – Streamlit application
25
+ - `ridge_bodyfat_model.pkl` – trained Ridge model (must be in the same folder as `app.py`)
26
+ - `requirements.txt` – dependencies
27
+
28
+ ## πŸ“ Units (Important)
29
+ This project uses **imperial units** as in the dataset:
30
+ - **Height**: inches
31
+ - **Weight**: pounds (lbs)
32
+ - Other body measurements: typically inches (keep consistent with your dataset)
33
+
34
+ The app also supports engineered features:
35
+ - `Waist_hip = Abdomen / Hip`
36
+ - `Body_Index (BMI) = 703 * Weight / Height^2` (imperial BMI)
37
+
38
+ These are computed automatically **only if** your saved model expects them.
39
+
40
+ ## πŸš€ Run locally
41
+ ```bash
42
+ pip install -r requirements.txt
43
+ streamlit run app.py
44
+ 🧠 Model
45
+ Algorithm: Ridge Regression
46
+
47
+ Target during training: Density
48
+
49
+ Submission output: BodyFat (%) using the Siri conversion
50
+
51
+ πŸ“ Notes
52
+ If the app cannot detect feature names, re-train the model using a pandas DataFrame so scikit-learn stores feature_names_in_.