Analysis of the Use of Particle Swarm Optimization on Naïve Bayes for Classification of Credit Bank Applications

−The selection of prospective customers who apply for credit in the banking world is a very important thing to be considered by the marketing department in order to avoid non-performing loans. The website www.kaggle.com currently provides South German Credit data in the form of supervised learning data. The use of data mining techniques makes it possible to find hidden patterns contained in large data sets, one of which is using classification modeling. This study aims to compare the classification of South German Credit data using the Naïve Bayes algorithm and compare the classification of South German Credit data using the Naïve Bayes algorithm with particle swarm optimization (PSO). The test was carried out using a confusion matrix to determine the accuracy, precision and recall values of the research model. Based on the test, it is known that PSO is able to increase the accuracy and recall of Nave Bayes, but PSO has not been able to increase the precision value of Nave Bayes. The test results show that PSO optimization gives Naïve Bayes an increase in the value of accuracy by 0.46%, and gives Naïve Bayes an increase in recall value by 3.02%.


INTRODUCTION
The banking marketing department needs to select prospective customers to find out which customers can be given credit financing by considering various factors. Credit financing is the provision of funds by the bank to the customer based on a loan agreement that requires the customer to repay the loan within a certain period of time. [1]. Therefore, the selection of prospective customers is needed so that a marketing bank is able to keep their customers from experiencing non-performing loans [2]. One way that can be used to reduce the possibility of nonperforming loans is to utilize data mining techniques, so that it is possible to mine information from pre-existing credit application data sets. [3].
In general, data mining is divided into two categories, namely predictive and descriptive. Predictive methods can be done with a classification model. The use of the classification model can be done by changing the data record into a set of the same class [4]. Nowsitewww.kaggle.com has provided the South German Credit data set consisting of 21 attributes with 800 instances of credit application and there is no missing value, so that it can be used to build a creditworthiness classification model [5]. The label attribute contained in the South German Credit data is the "Credit" attribute with 600 instances with the description "accepted" and 200 instances with the description "rejected", thus making South German Credit data including imbalance data.
It takes a good algorithm to create an optimal classification model. One algorithm that has been widely used for classification modeling with good performance is the Naïve Bayes algorithm. Several previous studies have stated that the Naïve Bayes algorithm is able to provide better classification performance when compared to other classification algorithms [6] [7] [8]. The Naïve Bayes algorithm can also be used on imbalanced data [9] [10], so it is suitable for classifying South German Credit data. Currently, independent assumptions are rarely discussed in the Naïve Bayes classification. One way to try independent assumptions in the Naïve Bayes algorithm is by attribute weighting [11]. It is necessary to propose an attribute weighting method to reduce the independent assumption [12]. One of the weighting optimization methods that can be used is to use particle swarm optimization (PSO). [13].
PSO has significant advantages in handling non-linear fittings and multi-input parameters [14]. PSO does not have evolution operators such as crossover and mutation, so it is easy to implement and there are very few parameters to adjust [15]. Based on several previous studies, it was stated that the combination of PSO and Naive Bayes was able to provide better imbalance data classification performance results than using Naive Bayes alone. [16] [17], even PSO is able to increase the accuracy of Naive Bayes by more than 10% [18].
Based on previous research showing that both PSO is able to improve classification performance on Nave Bayes, it is necessary to do further testing regarding the use of PSO optimas on Naïve Bayes for South German Credit data classification. This study will compare the Naïve Bayes classification on South German Credit data with and without PSO optimization.

A. Bank Credit Financing
The word credit comes from the Italian word credere which means trust. The trust referred to here is the trust of the creditor that the debtor will return the loan and the interest in accordance with the agreement that has been agreed by both parties. [19]. The implementation of the granting of credit is carried out through several steps, namely credit application, credit application examination, credit analysis, credit approval, credit realization and the last is credit supervision. [20]. In general, most of the bank's wealth is in the form of credit which is a source of bank income which is commonly referred to as productive assets. Management must use the precautionary principle so that loans are in the current category. Often there are several customers whose interest and principal payments are not smooth which makes them fall into the category of non-performing loans (NPL). The higher the NPL indicates the greater the potential loss, so the bank must be able to reduce its lending [21].

B. Data Mining
Data mining has been around since the 1990s as an effective way to extract previously unknown patterns and information from a data set [22]. Data mining is one of the most important fields in research that aims to obtain information from data sets. Data mining is the process of extracting meaningful information and structures in complex data sets [23]. In its implementation, data mining can use various parameters to examine data including association, classification and clustering. Data mining involves key steps which include problem definition, data exploration, data preparation, modeling, and evaluating and deployment [24].
Data mining techniques are used to find relationships between data to perform classifications that predict the values of several variables (classification), or to divide known data into groups that have similar characteristics (clustering). Using data mining techniques it is possible to search, analyze, and sort through large data sets to discover new patterns, trends, and relationships contained within them. [25].

C. Classification with Naïve Bayes
The Naïve Bayes algorithm is a supervised learning algorithm based on the Bayes Theorem with the assumption of independence between predictors. That is, features in a class do not depend on other features [26]. Naïve Bayes is widely used to solve classification problems in real-world applications, this is because it is easy to build and interpret data, and has good performance. [12]. The Naive Bayes classifier can also be used for continuous and categorical variables. It is based on the Bayes formula which is the probability of event A given proof of B which can be seen in the following equation [27]: Through equation (1) and using the concept of Bayes' theorem, the final equation of the Naïve Bayes algorithm is obtained as follows: Based on equation (2), it is known that A represents the class and B represents the instance. A is the dependent event which means the predicted variable and B is the previous event which means the predictor attribute. The last step of the Naive Bayes algorithm is to find the maximum probability that will be used as a predictor class.
D. Particle Swarm Optimization(PSO) Particle swarm optimization or commonly abbreviated as PSO is an optimization technique whose concept is based on the behavior of a swarm of insects, such as ants, termites, or bees. [28]. The PSO approach is like a collection of particles that simultaneously explore the problem search space with the aim of finding the optimal global configuration [29]. PSO has proven to be very effective in solving various engineering problems and solving them very quickly [30].
The basic assumption behind the PSO algorithm is that birds find food in groups and not individually. This gives rise to the assumption that information is shared in flocking. The herd initially has a population of random solutions. Each potential solution is called a particle (agent), is assigned a random velocity and is flown through the problem space [30]. All particles have a memory and each particle keeps track of the previous best position (Pbest) and the corresponding match value. Flock has another value called Gbest, which is the best value of all Pbests. By using this concept, PSO can provide a technique for solving attribute selection quickly.

II. RESEARCH METHODOLOGY A. Data used
This study uses secondary data in the form of a South German Credit data set taken from the sitewww.kaggle.com [5]. The number of data instances contained in the South German Credit data is 800 instances consisting of 21 attributes and there is no missing value, so there is no need for pre-processing data. Based on the existing 21 attributes, there is 1 label attribute contained in the South German Credit data, namely the "Credit" attribute. On the label there are 600 instances with the description "good" and 200 instances with the description "bad", so that the South German Credit data includes imbalance data.
South German Credit Data chosen because it is free from missing values, so there is no need for preprocessing data to be used in making classification models. As for more clearly about 21 attributes and 1 label from South German Credit data, it can be seen in Table 1.

B. Research Model
The classification model built in this study was carried out using South German Credit data. The label used is the attribute "Credit Risk" with the values "Good" and "Bad". As many as 77% of the instances in the South German Credit data are instances with the class label "good", while the rest are instances with the label "bad". Tests in this study were carried out 2 times which will later be analyzed the results obtained. The first test was carried out using Naïve Bayes with PSO optimization, while the second test was carried out using Nave Bayes without PSO optimization.
Spit validation used as a process of validating research data which aims to divide South German Credit data into training data and testing data. Split validation is used to divide South German Credit data into training and testing data with a comparison of 90% and testing data of 10%. The training data will be used for classification modeling using the Naïve Bayes algorithm. The resulting model is then used as an apply model for use in data testing. After the classification has been carried out, the performance of the formed classification model is measured in the form of accuracy, precision, and recall values.  Figure 1 and Figure 2 it shows that the testing in this study was carried out 2 times, namely: (1) Classification of South German Credit data using Naïve Bayes with PSO optimization, (2) Classification of South German Credit data using Naïve Bayes without PSO optimization. The performance results of the two tests will be compared and then analyzed to obtain research findings.

A. Testing Step
The testing tools in this study used RapidMiner version 5.0. The use of RapidMiner tools is done because RapidMiner can be used for rapid prototyping, and supports all steps of the data mining process [31]. The first step in making this research model is to call South German Credit data. The second step is to perform the multiply function to perform two tests at once, namely testing using PSO optimization and testing without using PSO optimization. The third step is to distribute the data into the split validation process. Validation process by dividing training data by 90% and testing data by 10% from South German Credit data. More clearly about the data calling and validation process in this study can be seen in Figure 3.

Figure 3. Data Calling and Validation Process
In each validation process in Figure 3, it contains a learning process using the Naïve Bayes algorithm which is then applied to the model to measure its accuracy, precision and recall performance. The learning process formed in this study can be seen in Figure 4. After the entire research model has been formed, the last step is to run the model that has been built in RapidMiner to see the results of its accuracy, precision and recall.
B. Test result After 2 tests, the accuracy, precision, and recall values of the two models were obtained. More complete test results can be seen in Table 2 Based on Table 2, it can be seen that PSO is able to increase the accuracy and recall of Nave Bayes, but PSO has not been able to increase the precision value of Nave Bayes. The test results show that with an accuracy of 85.89%, PSO optimization gives Naïve Bayes an increase in accuracy value of 0.46% and an increase in recall value of 3.02% for South German Credit data classification. However, it turns out that the use of PSO also reduces the precision value by 1.14% from the use of Naïve Bayes for South German Credit data classification. This is presumably because of the 20 attributes (non attribute labels) in the South German Credit data, it turns out that there are only 5 attributes that are weighted by PSO. This weighting result also explains why the increase in accuracy and recall provided by PSO is not too large.
In Table 3 it can be seen that there are only 5 attributes that are weighted by PSO. This shows that, based on PSO optimization, these 5 attributes are the most important to consider when classifying South German Credit data. The attributes are: credit history, savings, property, age, and job.

C. Results Discussion
Based on the results of the tests that have been carried out, it is known that the use of PSO optimization on Nave Bayes for the classification ofSouth German Credit data is able to improve the performance of Naïve Bayes in terms of accuracy and recall even though it is not too big. The small increase in performance given by PSO is thought to be because the attributes that are weighted by PSO are only 5 attributes out of 20 predictor attributes in South German Credit data. This makes the probability calculation process on Naïve Bayes become irrelevant. Even looking at the precision side, it turns out that the use of PSO optimization actually makes Naïve Bayes' precision performance decrease.
Although the optimization of PSO does not give maximum results, by using PSO it can be seen which attributes can be used as evaluation priorities to consider loan application approval. By looking at the attributes given the weighting by PSO, it can be used as a reference to consider these attributes as the main focus to avoid the risk of non-performing loans. The attributes that are given weighting by PSO are: credit history, savings, property, age, and job. This finding is expected to provide a practical contribution to the decision to provide credit by marketing parties in order to minimize the occurrence of non-performing loans.

IV.
CONCLUSION This research has tested the use of Naïve Bayes algorithm and PSO optimization to classify South German Credit data. Based on the tests that have been carried out, some results are shown as follows: 1. PSO optimization is able to improve the performance of Naïve Bayes in classifying South German Credit data in terms of accuracy and recall, although it does not have a big impact. 2. This study found that the use of PSO has not been able to improve the performance of Naïve Bayes in classifying South German Credit data in terms of precision, even the precision performance of Nave Bayes has decreased in value.