Dengue Fever Prediction Using Naïve Bayes Algorithm 

Nirsal1,a), Suhardi2,b) Heliawaty3, c)

Author Affiliations 
1,2Universitas Cokroaminoto Palopo, South Sulawesi, Indonesia 
3Universitas Sulawesi Barat, Majene, West Sulawesi

Author Emails
a) Corresponding author: nirsal@uncp.ac.id 
b) suhardi@uncp.ac.id 
c) heliawatyhamrul@unsulbar.ac.id

Abstract. The main objective of this research is to develop a prototype Dengue Fever Disease Prediction System using data mining modelling techniques, Naïve Bayes. The research method used is to classify patient data into positive and negative classes based on the calculation of probability values. 9 variables used and symbolized in the form X1 to X9. This variable represents the symptoms of Dengue Fever disease. The results showed that the Naive Bayes algorithm can be used to predict Dengue Fever. This can be proven from the results of the dataset test which was carried out three times. The results of the first trial were 70 data training and 30 data testing and obtained  accuracy value is 90%. The results of the second trial were 50 data training and 50 data testing and obtained  accuracy value is 88%  and the third trial results were 40 data training 60 data testing obtained  accuracy value is 88.3%. 
intoduction

Dengue Fever is a health issue in Indonesia, where the the total of patiens  lean  to increase from year to year and its spread is very wide. In 2016 there were 204,171 cases of dengue fever with 1,598 deaths. The number of patients of dengue fever in 2016 lean compared to the number of patients in 2015 (129,650 cases) (Fatmawati and Windarto 2018).  Several research result that focus on diagnosis of Dengue Fever applied various data mining method for diagnosis and bring out different probabilities for different methods. One of the best classification techniques used in diagnosis of heart disease patients is Naïve bayes (Bhuvaneswari and Kalaiselvi 2012). Naive Bayes  is the base for  machine-learning and data mining techniques. Models with predictive capabilities is made using the rule of naïve bayes. Naïve Bayes provides new ways to analyze and understanding data (Langarizadeh and Moghbeli 2016). Fast calculation, simple algorithm and high accuracy are advantage of  Naive Bayes. The Naive Bayes Classifier is more appropriate to apply to large data and can handle incomplete data (missing value) and strong against irrelevant attributes and noise in data(Arifin and Ariesta 2019). This is also supported by the results of research which show that the accuracy level of the Naive Bayes algorithm is better after feature selection is carried out (Duwi Cahya Putri Buani 2018).
The aim of this  research is to build a prototype Dengue Fever Disease Prediction System using  Naïve Bayes rule.  This Prototype  can exploring and bring out hidden knowledge (patterns and relationships) associated with dengue fever disease from  historical medical records of patient. This prototype show report of the patient in chart  which indicates whether that particular patient having dengue fever or not. 

Decision support system in heart disease prediction  using Naive Bayesian method studied by G Subbalakshmi M (2011). The system extracts hidden information about heart disease database can be result by this system and this model is effective to predict patients with heart disease. Complex queries could answer with this model, each with its own strength with respect to ease of model interpretation, and this model access to spesific information and accuracy.
Previous study about classification techniques in data mining that used for medical diagnosis and predicting diseases studied  about classification algorithms namely Naïve bayes and Support Vector Machine (SVM) for liver disease prediction. Comparisons of these algorithms is focus on accuracy and execution time. Result of this research is SVM classifier have highest accuracy classification but Naïve Bayes needs minimum time to execution(Vijayarani 2015). Result research from Parthiban et al., (2011) proves that Naïve Bayes model was able to classify 74% of the input instances correctly. It exhibited a precision of 71% average, recall of 74% average, and F-measure of 71.2% on average. The results indicate that thenaive bayes model is more effectively compared to other similar model in the literature. The attributes taken for analysis are not direct indicators of heart disease. According to research by Jackins et al. (2021), medical domain can use data mining to discover and analyze information about diabetes, cancer dan hearth disease form big database. The goal of this research is to find out a techniques for diagnosis of diabetes, cancer and coronary heart disease from  available dataset. The dataset is chosen from online repositories. The techniques of pre-processing applied are filled in missing values and removing correlated columns. Next, the classifer is applied to the preprocessed dataset, and then  bayesian and random forest models are constructed. Finally, the accuracy of the models is calculated and analyses are based on the efciency calculations. Bayesian Classifcation network shows the accuracy of 74.46, 82.35 and 63.74% for diabetes, coronary heart disease and cancer data. Similarly, classifcation with Random forest model shows the accuracy of 74.03, 83.85 and 92.40. The accuracy outcome of Random forest model for the three diseases is greater than the accuracy values of Naïve Bayes classifer.

 method
The research method is shown in figure 1.

FIGURE 1. RESEARCH STAGES
The method used in this study was to collect data on patients who have symptoms of dengue fever from Majene Hospital and serve as a dataset. Furthermore, the dataset is grouped into training data and testing data. To avoid bias, the dataset is randomly selected. The variables were expressed as symptoms and labeled 0 if they had symptoms and 1 if they had no symptoms. Next, calculate the probability value and classify it into positive and negative classes.
result and discussion
This study used data from patients at Majene Hospital who were taken randomly. Furthermore, the data is used as training data and testing data. The training data consists of 9 attributes that represent the symptoms of Dengue Fever. The variables and attributes are shown in table 1.
TABLE 1.  RESEARCH ATRIBUT AND VARIABLES
Variable	Atribut	Values	
X1	Fever 4-7 days up to 40 degrees Celsius 	1	
		0	
X2	Redness face 	1	
		0	
X3	Body aches	1	
		0	
X4	Headache	1	
		0	
X5	Nausea 	1	
		0	
X6	Throat infection	1	
		0	
X7	Pain around the eyes	1	
		0	
X8	trombosit ≤ 100.000/mcl	1	
		0	
X9	Hematocrit increases up to 20%	1	
		0	
Y	diagnosis	1	
		0	
Table Information:
1: if the patient has Dengue Fever symptoms
0 : 1 if the patient has not DHF symptoms
Table 1 explains that the variable X represents the symptoms experienced by the patient. The number of patients who were used as training data was 10. Data training is shown in table 2
TABLE 2. DATA TRAINING 
Pasien	X1	X2	X3	X4	X5	X6	X7	X8	X9	Label	
1	1	1	1	1	1	1	1	70.2	68.9	Positive 	
2	1	1	1	1	1	0	1	66.4	87.4	Positive 	
3	1	1	0	1	0	1	0	178.2	41.6	Negative	
4	1	1	1	1	1	1	1	60.9	88.3	Positive 	
5	1	1	0	1	1	1	1	56.5	67.9	Positive	
6	1	1	0	1	0	1	0	190.2	50.9	Negative	
7	1 	0	1	1	1	1	1	80.0	77.2	Positive	
8	1	1	0	1	0	0	1	160.6	40.8	Negative 	
9	1	1	1	1	1	1	1	46.3	60.4	Positive	
10	1	0	0	1	1	0	1	153.8	52.5	Negative 	

Table 2 shows as many as 10 training data used. The negative class is 4 (four) data and the positive class is 6 data. The formula for calculating positive and negative likelihood prior probabilities uses equation 1.

	( 1 )

si is the amount of data training from Ci. s is the total amount of data training.
Negative Probability Calculation is :

P(C0) =  4/10 =  0.4
Positive probability calculations is: 
P(C1) = 6/10 = 0.6

The calculation of posterior probability is carried out on 10 data training with the equation:

	( 2 )
	
Information :
F (Xkj | Ci) is the value of the frequency of occurrence of Xkj data in the Ci category
F (Ci) is the number of data occurrences in the Ci category
| W | is the total number of data attributes used

So that the probability value is obtained. This values is shown in table 3 and 4.

TABLE 3. PROBABILITY VALUES
Label	Amount of Data	Amount of All data	Result	
Positif 	6	10	0,6	
Negatif 	4	10	0,4	
TABLE 4. PROBABILITY VALUES
Variable/Symtoms	Number of Cases	Probability	
X1	6/6	1/4	1	0.25	
X2	5/6	4/4	0.83	0.25	
X3	5/6	4/4	0.83	1	
X4	6/6	4/4	1	1	
X5	6/6	3/4	1	0.75	
X6	5/6	2/4	0.83	0.5	
X7	6/6	2/4	1	0.5	
X8	6/6	4/4	1	1	
X9	6/6	4/4	1	1	

Based on 50 data patient from Majene Hospital, data on dengue fever patients were obtained with a positive class is 35 and a negative class is 15. The data is shown in table 5.

TABLE 5. DATA TESTING
No	X1	X2	X3	X4	X5	X6	X7	X8	X9	DBD	
1	1	1	1	1	1	1	1	88.6	60.7	Positive	
2	1	0	1	1	1	1	1	120.7	56.1	Positive	
3	1	1	1	1	1	1	0	92.3	59.2	Positve	
4	0	1	1	1	0	1	1	182.0	40.3	Negative	
5	0	1	1	1	1	1	0	52.6	71.5	Positive	
6	1	0	1	1	1	1	1	76.3	62.8	Positive	
7	1	1	1	1	1	1	1	47.9	64.3	Positive	
8	1	   0	1	1	1	1	0	160.3	40.0	Negative	
9	1	1	1	1	1	0	1	56.8	56.8	Positive	
10	1	1	0	1	1	1	1	84.3	63.7	Positive	
11	1	1	1	1	0	1	1	54.4	74.9	Positive	
12	0	1	1	0	1	1	0	120.4	42.5	Negative	
13	0	1	1	1	1	0	0	170.3	39.3	Negative	
14	1	1	1	1	1	1	1	45.9	52.4	Positive	
15	1	1	1	1	1	1	0	52.4	62.2	Positive	
16	1	1	1	1	1	1	0	53.2	70.9	Positive	
17	0	0	0	1	1	0	1	170.3	40.1	Negative	
18	1	1	0	1	1	1	1	36.4	74.5	Positive	
19	1	1	1	1	1	1	1	51.2	71.8	Positive	
20	1	1	1	0	1	1	1	39.3	64.9	Positive	
21	0	1	1	0	1	1	0	164.1	50.2	Negative	
22	1	1	1	1	1	1	0	45.6	75.4	Positive	
23	1	1	0	1	1	1	0	57.5	60.2	Positive	
24	1	1	1	1	0	1	1	34.6	69.8	Positive	
25	0	1	0	1	1	0	1	78.3	52.5	Negative	
26	1	0	1	1	1	1	0	56.4	60.9	Positive	
27	1	1	1	1	1	1	1	72.3	80.1	Positive	
28	1	1	1	1	0	1	1	45.8	79.0	Positive	
29	0	1	1	1	0	1	0	184.3	45.5	Negative	
30	1	1	0	1	1	1	1	56.3	77.3	Positive	
31	1	0	1	1	1	1	1	54.4	61.1	Positive	
32	1	0	1	1	1	0	1	45.5	66.3	Positive	
33	0	0	1	1	0	1	1	140.4	40.4	Negative	
34	0	0	1	0	1	1	0	56.6	50.6	Negative	
35	1	1	1	1	1	1	0	52.3	58.4	Positive	
36	1	1	1	1	1	1	1	56.7	60.9	Positive	
37	1	1	0	1	0	0	1	109.3	45.0	Positive	
38	1	0	1	1	1	1	1	65.4	90.5	Positive	
39	0	1	1	1	1	1	0	145.4	39.8	Negative	
40	0	1	0	0	1	1	0	178.5	43.4	Negative	
41	1	1	1	1	0	1	1	85.4	86.7	Positive	
42	0	1	1	0	0	1	0	67.5	60.8	Negative	
43	1	1	1	1	1	0	1	45.4	90.1	Positive	
44	1	1	1	1	1	0	0	44.7	67.2	Positive	
45	0	1	1	0	0	0	0	63.6	46.0	Negative	
46	0	1	1	1	1	0	1	155.5	79.0	Positive	
47	1	0	1	1	0	1	1	34.5	88.5	Positive
	
48	0	1	1	1	0	0	1	187.3	40.3	Negative	
49	1	1	1	1	1	1	0	67.5	91.1	Positive	
50	1	1	1	1	1	1	1	44.6	43.2	Positive	

The testing data is randomly selected based on patient data and then tested to find out the accuracy results. A total of 100 patient data were used to predict a new data whose label or class was not yet known based on previous knowledge and learning (training data). The 100 data are divided into 50 testing data and 50 training data.

TABLE 6.  FIRST TRIAL RESULTS
Data	Data Training	Data Testing	Prediction Result	Accuracy	
100	70	30	1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1	90 %	

Table 6 shows that of the 100 data divided into 70 training data and 30 testing data with 9 selected parameters, the resulting predictions from 30 data are 1,1,1,0,1,1,1,1,1.1, 1,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1.  A value of 0 represents Negative Dengue Fever and a value of 1 represents Positive  Dengue Fever with an accuracy value of 90%.

TABLE 7. SECOND TRIAL RESULTS
Data	Data Training	Data Testing	Prediction Result	Accuracy	
100	50	50	1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,0,1,1,0,1,0,0,1,0,1,10,0,1,0,1,0	88 %	

Table 7 shows that from 100 data divided into 50 data training and 50 data testing with 9 parameters then the resulting predictions from 50 data are 1,1,1,0,1,1,1,1,1,1, 1,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1, 0,1,1,1,0,0,1, 1,0,1,0,01,0,1,10,0,1,0,1,0 A value of 0 represents Negative Dengue Fever and a value of  1 represents Positive  Dengue Fever with an accuracy value of  88%.
TABLE 8. THIRD TRIAL RESULT
Data	Data Training	Data Testing	Prediction Result	Accuracy	
100	40	60	1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0	88,3%	

Table 8 shows that from 100 data divided into 40 data training  and 60 data testing with 9 parameters then the resulting predictions from 50 data are 1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0  A value of 0 represents Negative Dengue Fever and a value of  1 represents Positive  Dengue Fever with an accuracy value of  88,3%.
Conclution 
The results showed that the Naïve Bayes algorithm can be used to predict dengue fever accurately. This is can be proven from the results of testing the dataset which was carried out three times. The first trial of 70 data training and 30 data testing yields a probability value with an accuracy of 90%. The second trial of 50 data training and 50 data testing yields a probability value with an accuracy of 88%. The third trial of 40 data training 60 data testing yields a probability value with an accuracy of 88.3%.. 

Acknowledgments
Thank you to The Universitas Sulawesi Barat  as an institution that has collaborated in this research.

References
1.	Arifin, Toni, and Daniel Ariesta. 2019. “PREDIKSI PENYAKIT GINJAL KRONIS MENGGUNAKAN ALGORITMA NAIVE BAYES CLASSIFIER BERBASIS PARTICLE SWARM OPTIMIZATION.” Jurnal Tekno Insentif 13(1):26–30. doi: 10.36787/jti.v13i1.97.
2.	2. Bhuvaneswari, R., and K. Kalaiselvi. 2012. “Naive Bayesian Classification Approach in Healthcare Applications.” International Journal of Computer Science and Telecommunications 3(1):106–12.
3.	Duwi Cahya Putri Buani. 2018. “Prediksi Penyakit Hepatitis Menggunakan Algoritma Naïve Bayes Dengan Seleksi Fitur Algoritma Genetika.” Evolusi : Jurnal Sains Dan Manajemen 6(2):1–5. doi: 10.31294/evolusi.v6i2.4381.
4.	Fatmawati, Kiki, and Agus Perdana Windarto. 2018. “Data Mining: Penerapan Rapidminer Dengan K-Means Cluster Pada Daerah Terjangkit Demam Berdarah Dengue (Dbd) Berdasarkan Provinsi.” Computer Engineering, Science and System Journal 3(2):173. doi: 10.24114/cess.v3i2.9661.
5.	G Subbalakshmi M. 2011. “Decision Support in Heart Disease Prediction System Using Naive Bayes.” 2(2):170–76.
6.	Jackins, V., S. Vimal, M. Kaliappan, and Mi Young Lee. 2021. “AI-Based Smart Prediction of Clinical Disease Using Random Forest Classifier and Naive Bayes.” Journal of Supercomputing 77(5):5198–5219. doi: 10.1007/s11227-020-03481-x.
7.	Langarizadeh, Mostafa, and Fateme Moghbeli. 2016. “Applying Naive Bayesian Networks to Disease Prediction: A Systematic Review.” Acta Informatica Medica 24(5):364–69. doi: 10.5455/aim.2016.24.364-369.
8.	Vijayarani, Dhayanand. 2015. “Liver Disease Prediction Using SVM and Naïve Bayes Algorithms.” International Journal of Science, Engineering and Technology Research 4(4):816–20.