Machine learning in medicine using JavaScript: building web apps using TensorFlow.js for interpreting biomedical datasets

Authors

DOI:

https://doi.org/10.22456/2175-2745.133785

Keywords:

bioinformatics, TensorFlow, JavaScript, diabetes, medicine, machine learning, angular

Abstract

Contributions to medicine may come from different areas, and most of these areas are filled with researchers eager to contribute. In this paper, we aim to contribute through the intersection of machine learning and web development. We employed TensorFlow.js, a JavaScript-based library, to model biomedical datasets using neural networks obtained from Kaggle. The principal aim of this study is to present the capabilities of TensorFlow.js and promote its utility in the development of sophisticated machine learning models customized for web-based applications. We modeled three datasets: diabetes detection, surgery complications, and heart failure. While Python and R currently dominate, JavaScript and its derivatives are rapidly gaining ground, offering comparable performance and additional features associated with JavaScript. Kaggle, the public platform from which we downloaded our datasets, provides an extensive collection of biomedical datasets. Therefore, readers can easily test our discussed methods by using the provided codes with minor adjustments on any case of their interest. The results demonstrate an accuracy of 92% for diabetes detection, almost 100% for surgery complications, and 80% for heart failure. The possibilities are vast, and we believe that this is an excellent option for researchers focusing on web applications, particularly in the field of medicine.

Downloads

Download data is not yet available.

References

RIVERA, J. D. D. S. Practical Tensor-Flow.js: Deep Learning in Web App Development. https://www.amazon.com/Practical-TensorFlow-js-Deep-Learning-Development/dp/1484262727: Apress, 2020. 328 p.

CAI, S. B. S.; NIELSEN, E. D.; CHOLLET, F. Deep Learning with JavaScript: Neural net-works in TensorFlow.js. [S.l.]: Manning, 2020. 560 p. Available at ⟨https://www.amazon.com/Deep-Learning-JavaScript-networks-TensorFlow-js/dp/1617296171⟩.

LABORDE, G. Learning Tensorflow.Js: Powerful Machine Learning in JavaScript. https://www.amazon.com.br/Learning-Tensorflow-Js-Powerful-Machine-JavaScript/dp/1492090794: O’Reilly Media, 2021. 338 p.

PIRES, J. G. Alguns insights em startups um novo paradigma para a tríplice aliança ciência, tecnologia e inovação: a novel paradigm for understanding the triple alliance of science, technology and innovation. Revista Gestão

amp; Sa ́ude, v. 11, n. 1, p. 38–54, fev. 2020. Disponível em: ⟨https://periodicos.unb.br/index.php/rgs/article/view/28626⟩.

FAIN, Y.; MOISEEV, A. Angular Development with TypeScript. https://www.amazon.com/Angular-Development-Typescript-Yakov-Fain/dp/1617295345: Manning, 2018. 560 p.

PIRES, J. G. et al. Galaxy and mean stack to create a user-friendly workflow for the rational optimization of cancer chemotherapy. 2021. Disponível em: ⟨doi:10.3389/fgene.2021.624259⟩.

HARMAN, L. B.; FLITE, C. A.; BOND, K. Electronic health records: Privacy, confidentiality, and security. AMA Journal of Ethics, v. 14, n. 9, p. 712–719, 2012. Disponível em: ⟨https://journalofethics.ama-assn.org/article/electronic-health-records-privacy-confidentiality-and-security/2012-09⟩.

STRAUSS, B. How to Safely Collect and Store Patient Data. 2020. Accessed: 2023-12-18. Disponível em: ⟨https://www.egnyte.com/blog/post/how-to-safely-collect-and-store-patient-data⟩.

HAYKIN, S. Neural Networks and Learning Machines. 3rd. ed. [S.l.]: Pearson, 2008.

FULL interview: ”Godfather of artificial intelligence” talks impact and potential of AI. CBS Mornings, 2023. Accessed on 19 Dec 2023. Disponível em: ⟨https://www.youtube.com/watch?v=qpoRO378qRY⟩

KISTLER, W. M.; GERSTNER, W. Spiking Neuron Models: Single Neurons, Populations, Plasticity. [S.l.]: Cambridge University Press, 2002.

PIRES, J. G. Data Science using openAI: testing their new capabilities focused on data science. [S.l.]: Qeios, 2023. Preprint.

CHEN, W. et al. Nonlinear modeling using support vector machine for heart rate response to exercise. In: . Computational Intelligence and Its Applications. [s.n.]. p. 255–270. Disponível em: ⟨https://www.worldscientific.com/doi/abs/10.1142/9781848166929 0010⟩.

LING, S.; SAN, P.; NGUYEN, H. Hypoglycemia detection for insulin-dependent diabetes mellitus: Evolved fuzzy inference system approach. In: . Computational Intelligence and Its Applications. [s.n.]. p. 61–85. Disponível em: ⟨https://www.worldscientific.com/doi/abs/10.1142/9781848166929 0004⟩.

ALTY, S.; LAM, H.; PRADA, J. On the applications of heart disease risk classification and hand-written character recognition using support vector machines. In: . Computational Intelligence and Its Applications. [s.n.]. p. 213–253. Disponível em: ⟨https://www.worldscientific.com/ doi/abs/10.1142/9781848166929 0009⟩.

PALUMBO, P. et al. Mathematical modeling of the glucose–insulin system: A review. Mathematical biosciences, v. 244, 05 2013.

CAMPAGNA, D. et al. Smoking and diabetes: dangerous liaisons and confusing relationships. Diabetology Metabolic Syndrome, v. 11, n. 1, p. 85, 2019.

PIRES, J. G. Snakeface: a transfer learning based app for snake classification. bioRxiv, Cold Spring Harbor Laboratory, 2023. Disponível em: ⟨https://www.biorxiv.org/ content/early/2023/06/14/2023.06.13.544741⟩.

LUSIGNAN, S. de et al. Miscoding, misclassification and misdiagnosis of diabetes in primary care. Diabetic Medicine, v. 29, n. 2, p. 181–189, 2012. Disponível em: ⟨https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1464-5491.2011.03419.x⟩.

SEHRAWAT, T. et al. Utility and limitations of glycated hemoglobin (hba1c) in patients with liver cirrhosis as compared with oral glucose tolerance test for diagnosis of diabetes. Mathematical biosciences, v. 9, p. 243–251, 2018.

MEEHL, P. E. Clinical Versus Statistical Prediction: A Theoretical Analysis and a Review of the Evidence. [S.l.]: Echo Point Books Media, 2013.

KERMANY, D. S. et al. Identifying medical diagnoses and treatable diseases by image-based deep learning. Cell, v. 172, n. 5, p. 1122–1131.e9, 2018. Disponível em: ⟨https://doi.org/10.1016/j.cell.2018.02.010⟩.

CERCATO, C.; FONSECA, F. Cardiovascular risk and obesity. Diabetology & Metabolic Syndrome, Springer, v. 11, n. 1, p. 74, 2019.

SUNSTEIN, C. R.; KAHNEMAN, D.; SIBONY, O. Noise: A Flaw in Human Judgment. [S.l.]: Little, Brown Spark, 2021).

HOLMES, S.; HARBER, C. Getting MEAN with Mongo, Express, Angular, and Node. Shelter Island, NY: Manning Publications, 2019.

PIRES, J. G. Relat ́orio Final de p ́os-doutorado Programa Nacional de P ́os-doutorado PNPD/CAPES. [S.l.], 2018. Disponível em: ⟨https://www.researchgate.net/publication/329815289 Relatorio Final de pos-doutorado Programa Nacional de Pos-doutorado PNPDCAPES⟩.

GANS, J.; GOLDFARB, A. Prediction Machines: The Simple Economics of Artificial Intelligence. [S.l.]: Harvard Business Review Press, 2018.

WOLFRAM, S. What Is ChatGPT Doing ... and Why Does It Work? https://www.amazon.com/What-ChatGPT-Doing-Does-Work/dp/1579550819: Wolfram Research, 2023. 112 p.

PIRES, J. G. Could chatGPT play a medical doctor? 2023. Published in Computational Thinking: How computers think, decide and learn. Disponível em: ⟨https://medium.com/computational-thinking-how-computers-think-decide/could-chatgpt-play-a-medical-doctor-8dfcd8c95538⟩.

PIRES, J. G. Innovating with biomathematics: the challenge of building user-friendly interfaces for computational biology. Academia Letters, 2022. Disponível em: ⟨https://doi.org/10.20935/AL5792⟩.

PIRES, J. G. An informal survey presents the gap between computer and medical doctors and biologists. 2023. Published in Theoretical and Mathematical Biology (blog in Medium publication). Disponível em: ⟨https://bit.ly/3XfhCKH⟩.

PIRES, J. G. Biomechanics, Computational Intelligence, and Systems Biology with application on Vitreous Dynamics Using Java: an incipient discussion. 2014. Preprint in Academia Edu. Disponível em: ⟨https://www.academia.edu/ 8341040/Title Biomechanics Computational Intelligence and Systems Biology with application on Vitreous Dynamics Using Java an incipient discussion⟩.

BLANK, S.; DORF, B. The Startup Owner’s Manual: The Step-By-Step Guide for Building a Great Company. Illustrated edition. [S.l.]: Wiley, 2020. 608 p.

Downloads

Published

2024-03-11

How to Cite

Guerra Pires, J. (2024). Machine learning in medicine using JavaScript: building web apps using TensorFlow.js for interpreting biomedical datasets. Revista De Informática Teórica E Aplicada, 31(1), 32–49. https://doi.org/10.22456/2175-2745.133785

Issue

Section

Regular Papers