Classification of Foods Based on Nutritional Content Using K-Means and DBSCAN Clustering Methods - Fitria Nurulhikmah; Deden Nur Eka Abdi (Center for Research and Community Service, Institut Informatika Indonesia (IKADO) Surabaya, 2024)
This study classifies foods based on their nutritional content using K-Means and DBSCAN clustering methods. The clustering quality was evaluated using the Davies-Bouldin Index (DBI) and Silhouette Score. K-Means was tested with different k values, while DBSCAN was analyzed with varying min_samples parameters. Additionally, a function was developed to group foods into three categories: Weight Gain, Obesity Prevention, and Weight Loss, based on calories, protein, fat, and carbohydrate content. The results show that K-Means is more effective than DBSCAN in clustering foods by nutritional content, yielding lower DBI values and higher Silhouette Scores. For example, K-Means with k = 3 achieved a DBI of 0.694930 and a Silhouette Score of 0.538921, while DBSCAN with eps = 0.75 and min_samples = 4 produced a DBI of 0.34546577 and a Silhouette Score of 0.492830814. This study concludes that K-Means provides superior clustering performance, enabling more specific dietary recommendations tailored to individual nutritional needs.