To create the required machine learning model I used a dataset from Kaggle which of course you can download at the link below
The information for each column is as follows:
-
Gender: Male/Female
-
Height: Number of body height in Cm
-
Weight: Number of body weight in Kg
-
Index: (0 : Extremely Weak, 1 : Weak, 2 : Normal, 3 : Overweight, 4 : Obesity, 5 : Extreme Obesity)
I created a pivot table to find out the number of genders, average height and weight of each target index.
I did parameter tuning with several models and the results are as shown in the image below.
Based on the accuracy, I decided to choose Support Vector Machine (SVM) with the model best parameter
After I train and evaluate the SVM model I have selected the tuning parameters. And produces results like the image below.
I deployed my model to a website using Flask. Below is a view of the website