Forecasting of The Crime Rate Using Automatic Clustering and Fuzzy Logic Relationship Method In North Sumatra

Currently the crime rate is very alarming and reported in various mass and electronic media. The high crime rate in the Province of Nort Sumatra is very unsettling for the community. The purpose of this research is to get the result of forecasting the crime ratel in the 2021 2024 using Automatic Clustering And Fuzzy Logic Relationship (ACFLR) method. The advantage of this method is that the method has a high level of accuracy because the Mean Absolute Percentage Error (MAPE) value is relative small and the results of forecasting analysis obtained in 2021 there are 31522 cases, in 2022 are 31533 cases, in 2023 are 31574 cases and the last one in 2024 was 31602 cases. In addition, the prediction error rate MAPE obtained is 0,35 %


INTRODUCTION
Forecasting serves to predict future event based on scientifically analyzed past data [2], [8]. Forecasting can be qualitative or quantitative. Qualitative forecasting is not in the form of numbers while forecasting is quantitative in the form of numbers and mostly show in digital form [6]- [8].
Fuzzy time series is new concept for forecasting using fuzzy logic, namely time series forecasting problems that is able to provide an explanation of fuzzy data and is presented in linguistic values and the fuzzy time series also captures patterns form past data and then uses them to forecasting future data [8]- [12]. In 1993, Song and Chissom introduced the fuzzy time series method for the first time, which was alleg-edly able to fill the short comings of the time series method [4], [9]. In 2009 Chen, Wang and pan introduced a new method, the method Automatic Clustering And Fuzzy Logic Relationship (ACFLR) [1]. Form several previous studies, it was concluded that the comparison of the ACFLR and ARIMA methods by Khairunnisa and Sunendiari showed that the lowest MAPE level was the ACFLR method and the highest was the ARIMA method. Likewise, Whib research that applies the ACFLR method for forecasting staple goods and Sihotang research in predicting gold prices and Abdy re-search which predicts the population of Makassar, they conclude that the error rate obtained is very small or more minimum [2].
The current crime rate is very concerning and is reported in various massa and electronic media. The varying levels of crime in North Sumatra Province are very disturbing for the surrounding community. Based on information from the Central Statistics Agency, Nort Sumatra is one of the areas with the highest crime percentage in Indonesia, with a crime rate at the provincial/polda level in 2017. The North Sumatra police recorded the highest crime rate with 38867 cases and was in first pisition at the National level, then in 2018 the North Sumatra police with 32922 cases was in sec-ond position at the National level. Meanwhile, in 2019 the North Sumatra police recorded a crime rate of 30831 cases and was ranked second at the National level and in 2020 recorded 32990 cases and was ranked first Nationally [7]. In a addtion, the rate of crime or violation reported by type of crime or violation in North Sumatra in 2020 was 31258 cases. Therefore, researchers will apply the Automatic Clustering And Fuzzy Logic Relationship (ACFLR) method to predict the crime rate in North Sumatera Province with the hope that the forecast results have high accuracy, so thvt they can control the crime rate in the future.

Automatic Clustering Algorithm (ACA)
Automatic Clustering Algorithm (ACA) first introduced by Chen, Wang and Pan which is a modification of the clustering algorithm. The steps can be explained as follows [1], [10], [11]: 1. Sort data from the smallest to largest and from the order of data the average difference is calculated. The formula is showed: 2. Converting data into cluster Take the first data (smallest data in ascending data sequence) to the current cluster. According to the average_diff value, determine whether the numbers in the ascending data sequence are included in the current cluster or placed in the new cluster according to the following principles: a. Suppose the current cluster is the first cluster, and there is only one data 1, and let 2 the data that is adjacent to the data 1 as follows then put 2 into the main cluster that is owned by 1. Let the new cluster for 2, and let the new cluster that is formed where 2 form the current cluster. b. Assume that the current cluster is not the first cluster, and there is only one data in this current cluster. Assume that is adjacent data after adjacent data, and assume that is data with the largest value among existing clusters in the data before the current cluster as shown Then put into the current cluster in it. Otherwise form a new cluster for and let the new cluster formed where is included as the current cluster. c. Assume that a current cluster is not the first cluster and there are multiple data sets in the current cluster. Assuming is the largest data cluster at this time, and assuming that is the newest data set after , it looks like .
If and in the current cluster, then place in the current cluster where is in it. Instead, form a new cluster for and leave the new cluster formed where belongs to the current cluster, where cluster_diff represents the difference in the mean distance between each pair of adjacent data in the cluster. It is assumed that the data in the current cluster is and the value of cluster_diff is formulated as follows: ( 2) 3. Improve the contents of the cluster According to the cluster results obtained in step 2, adjust the contents of the cluster according to the following principles. a. If the cluster has more than two data, it will use the smallest data, the largest data, and then delete the remaining data. b. If the cluster only has two data, then it is ignored (no change) c. If the cluster has only one data, put and into the cluster, then delete the value from this cluster. In addition, if this happens, the cluster will need to be readjusted.

Partitioning interval
For each interval obtained from step 4, then divide each interval into p subinterval where ≥1.

Automatic Clustering And Fuzzy Logic Relationship (ACFLR)
The next step is to calculate the forecast value using the Automatic Clustering And Fuzzy Logic Relationship (ACFLR) method after obtained the interval using the automatic clustering algorithm. The steps are as follows [5], [14]: 1. The set of universes is determined according to the existing data. Automatic Clustering Algorithm is used to create intervals from existing data and calculate the midpoint of each interval. 2. Fuzzification process, it is assumed that there are n intervals and then defines each fuzzy set which is as follows: 3. Fuzzification of each data into a fuzzy set, if an interval is included in the data when , then the data is fuzzified into a fuzzy set . Where the fuzzy set is a fuzzy set whose variables are determined from the state of the universe. 4. The basis for making a fuzzy logical relationship is by fuzzification of the existing data in the previous step with the results obtained from fuzzification with years t and t + 1, each fund, then and fuzzy logical relationship is formed where and each fund is called the current state and next states of fuzzy logical relationship. 5. The Defuzzification process is calculated based on the following principles: a. If the fuzzification value of year t is and there is only one fuzzy logical relationship in the fuzzy logical relationship group that has a current state of as shown forecasting value is year t + 1 is mk, where mk is the midpoint of the interval uk , and the maximum membership value of a fuzzy set Ak appears on the interval uk.
b. If the fuzzification value in year t is , and the following fuzzy logical relationship exists in the fuzzy logical relationship group having a current state as shown: (4) Then the forecast value from year t + 1 is calculated as follows: where xi is derived from the fuzzy logic relation . The set of fuzzy logical relations, and kp m is the midpoint of the interval between and and the maximum membership value of the fuzzy sets and are and respectively.

Sample Data
Orininal data is shown in table 1. Forecasting the crime rate in North Sumatra Province using ACFLR method If the automatic clustering algorithm has applied, then the following interval is formed: The next step, make intervals using the sub interval p = 8 where p ≥ 1 and the interval obtained is 64 intervals and calculate the mean value of each interval that has been obtained.  The next step is to create a fuzzy logic relationship group by looking at the current state of the previous fuzzy logic relationship.

MAPE (Mean Absolute Percentage Error)
MAPE (Mean Absolute Percentage Error) is one of the error measuring tools commonly used in determining the level of accuracy of the results of a study. The smaller MAPE level in a research result means that the accuracy of a research is getting better and better [3] The way to calculate MAPE is as follows:

IV. CONCLUSION
The forecasting results that have been obtained in the analysis of forecasting the crime rate in North Sumatra Province using the Automatic clustering and Fuzzy Logic Relationship method with a sub-interval p = 8 with a MAPE value of . for forecasting the crime rate in North Sumatra from 2021 to 2024. The results obtained in 2021 amounted to cases, in 2022 of cases, in 2023 of cases and the last in 2024 of cases.