Prediction of COVID-19 Using the Artificial Neural Network (ANN) with K-Fold Cross-Validation

nur alifiah
3 min readMar 27, 2024

--

COVID-19 is a disease that attacks the respiratory system caused by SARS-CoV-2. SARS-CoV2 is a coronavirus with a crown-like structure that is highly contagious [1]. The World Health Organization (WHO) officially declared that COVID-19, which had spread to various countries worldwide, was declared a pandemic on March 11, 2020 [2]. The first case of COVID-19 in Indonesia was reported on March 2, 2020, with one positive confirmed case. Cases of the spread of COVID-19 are increasing every day. The increase in COVID-19 cases cannot be predicted accurately, resulting in a shortage of services, facilities and medical personnel. This number will always increase if the community is not vigilant and plays an active role in reducing the rate of addition of confirmed cases [3]. Therefore, public awareness and vigilance need to be increased by presenting information on predictions of confirmed cases, recovered cases, and death cases in COVID-19 so that it can be used as a reference for the government in taking and establishing a policy to overcome the spread of COVID-19. Information, studies, and insights based on influencing factors can be obtained by making predictions. In addition, time series models are prone to overfitting, and if the outliers are not handled properly, it can result in inaccurate prediction results [4].

Along with developments in Artificial Intelligence (AI) and Machine Learning (ML), better techniques and algorithms have been developed. The ML model has an excellent track record as a predictive model [5]. Artificial intelligence is a technology-based machine with intelligence like human thinking. Artificial intelligence is very effective to use because it can minimize human error. Sub-fields in artificial intelligence include machine learning. Machine learning is an innovation from machines developed to learn to produce a model from a data set. The learning process in machine learning uses a special algorithm, more commonly called a machine learning algorithm [6].

The most frequently used machine learning algorithms are artificial neural networks (ANN). ANN can solve complex problems in various applications such as optimization, prediction, simulation, modelling, clustering, pattern recognition, and classification. We implemented ANN in this study to predict COVID-19 cases using the k-fold crossvalidation method to measure predictive model performance. K-Fold cross-validation is a popular method by folding data as much as k parts, where data testing uses one part and k-1 parts as training data, then each k will look for the accuracy levels to obtain an average accuracy [7]. Therefore, this allows each piece of data to become training and testing data. It is different using a data partition scheme of 80%: 20%, 70%: 30%, or 60: 40%. While partitioning the dataset into training data and testing data with this scheme, it is possible to lose some crucial data points for research purposes. Because there is data that are not included in the training data, the model cannot detect some patterns. As is well known, the accuracy of analysis and modelling is greatly influenced by data, so it is hoped that the prediction model built into this study will obtain more accurate results.

This study aims to predict and forecast COVID-19 cases using the Artificial Neural Network (ANN) method, especially for confirmed, recovered, and COVID-19 death cases in Lampung Province. This research is expected to get a good level of accuracy by applying K-Fold cross-validation as a testing method.

--

--