Decision Tree | Support Vector Machine (SVM) Classifier
- To Develop a model for estimating the obesity level in individuals between 14 and 61 and the affectation level of an individual based on several factors that propitiate the apparition of obesity problems, such as eating habits and physical condition, from anonymised survey data. Techstack: Python 3.7, numpy, pandas, matplotlib, sklearn, seaborn.
- I Implemented and evaluated a Multi-class Decision Tree Classifier with 76% accuracy and a Support Vector Machine (SVM) Classifier with 69% accuracy to estimate the obesity level of an individual using seven categories: Underweight-less than 18.5, Normal-18.5 to 24.9, Overwieght I-25.0 to 29.9, Overweight II-, Obesity I-30.0 to 34.9, Obesity II-35.0 to 39.9, Obesity III-higher than 40 based on the formula - body mass index = (weight/(height*height)), allowing a detailed analysis of the affectation level of an individual.
eating habits and physical condition dataset
❖ There are 17 features/attributes and 2111 records with 77% of data synthetically generated using the SMOTE filter for the balancing process to decrease the probability of skewed learning in favour of a majority class.
STEPS 1- Import libraries
- Fetch data and load CSV file in pandas data frame
- Data Wrangling: Transform and Analyse the data.
- Determine the Target variable and create an Explanatory variable
- Testing and Training data split
- Build Decision Tree and Support Vector Machine (SVM) multi-class classification models
- Run Predictions
- Evaluate the Models
- Visualise results