Application of Machine Learning for Early Stress Detection in Cultured Fish Based on Water Quality Fluctuation Patterns

Authors

  • Rahmat Saleh Mopangga Aquaculture Technology Study Program, Muhammadiyah University of Gorontalo Author

Keywords:

Early Stress Detection, Machine Learning, Aquaculture, Water Quality, Random Forest

Abstract

Purpose: This study aims to develop a machine learning–based approach for the early detection of stress in cultured fish by analyzing fluctuations in key water quality parameters. Early identification of stress conditions is essential for maintaining fish welfare, reducing mortality, and improving the productivity of intensive aquaculture systems.

Subjects and Methods: This study employed a quantitative experimental approach to develop a machine learning–based model for the early detection of stress in cultured fish using water quality parameters. Water quality data, including dissolved oxygen, ammonia, pH, nitrite, and temperature, were continuously collected from an intensive aquaculture system using environmental sensors. Fish behavioral indicators were used to label stress and non-stress conditions. Three machine learning algorithms Random Forest, Support Vector Machine, and Artificial Neural Network were applied and evaluated using accuracy, precision, recall, F1-score, and AUC metrics.

Results: The results indicated that dissolved oxygen and ammonia were the most significant predictors of fish stress, while pH and nitrite played supporting roles in influencing stress dynamics. Among the tested models, the Random Forest algorithm demonstrated the highest accuracy and stability in predicting stress conditions. The model effectively captured nonlinear relationships and temporal patterns within the dataset. Based on this model, an early warning system was developed to detect potential stress several hours before visible physiological or behavioral symptoms occurred.

Conclusions: The integration of continuous water quality monitoring with machine learning techniques provides an effective predictive framework for aquaculture management, enabling proactive interventions, improving fish welfare, and supporting sustainable aquaculture practices.

References

Aftab, K., Tschirren, L., Pasini, B., Zeller, P., Khan, B., & Fraz, M. M. (2024). Intelligent fisheries: Cognitive solutions for improving aquaculture commercial efficiency through enhanced biomass estimation and early disease detection. Cognitive Computation, 16(5), 2241-2263. https://doi.org/10.1007/s12559-024-10292-2

Agarwal, D., Shanmugam, S. A., Kathirvelpandian, A., Eswaran, S., Rather, M. A., & Rakkannan, G. (2024). Unraveling the impact of climate change on fish physiology: a focus on temperature and salinity dynamics. Journal of Applied Ichthyology, 2024(1), 5782274. https://doi.org/10.1155/2024/5782274

Ahmed, U., Mumtaz, R., Anwar, H., Mumtaz, S., & Qamar, A. M. (2020). Water quality monitoring: from conventional to emerging technologies. Water Supply, 20(1), 28-45. https://doi.org/10.2166/ws.2019.144

Alnemari, A. M., Elmessery, W. M., Qazaq, A. S., Moustapha, M. E., Rakhimgaliyeva, S., Abuhussein, M. F., ... & Elwakeel, A. E. (2025). Developing highly accurate machine learning models for optimizing water quality management decisions in tilapia aquaculture. Scientific Reports, 15(1), 35600. https://doi.org/10.1038/s41598-025-16939-w

Anjarkasi, H., Dewantoro, E., & Lestari, T. P. (2025). The The effect of assembled diffuser diameter on water quality and growth performance of Nile tilapia (Oreochromis niloticus). Acta Aquatica: Aquatic Sciences Journal, 256-263. https://doi.org/10.29103/aa.v12i3.22380

Araújo‐Luna, R., Ribeiro, L., Bergheim, A., & Pousão‐Ferreira, P. (2018). The impact of different rearing condition on gilthead seabream welfare: Dissolved oxygen levels and stocking densities. Aquaculture Research, 49(12), 3845-3855. https://doi.org/10.1111/are.13851

Baena-Navarro, R., Carriazo-Regino, Y., Torres-Hoyos, F., & Pinedo-López, J. (2025). Intelligent prediction and continuous monitoring of water quality in aquaculture: Integration of machine learning and Internet of Things for sustainable management. Water, 17(1), 82. https://doi.org/10.3390/w17010082

Bal, A., Panda, F., Pati, S. G., Anwar, T. N., Das, K., & Paital, B. (2022). Influence of anthropogenic activities on redox regulation and oxidative stress responses in different phyla of animals in coastal water via changing in salinity. Water, 14(24), 4026. https://doi.org/10.3390/w14244026

Cabecinha, E., Lourenço, M., Moura, J. P., Pardal, M. Â., & Cabral, J. A. (2009). A multi-scale approach to modelling spatial and dynamic ecological patterns for reservoir's water quality management. Ecological Modelling, 220(19), 2559-2569. https://doi.org/10.1016/j.ecolmodel.2009.06.011

Dara, M., Carbonara, P., La Corte, C., Parrinello, D., Cammarata, M., & Parisi, M. G. (2023). Fish welfare in aquaculture: Physiological and immunological activities for diets, social and spatial stress on Mediterranean aqua cultured species. Fishes, 8(8), 414. https://doi.org/10.3390/fishes8080414

Deng, Y., Zhang, Y., Pan, D., Yang, S. X., & Gharabaghi, B. (2024). Review of recent advances in remote sensing and machine learning methods for lake water quality management. Remote Sensing, 16(22), 4196. https://doi.org/10.3390/rs16224196

Gul, S., Shafiq, U., Mir, S. A., Iqbal, G., & Lone, H. Q. (2024). Enhancing global food security through sustainable fisheries and aquaculture: A comprehensive review. Asian Journal of Agricultural Extension, Economics & Sociology, 42(10), 60-70. https://doi.org/10.9734/ajaees/2024/v42i102563

Hariyono, H., Candra, I. A., Mauliansyah, F., Wahyudin, Y., & Rizal, M. (2024). Transformasi Digital: Teori dan Implementasi pada Era Revolusi Industri 4.0 Menuju Era Society 5.0. Jambi: PT. Sonpedia Publishing Indonesia.

Hatta, M., & Irwansyah, D. (2025). Analisis Klasifikasi Kualitas Air dalam mengoptimalkan Pertumbuhan Ikan Berdasarkan Model K-Nearest Neighbor. Sisfo: Jurnal Ilmiah Sistem Informasi, 9(1), 63-76. https://doi.org/10.29103/sisfo.v9i1.22133

Helm, B., Ben-Shlomo, R., Sheriff, M. J., Hut, R. A., Foster, R., Barnes, B. M., & Dominoni, D. (2013). Annual rhythms that underlie phenology: biological time-keeping meets environmental change. Proceedings of the Royal Society B: Biological Sciences, 280(1765). https://doi.org/10.1111/raq.12730

Hossain, B., Sunny, A. R., Gazi, M. M. R. N., Das, A. R., Mohajon, R., Miah, A. T. H., & Rana, M. N. U. (2024). Advancing fish farming through deep learning: Applications, opportunities, challenges, and future directions. Pathfinder of Research, 2(3), 58-80. https://doi.org/10.69937/pf.por.2.3.39

Hossain, M. K., Islam, K. T., Hossain, M. D., & Rahman, M. H. (2011). Environmental impact assessment of fish diseases on fish production. Journal of Science foundation, 9(1-2), 125-131. https://doi.org/10.3329/jsf.v9i1-2.14655

Hridoy, M. A. A. M., Bordin, C., Masood, A., & Masood, K. (2025). Predictive modelling of aquaculture water quality using IoT and advanced machine learning algorithms. Results in Chemistry, 16, 102456. https://doi.org/10.1016/j.rechem.2025.102456

Jia, L., Yen, N., & Pei, Y. (2023). Spatial and temporal water quality data prediction of transboundary watershed using multiview neural network coupling. IEEE Transactions on Geoscience and Remote Sensing, 61, 1-16. https://doi.org/10.1109/TGRS.2023.3334291

Kyriazos, T., & Poga, M. (2024). Application of machine learning models in social sciences: managing nonlinear relationships. Encyclopedia, 4(4), 1790-1805. https://doi.org/10.3390/encyclopedia4040118

Mandal, A., & Ghosh, A. R. (2024). Role of artificial intelligence (AI) in fish growth and health status monitoring: A review on sustainable aquaculture. Aquaculture International, 32(3), 2791-2820. https://doi.org/10.1007/s10499-023-01297-z

Menon, S. V., Kumar, A., Middha, S. K., Paital, B., Mathur, S., Johnson, R., ... & Asthana, M. (2023). Water physicochemical factors and oxidative stress physiology in fish, a review. Frontiers in Environmental Science, 11, 1240813.

Mounce, S. R., Gaffney, J. W., Boult, S., & Boxall, J. B. (2015). Automated data-driven approaches to evaluating and interpreting water quality time series data from water distribution systems. Journal of Water Resources Planning and Management, 141(11), 04015026. https://doi.org/10.1061/(ASCE)WR.1943-5452.0000533

Muhammad, A., Khan, Z. U., Khan, J., Mashori, A. S., Ali, A., Jabeen, N., ... & Li, F. (2025). A comprehensive review of crop stress detection: Destructive, non-destructive, and ML-based approaches. Frontiers in Plant Science, 16, 1638675. https://doi.org/10.3389/fpls.2025.1638675

Mukherjee, J., Moniruzzaman, M., Chakraborty, S. B., Lek, S., & Ray, S. (2017). Towards a physiological response of fishes under variable environmental conditions: An approach through neural network. Ecological indicators, 78, 381-394. https://doi.org/10.1016/j.ecolind.2017.03.038

Nayoun, M. N. I., Hossain, S. A., Rezaul, K. M., Siddiquee, K. N. E. A., Islam, M. S., & Jannat, T. (2024). Internet of Things-driven precision in fish farming: A deep dive into automated temperature, oxygen, and pH regulation. Computers, 13(10), 267. https://doi.org/10.3390/computers13100267

Nusrat, I., & Jang, S. B. (2018). A comparison of regularization techniques in deep neural networks. Symmetry, 10(11), 648. https://doi.org/10.3390/sym10110648

Parvathy, A. J., Das, B. C., Jifiriya, M. J., Varghese, T., Pillai, D., & Rejish Kumar, V. J. (2023). Ammonia induced toxico‐physiological responses in fish and management interventions. Reviews in Aquaculture, 15(2), 452-479. https://doi.org/10.1111/raq.12730

Pradeepkiran, J. A. (2019). Aquaculture role in global food security with nutritional value: a review. Translational Animal Science, 3(2), 903-910. https://doi.org/10.1093/tas/txz012

Pratama, M. R. B., Alfatah, R. F., & Susila, J. K. R. (2024). Identifikasi Intensitas Makan Ikan Budidaya Akuaponik berdasarkan Kualitas Air dan Pergerakan Ikan. MIND (Multimedia Artificial Intelligent Networking Database) Journal, 9(2), 235-247. https://doi.org/10.26760/mindjournal.v9i2.235-247

Rahantoknam, S. P., Sembiring, K., Sabilu, K., Ihtifazhuddin, M. I., Putri, D. S., Takwin, B. A., ... & Diamahesa, W. A. (2025). Manajemen Akuakultur Payau: Integrasi Teknis, Ekologis untuk Budidaya Berkelanjutan. Maluku Utara: Kamiya Jaya Aquatic.

Rahman, M. M. (2025). Data analytics for strategic business development: a systematic review analyzing its role in informing decisions, optimizing processes, and driving growth. Journal of Sustainable Development and Policy, 1(01), 285-314. https://doi.org/10.63125/he1tfg25

Sampaio, F. D., & Freire, C. A. (2016). An overview of stress physiology of fish transport: changes in water quality as a function of transport duration. Fish and fisheries, 17(4), 1055-1072. https://doi.org/10.1111/faf.12158

Saputra, A. W., Purnamasari, A. I., & Ali, I. (2024). Implementasi Algoritma Naïve Bayes Untuk Memprediksi Kualitas Air Yang Dapat Di Konsumsi. JATI (Jurnal Mahasiswa Teknik Informatika), 8(1), 133-140. https://doi.org/10.36040/jati.v8i1.8292

Shreesha, S., Pai, M. M., Pai, R. M., & Verma, U. (2023). Pattern detection and prediction using deep learning for intelligent decision support to identify fish behaviour in aquaculture. Ecological Informatics, 78, 102287. https://doi.org/10.1016/j.ecoinf.2023.102287

Telaumbanua, M. (2025). Pengaruh Oksigen Terlarut (DO) dalam Budidaya Perairan. Jurnal Perikanan dan Kelautan, 2(1), 200-206. https://doi.org/10.70134/peraut.v1i1.691

Telaumbanua, N., & Zebua, D. (2026). Integrasi Sektor Perikanan Dan Pertanian Dalam Mendukung Ketahanan Pangan Dan Pembangunan Ekonomi Perdesaan. Jurnal Ilmu Manajemen dan Akuntansi Nusantara, 2(1), 224-228. https://doi.org/10.70134/jimakun.v2i1.1223

Vudugula, S., Chebrolu, S. K., Bhuiyan, M., & Rozony, F. Z. (2023). Integrating artificial intelligence in strategic business decision-making: A systematic review of predictive models. International Journal of Scientific Interdisciplinary Research, 4(1), 01-26. https://doi.org/10.63125/s5skge53

Wanja, D. W., Mbuthia, P. G., Waruiru, R. M., Mwadime, J. M., Bebora, L. C., Nyaga, P. N., & Ngowi, H. A. (2020). Fish husbandry practices and water quality in central Kenya: potential risk factors for fish mortality and infectious diseases. Veterinary medicine international, 2020(1), 6839354. https://doi.org/10.1155/2020/6839354

Wasilewski, T., Kamysz, W., & Gębicki, J. (2024). AI-assisted detection of biomarkers by sensors and biosensors for early diagnosis and monitoring. Biosensors, 14(7), 356. https://doi.org/10.3390/bios14070356

Zega, W. T. P., Napitupulu, V. N., Saribu, A. D., Siahaan, R. D. D., Manullang, T. T., Marpaung, I., ... & Simorangkir, P. (2025). Inovasi Dalam Pemasaran: Mengukur Kinerja Dan Meningkatkan Efisiensi Serta Produktivitas Bisnis Dengan Menggunakan Sistem MPA. Jurnal Daya Saing, 11(2), 445-451. https://doi.org/10.35446/dayasaing.v11i2.2255

Downloads

Published

2026-01-29

How to Cite

Application of Machine Learning for Early Stress Detection in Cultured Fish Based on Water Quality Fluctuation Patterns. (2026). Journal of Agrocomplex and Engineering, 2(1), 33-42. https://pppii.org/index.php/jae/article/view/204