{'fraction_non_alphanumeric': 0.031666874454556786, 'fraction_numerical': 0.011594564268794415, 'mean_word_length': 4.503602058319039, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Naive bayes methods for rainfall prediction classification in Banyuwangi

Banyuwangi is the largest district in East Java with an area of 5,782.50 km2. It has a long coastline of about 175.8 km which stretches along the southern eastern boundary of Banyuwangi Regency, and there are 10 islands. The BMKG estimates that the dry season in the Banyuwangi area is due to the appearance of the beach having hot weather and rarely rains. Banyuwangi also predicts that the dry season is due to the slight influence of cloud growth. Rainfall is a factor of the rainy season which has a big influence on life such as aviation, plantations and agriculture. Agriculture and plantations in Banyuwangi are mostly located in remote areas. Remote areas are likely to lack weather and climate data information. climate elements of a region cannot be ignored, especially rainfall. Based on data from BMKG (Meteorology, Climatology and Geophysics), the weather data used needs to be classified. Rainfall classification can be categorized into three, namely, light, normal and heavy. There are quite a lot of classification methods, there are several new methods that are quite good such as Naive Bayes (NB). Naive Bayes Classifier (NBC) is an algorithm in data mining techniques that is used to determine the probability of a member of a group. Large and irrelevant datasets can be solved using the Naive Bayes Classifier (NBC) method. The rainfall data used is known first, observed then identified to form a training dataset. Determining the accuracy of rainfall with the Naive Bayes Classifier (NBC) can use several parameters that have a physical relationship between the atmosphere and rainfall. The parameters used to determine rainfall are humidity, rainfall and precipitation. From this study, from 49 data testing, 47 data were predicted correctly with an accuracy of 96%.


Introduction
Banyuwangi is the largest district in East Java with an area of 5782.50 km². It has a long coastline of about 175.8 km which stretches along the southern eastern boundary of Banyuwangi Regency, and there are 10 islands. The Banyuwangi BMKG estimates that the dry season in the Banyuwangi area is due to the appearance of the beach having hot weather and rarely rains. Banyuwangi also predicts dry season due to a slight cloud growth. The emergence of the potential seeds of tropical storms and tropical storms that hit the northwestern region of Australia and low air pressure in northwest Australia has an impact on increasing wind speed, sea waves and also reducing cloud growth, so that sunlight is not blocked by clouds. This is what causes Banyuwangi to be dry, but its air is quite cold, because the heat absorbed by the earth from morning to evening will be released back into the atmosphere at night with more intensity. Therefore Banyuwangi has a wet dry season.
Wet dry means that rain can still occur during the dry season. Rainfall in the wet dry season is classified as light rain and normal rain. Rainfall is sediment or water sediment in liquid or solid form that comes from the atmosphere. Rain characteristics of an area need to be known to determine water availability and the possibility of problems and disasters related to water resources [10]. Rainfall is one of the factors in the rainy season which has a big impact on life, such as aviation, plantations and agriculture. Rainfall can hamper agricultural and plantation products. Farmers need information about rainfall to find alternatives in case of rainfall problems such as drought and excess water. Agriculture and plantations in Banyuwangi are mostly located in remote areas. Remote areas tend to lack information on weather and climate data. The climatic elements of an area cannot be ignored, especially rainfall. Based on BMKG data (Meteorology, Climatology, and Geophysics), the weather data used need to be classified. Classification is processing to find a model or function that describes and characterizes a concept or class of data, for a specific purpose. as done by Arsyad [1] who analyzed the characteristics and classification of rainfall in the Maros Karst Region and Sasminto [13] which determined the climate in Ponorogo with the Schmidt Ferguson and Oldeman classification. Classification has several methods, including the Naïve Bayes Classifier, Support Vector Machine, Artificial Neural Network, Classification Tree, K-Nearest Neighbor, Discriminant Analysis, and others. Marthin [5] compares the rainfall classification using the Support Vector Machine and Naïve Bayes Classifier methods.
The Naïve Bayes Classifier is suitable for forecasting rainfall because it does not require fulfilling assumptions like other classification methods such as discontinuity analysis. Related research was previously conducted by [3] entitled "Classification of Rainfall in Bali Province Based on the Naïve Bayesian Method". The results of Gunadi's research were the classification in the category of light and heavy rainfall, the system was able to classify well. The possibility that the yield is still low for the normal rain category lies in the data, there should be no significant difference between the three classes. It is necessary to retest with more data. Based on the above points, the authors are interested in conducting research on the classification of rainfall predictions in Banyuwangi using the Naive Bayes method. The data used is the rainfall data in Banyuwangi in the last one year which was obtained from BMKG.

Study Region Study Area Research location is in Banyuwangi
Regency. This district is located at the easternmost tip of the island of Java, in the Horseshoe area, and is bordered by Situbondo Regency in the north, the Bali Strait in the east, the Indian Ocean in the south and Jember Regency and Bondowoso Regency in the west. Banyuwangi Regency is the largest district in East Java as well as the largest in Java, with an area of 5,782.50 km². Geographically, Banyuwangi Regency is located at the coordinates 7º45'15 "-8º43'2" LS and 113º38'10 "East Longitude. Banyuwangi district is quite diverse, from lowlands to mountains. The border area with Bondowoso Regency, there is a series of Ijen Plateau with the peaks of Mount Raung (3,344 m) and Mount Merapi (2,799 m). Banyuwangi Has a long coastline of about 175.8 km that stretches along the southern eastern boundary of Banyuwangi Regency. The temperature in the lowland areas ranges from 20°C-34°C, while the highland areas have temperatures less than 19°C. The humidity level in Banyuwangi Regency varies between 73-84%. Based on the Koppen climate classification, almost the entire area of Banyuwangi Regency is included in the category of wet and dry tropical climate with two seasons, namely the dry season and the rainy season. The dry season in Banyuwangi Regency takes place from May to October with the peak of the dry season being August. Meanwhile, the rainy season in the Banyuwangi region takes place from November to April with the wettest month being January, where the monthly rainfall is more than 230 mm per month. The annual rainfall in the Banyuwangi region ranges from 1,000-1,600 mm per year with the number of rainy days varying from 80-140 rainy days per year.

Data Description
The data used in this research is secondary data obtained from the BMKG Banyuwangi Meteorological Station, the data taken is daily climate data and can be accessed on the website www.bmkg.go.id. The variables used in the study consisted of the dependent variable and the independent variable. Dependent variable (Y). In this study, the depositional status is divided into two categories, namely light rain, normal rain, and heavy rain. Independent variable (X). Used as many as four variables, namely rainfall, average humidity, and average wind speed. The stages of data analysis using the NBC method are as follows, Collect data. The data collection is then formed a dataset that will be used in the research. Descriptive analysis. This process is carried out on each variable. NBC method process. At this stage, both prior and posterior probability calculations are carried out. Because the data used are numerical data, the solution is using the Gaussian density. This process is carried out on each observation by calculating the average value and standard deviation. After the mean and standard deviation are found, the likelihood value is calculated. Next, calculate the posterior probability of each category (class) on the testing data. Then the next stage of normality of the posterior probability value for determining the category (class) that has the highest posterior probability value will become the category (class) of the data testing. After the NBC process is carried out, the results of the confusion matrix table will be obtained. The table is used to find the accuracy value for the NBC method. Naive Bayes Classifier which was first proposed by Revered Thomas Bayes. The use of the Naïve Bayes Classifier has been introduced since 1702-1761. Naïve Bayes Classification or also known as Bayesian Classification is a statistical classification method based on the Bayes theorem which can be used to predict the probability of class membership [4]. Meanwhile, Kononenko and Langley concluded that the Naïve Bayes Classifier is a possible data class label or it can be assumed to be a labeled class attribute [6]. Bayesian Classification is proven to have high accuracy and speed when applied to large databases [7]. Naïve Bayes Classifier is an algorithm in data mining techniques that applies the Bayes theory in classification [11]. NBC is reliable in handling large datasets and can handle irrelevant data. The symbol for X is an input vector containing data and Y is the class label. The equation of the Bayes theorem is as follows: Where : X = Data with unknown class Y = Data hypothesis X is a specific class P (Y│X) = probability of hypothesis H based on condition X (posterior probability) P (Y) = Hypothesis probability H (prior probability) To explain the Naïve Bayes method, it should be noted that the classification process requires a number of clues to determine what class is suitable for the sample being analyzed [12]. Therefore, the Naïve Bayes method above is adjusted as follows: P(Y j |X 1 , … , X n ) = P(Y)P(X 1 ,…,X n |Y j ) P(X 1 ,…,X n ) Where the variable Y j represents the class, while the variables X 1 , … , X n represent the characteristics of the instructions needed to perform classification. Then the formula explains that the chance of the entry of a certain characteristic sample in the Y j (Posterior) class is the chance of the Y j class (before the entry of the sample, it is often called the prior), multiplied by the probability of the occurrence of the sample characteristics in the Y j class (also called likelihood), divided by with the probability of the emergence of sample characteristics globally (also called evidence). Therefore, the formula above can also be written simply as follows: The Evidence value is always fixed for each class in one sample. The value of the posterior will later be compared with the values of the other posterior classes to determine which class a sample will be classified into. Further elaboration of the Bayes formula is carried out by describing (Y j |X 1 , … , X n ) using the following multiplication rules: P(Y j |X 1 , … , X n ) = P(Y j )P(X 1 , … , X n |Y j ) = P(Y j )P(X 1 |Y j )P(X 2 , … , X n |Y j , X 1 ) = P(Y j )P(X 1 |Y j )P(X 2 |Y j , X 1 )P(X 3 , … , X n |Y j , X 1 , X 2 ) = P(Y j )P(X 1 |Y j )P(X 2 |Y j , X 1 )P(X 3 |Y j , X 1 , X 2 )P(X 4 , … , X n |Y j , X 1 , X 2 , X 3 ) = P(Y j )P(X 1 |Y j )P(X 2 |Y j , X 1 )P(X 3 |Y j , X 1 , X 2 ) … P( X n |Y j , X 1 , X 2 , X 3 … X n−1 ) It can be seen that the results of this translation cause the complexity of the factors that affect the probability value, which is almost impossible to analyze one by one. As a result, these calculations become difficult to carry out. This is where the assumption of very high independence (naive) is used, that each point (X 1 , X 2 … , X n ) is independent of one another. With this assumption, one thing in common is as follows: For ≠ , so that From the above equation it can be concluded that the assumption of naïve independence makes the terms of the opportunity simple, so that the calculation becomes possible. Furthermore, the translation of ( | 1 , … , ) can be simplified to: So that the classification results are a class that produces a maximum probability value or can be expressed in the following equation: The equation above is a model of the Naïve Bayes theorem which will then be used in the classification process. For classification with quantitative or continuous data the Gauss Density formula is used: Where: = Opportunity = Attribute to = Attribute value to = Class sought = Y sub class you are looking for = The sample mean of the training data that belongs to

Confusion Matrix.
According to [9] the confusion matrix is a table that records the classification results. Generally, the measurement of classification performance is carried out with a confusion matrix. The confusion matrix is a table that records the results of the classification work. The following is the result of confusion matrix [8].  Actual is a classification of rain status which has been previously classified. Prediction is the result of the classification of the status variable produced by the program / software. From the formation of the configuration matrix, several other values can be calculated that can be used as classification performance values [2]. These values are as follows: a. Accuracy is the proportion of correct classification prediction. The accuracy formula is: b. Error Rate is the proportion of the classification making prediction errors, with the calculation of the following equation:

Dataset
The first stage in the data mining process is to understand the application domain to find out and explore initial knowledge and what the target users are. From the available data, humidity and rainfall are as data with an unknown class or as X, while precipitation is used as data hypothesis X which is a specific class or as Y.Local rainfall data used in this case starts from January 2020 to Last August, there were 245 data. The data obtained are daily data.

Prediction Classification
At this stage, I predict the data to classify or classify the data into three parts, namely light rain, normal rain, and heavy rain. The prediction of this class is obtained from processing humidity and rainfall.

Data Training and Data Testing
The training process is conducting the data training process on the model (naïve Bayes). While the testing process is to test data that will produce a graph or pattern. Daily rainfall data, divided into training data and testing data, 80% for training data, namely 196 data and 20% for testing data, namely 49. The local rainfall data plot is divided into three types of rain, namely light rain, normal rain and heavy rain. For light rain it is symbolized in red, and for normal rain it is symbolized by green, while for heavy rain it is symbolized in blue. The higher the rainfall and humidity, the heavier the rain will be, and vice versa, if the rainfall is low and the humidity is low, then the rain will be light. The yellow color in the plot indicates that the rainfall is high, and results in heavy rain. The results of this study can be seen from the confusion matrix. The above confirmation matrix states that 41 days of light rain, 5 days of moderate rain. And 1 day it rained heavily. From this figure, it can be explained that 41, 5, and 1, which are in the diagonal matrix, are correct predictions. While others predict wrong. So that the predicted data is correct as much as 47 days / data from 49 days / data. Meanwhile, 2 days / other data is predicted to be less precise, for 1 data it is predicted that light rain is supposed to be normal rain, while 1 data which is supposed to be heavy rain becomes normal