Model description
This model is a decision tree classifier trained to predict obesity levels based on demographic, lifestyle, and diet-related features. The dataset includes variables including age, height, weight, caloric food intake, physical activity, water consumption, smoking behavior, and transportation habits. The target label is the obesity category, which includes seven classes ranging from Insufficient_Weight to Obesity_Type_III. The original decision tree grew very large, so hyperparameter tuning and controlled depth were applied to improve interpretability and reduce overfitting. The decison tree is pretty large even with the hyperparameters, creating a more simplifiedversion would be best before presenting to individuals with no coding background.
Intended uses & limitations
[More Information Needed]
Training Procedure
[More Information Needed]
Hyperparameters
Click to expand
| Hyperparameter | Value |
|---|---|
| ccp_alpha | 0.0 |
| class_weight | None |
| criterion | entropy |
| max_depth | 9 |
| max_features | None |
| max_leaf_nodes | None |
| min_impurity_decrease | 0.0 |
| min_samples_leaf | 3 |
| min_samples_split | 10 |
| min_weight_fraction_leaf | 0.0 |
| monotonic_cst | None |
| random_state | 17 |
| splitter | best |
Model Plot
DecisionTreeClassifier(criterion='entropy', max_depth=9, min_samples_leaf=3,min_samples_split=10, random_state=17)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
DecisionTreeClassifier(criterion='entropy', max_depth=9, min_samples_leaf=3,min_samples_split=10, random_state=17)
Evaluation Results
[More Information Needed]
Figures
Confusion Matrix
Decision Tree
How to Get Started with the Model
from huggingface_hub import hf_hub_download
import skops.io as sio
hf_hub_download(repo_id='CSC310-fall25/obesity-classification', filename='model.pkl', local_dir='.')
dt_loaded = sio.load('model.pkl')
# X must contain the same feature columns used during training
predictions = dt_loaded.predict(X)
Model Card Authors
Kayleigh Carley
Model Card Contact
Citation
The Estimation of Obesity Levels Based on Eating Habits and Physical Condition was found on the UCI Machine Learning Repo. https://archive.ics.uci.edu/dataset/544/estimation+of+obesity+levels+based+on+eating+habits+and+physical+condition
Intended uses & limitations
The intended use for this model is educational use, possible tool for exploring health data, research, classification, and interpretability techniques. The model performs very well for higher-risk categories but is less accurate for lower-risk or borderline weight categories. The model is not intended for actual medical diagnosis or treatment decisions. Limitations include that normal-weight and neighboring overweight classes overlap, making them harder to classify. The data is also self reported, which may lead to bias or inaccuracies and is not ready to be used for real production.
Training Procedure
I trained a Decision Tree Classifier on the obesity dataset using 16 features related to demographics, behavior, and lifestyle. The data was split into 80% training and 20% testing, then hyperparameter tuning was performed to improve model performance and reduce overfitting. The target variable was the 7-class obesity category. Evaluation metrics included overall accuracy, confusion matrix, and classification report.
Evaluation Results
The optimized model achieves approximately 93% accuracy. Its performance is strongest on more distinct obesity categories and slightly weaker on categories that are closer together. An even more complex model could lead to higher accuracy, but it would be less interpretable and harder to present to medical professionals. I would trust this model as a decision support tool, but not as the sole basis for medical diagnosis because it can still make mistakes. This model is a supportive screening tool and would be beneficial to flag individuals who may need lifestyle changes or further medical evaluation.
- Downloads last month
- 36

