2. DATASET:
• This dataset includes percentage of fat intake
from different types of food in countries around
the world.
• The last couple of columns also includes
counts of obesity, undernourished, and COVID-
19 cases as percentages of the total population
for comparison purposes.
3. 1. Logistic Regression
2. Support Vector Machine
3. Decision Tree Classifier
4. K-Nearest Neighbours
5. Random Forest Classifier
Algorithms
applied:
4. This Photo by Unknown author is licensed under CC BY-NC-
ND.
Independent
variables:
6. Implementation:
• All the above mentioned
algorithms were imported from
sklearn module.
Code:
from sklearn.linear_modelimport
LogisticRegression from sklearn.svm import SVC
from sklearn.tree import DecisionTreeClassifier
from sklearn.neighbors import
KNeighborsClassifier from sklearn.ensemble
9. Logistic Regression:
• The accuracy of the testing data when the model is trained using logistic
regression is 89.30%
• While its Precision is 89.34%
Support Vector Machine:
• The accuracy of the testing data when the model is trained using SVM is
89.30%
• While its Precision is 89.31%
Decision Tree:
• The accuracy of the testing data when the model is trained using decision
tree is 84.70%
• While its Precision is 84.74%
10. K-Nearest Neighbours:
• The accuracy of the testing data
when the model is trained using KNN is
87.87%
• While its Precision is 87.91%
Random Forest:
• The accuracy of the testing data
when the model is trained using
Random Forest is 88.88%
• While its Precision is 88.90%
11. Conclusion:
• From the results we infer that logistic
regression and support vector machine are
the most accurate algorithms (89.30%).