Optimasi Hyperparameter Grid Search untuk Multi-Algoritma Klasifikasi Tingkat Hidrasi pada Daily Water Intake
Abstract
Water is a vital element for sustaining human physiological functions, ranging from metabolic processes to cognitive and physical performance. Insufficient daily water intake can trigger various health problems that significantly reduce individual well being. Machine learning provides a data driven approach to classify hydration levels more objectively based on individual and environmental attributes. This study evaluates and compares the performance of three classification algorithms Random Forest, Naive Bayes, and K-Nearest Neighbor in predicting hydration status (Good or Poor) using the Daily Water Intake public dataset comprising 30,000 samples. Class imbalance in the dataset (79.7% Good, 20.3% Poor) was addressed through SMOTE, while Stratified K-Fold Cross Validation with K=10 was employed for model evaluation. Hyperparameter optimization was performed using Grid Search, and model performance was assessed through accuracy, precision, recall, F1-Score, and AUC-ROC metrics. Results demonstrate that Random Forest achieved the highest accuracy of 99.50% and AUC-ROC of 0.9999 after optimization thanks to its ensemble mechanism, which captures non-linear relationships among features, outperforming Naive Bayes, which is constrained by its feature-independence assumption. KNN showed the most notable improvement post optimization with an accuracy gain of 0.62% (from 97.62% to 98.24%), while Naive Bayes remained unchanged at 83.53% as its optimal parameter matched the default value. These findings offer evidence based guidance for algorithm selection in hydration classification systems.
Downloads
References
A. Dolci, T. Vanhaecke, J. Qiu, R. Ceccato, R. Arboretti, and L. Salmaso, “Personalized prediction of optimal water intake in adult population by blended use of machine learning and clinical data,” Sci. Rep., vol. 12, no. 1, Dec. 2022, doi: 10.1038/s41598-022-21869-y.
Y. Zeng and F. Cheng, “Medical and Health Data Classification Method Based on Machine Learning,” J. Healthc. Eng., vol. 2021, 2021, doi: 10.1155/2021/2722854.
F. Sholekhah, A. D. Putri, R. Rahmaddeni, and L. Efrizoni, “Perbandingan Algoritma Naïve Bayes dan K-Nearest Neighbors untuk Klasifikasi Metabolik Sindrom,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 4, no. 2, pp. 507–514, Feb. 2024, doi: 10.57152/malcom.v4i2.1249.
P. A. Rakhma Devi, “Klasifikasi Penyakit Gagal Ginjal Kronis Dengan Metode Knn (Studi Kasus RS Di Kab Gresik),” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 9, no. 3, pp. 1739–1748, Sep. 2024, doi: 10.29100/jipi.v9i3.6226.
Sahar, “Analisis Perbandingan Metode K-Nearest Neighbor dan Naïve Bayes Classiffier pada Data Set Penyakit Jantung,” Indonesian Journal of Data and Science (IJODAS), vol. 1, no. 3, pp. 79–86, 2020.
V. Wulandari, W. J. Sari, Z. Alfian, L. Legito, and T. Arifianto, “Implementasi Algoritma Naïve Bayes Classifier dan K-Nearest Neighbor untuk Klasifikasi Penyakit Ginjal Kronik,” MALCOM: Indonesian Journal of Machine Learning and Computer Science, vol. 4, no. 2, pp. 710–718, Apr. 2024, doi: 10.57152/malcom.v4i2.1229.
A. F. Fadhlullah and T. Widiyaningtyas, “Comparative Analysis of Decision Tree and Random Forest Algorithms for Diabetes Prediction,” JTAM (Jurnal Teori dan Aplikasi Matematika), vol. 8, no. 4, p. 1121, Oct. 2024, doi: 10.31764/jtam.v8i4.24388.
Rohana Tatang, Novita Yulia Hilda, and Nurlaelasari Euis, “Komparasi Algoritma Machine Learning Dalam Memprediksi Kapasitas Produksi Potensial Air Bersih Di Indonesia,” Jurnal Teknologi Terpadu, vol. 11, no. 1, pp. 44–52, Jul. 2025, doi: 10.54914/jtt.v11i1.1732.
G. L. Pritalia, “Analisis Komparatif Algoritme Machine Learning pada Klasifikasi Kualitas Air Layak Minum,” 2022.
H. Hairani, T. Widiyaningtyas, and D. Dwi Prasetya, “Addressing Class Imbalance of Health Data: A Systematic Literature Review on Modified Synthetic Minority Oversampling Technique (SMOTE) Strategies,” JOIV: International Journal on Informatics Visualization, vol. 8, no. 3, pp. 1310–1318, Sep. 2024, doi: 10.62527/joiv.8.3.2283.
A. Syukron, E. Saputro, and P. Widodo, “Penerapan Metode Smote Untuk Mengatasi Ketidakseimbangan Kelas Pada Prediksi Gagal Jantung,” 2023. [Online]. Available: https://doi.org/10/25047/jtit.v10i1.312
A. Arisman, N. Nurhayati, and T. Tanti, “Analisis Klasifikasi Tingkat Hidrasi Manusia Menggunakan Algoritma Machine Learning Berbasis Dataset Asupan Air Harian,” Jurnal Minfo Polgan, vol. 14, no. 2, pp. 3533–3541, Jan. 2026, doi: 10.33395/jmp.v14i2.15829.
A. M. Argina, “Penerapan Metode Klasifikasi K-Nearest Neighbor pada Dataset Penderita Penyakit Diabetes,” Indonesian Journal of Data and Science, vol. 1, no. 2, pp. 29–33, Jul. 2020, doi: 10.33096/ijodas.v1i2.11.
N. Marito Putry and B. Nurina Sari, “Komparasi Algoritma Knn Dan Naïve Bayes Untuk Klasifikasi Diagnosis Penyakit Diabetes Melitus,” Jurnal Sains dan Manajemen, vol. 10, no. 1, 2022.
M. D. Purbolaksono, M. I. Tantowi, A. I. Hidayat, and Adiwijaya, “Perbandingan Support Vector Machine dan Modified Balanced Random Forest dalam Deteksi Pasien Penyakit Diabetes,” Jurnal RESTI, vol. 5, no. 2, pp. 393–399, Apr. 2021, doi: 10.29207/resti.v5i2.3008.
A. Ridwan, “Penerapan Algoritma Naïve Bayes untuk Klasifikasi Penyakit Diabetes Mellitus,” Jurnal Sistem Komputer dan Kecerdasan Buatan (SISKOM-KB), vol. 4, no. 1, pp. 15–21, 2020, doi: 10.47970/siskom-kb.v4i1.169.
A. Byna and M. Basit, “Penerapan Metode Adaboost Untuk Mengoptimasi Prediksi Penyakit Stroke Dengan Algoritma Naïve Bayes,” Jurnal Sisfokom (Sistem Informasi dan Komputer), vol. 9, no. 3, pp. 407–411, Nov. 2020, doi: 10.32736/sisfokom.v9i3.1023.
R. Irfannandhy, L. B. Handoko, and N. Ariyanto, “Analisis Performa Model Random Forest dan CatBoost dengan Teknik SMOTE dalam Prediksi Risiko Diabetes,” Edumatic: Jurnal Pendidikan Informatika, vol. 8, no. 2, pp. 714–723, Dec. 2024, doi: 10.29408/edumatic.v8i2.27990.
W. Nugraha and A. Sasongko, “Hyperparameter Tuning pada Algoritma Klasifikasi dengan Grid Search,” SISTEMASI: Jurnal Sistem Informasi, vol. 11, no. 2, pp. 391–401, 2022, doi: 10.32520/stmsi.v11i2.1750.
C. Z. V. Junus, T. Tarno, and P. Kartikasari, “Klasifikasi Menggunakan Metode Support Vector Machine Dan Random Forest Untuk Deteksi Awal Risiko Diabetes Melitus,” Jurnal Gaussian, vol. 11, no. 3, pp. 386–396, Jan. 2023, doi: 10.14710/j.gauss.11.3.386-396.
B. Pfeifer and M. Kreuzthaler, “Calibrated kNN classification via second-layer neighborhood analysis,” Adv. Data Anal. Classif., vol. 20, no. 1, pp. 145–165, Mar. 2026, doi: 10.1007/s11634-025-00654-5.
S. Shinde, "Daily Water Intake & Hydration Patterns Dataset," Kaggle, 2025. [Online]. Available: https://www.kaggle.com/datasets/sonalshinde123/daily-water-intake-and-hydration-patterns-dataset. [Accessed: Jan. 29, 2026].
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Optimasi Hyperparameter Grid Search untuk Multi-Algoritma Klasifikasi Tingkat Hidrasi pada Daily Water Intake
Pages: 774-785
Copyright (c) 2026 Julfiana Rizkiah Futri, Heni Sulistiani

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).








