Sebuah Kajian Pustaka: IT Journal Research and Development (ITJRD) Vol.7, No.2, March 2023, E-ISSN : 2528-4053 | P-ISSN : 2528-4061 DOI : 10.25299/itjrd.2022.10544 170 Journal homepage: http://journal.uir.ac.id/index/php/ITJRD Apriori to Analyze Sales Patterns of Building Tools and Materials Abdul Halim Hasugian1, Muhammad Siddik Hasibuan2, Siti Nurhaliza Sofyan3 Faculty of Science and Technology, Universitas Islam Negeri Sumatera Utara abdulhalimhasugian@uinsu.ac.id1, muhammadsiddik@uinsu.ac.id2, sitinurhalizas102@gmail.com3 Article Info ABSTRACT Article history: Received Sept 15, 2022 Revised Nov 05, 2022 Accepted Dec 31, 2022 The accumulation of transaction data on the sale of building tools and materials, which is increasing day by day, should be used as information that can support sales in stores. Consumer purchasing patterns are the main source of data processing. In this study, it is necessary to have a system to process the transaction data based on trends that appear simultaneously in one transaction. The data used is 1000 sales data from December 2020 to May 2021 by calculating the minimum value of support and minimum confidence as a benchmark in the apriori algorithm process, results obtained are in the form of output which is an association rule that will be used by the store. Input the data in the application after that obtain results item set combination. After that these are obtained by calculating the minimum support. The results obtained are processed again with minimum confidence then the results are being final results of association rules that can be used by stores. If the minimum support is 0.1 (10%) and the minimum confidence is 0.5 (50%), then 122 association rules are obtained, one of which is in the 100th order, "If a customer buys a VSB Board, the customer also buys Jumbo Furing with a support value of 23, 3% and a confidence value of 82.9%”. Association rules as the final result are to evaluate, carry out sales strategies, alternative decisions in stocking goods and determine the placement of goods close together. Keyword: Data Mining Apriori Algorithm Pattern of Sales Building Tools and Materials © This work is licensed under a Creative Commons Attribution- ShareAlike 4.0 International License. Corresponding Author: Siti Nurhaliza Sofyan Faculty of Science and Technology Universitas Islam Negeri Sumatera Utara Jl. Lapangan Golf No.120, Kp.Tengah, Kec. Pancur Batu, Kab.Deli Serdang, Sumatera Utara sitinurhalizas102@gmail.com 1. INTRODUCTION The purchase of tools and building materials is motivated by consumers with different needs, such as repairing work spaces, renovating houses, making houses, making buildings and so on depending on different consumer needs. With many transactions in sales, therefore we need a system that can process the pile of data into information that can be used also to analyze sales patterns, so as to increase sales at Sakha Bangunan. One of them is by applying data mining techniques. Data mining is a process that uses statistical, mathematical, artificial intelligence and machine learning techniques to extract and identify useful information and related knowledge from various large databases[1]. This method can help to identify certain patterns in large data sets. mailto:abdulhalimhasugian@uinsu.ac.id mailto:muhammadsiddik@uinsu.ac.id mailto:sitinurhalizas102@gmail.com IT Jou Res and Dev, Vol.7, No.2, March 2023 : 170 - 180 Apriori to Analyze Sales Patterns of Building Tools and Materials, Siti 171 Association rules are a procedure to find relationships between items in a specified data set[2]. The apriori algorithm one of the algorithms that performs frequent item set searches using association rule technique[3]. Data mining can be solve to help store for analyze patterns from sales data stored in store databases and process the contents of the sales transaction data into new knowledge about the pattern of sales associations of an item with other items. [4] [5] Data mining can help store to analyze patterns from sales data stored in store databases and process the contents of the sales transaction data into new knowledge about the pattern of sales associations of an item with other items. Association rules are often referred to as "Market Basket Analysis", which is used to find relationships or correlations between a set of items. Market basket analysis is an analysis of customer buying habits by looking for associations and correlation between different items that customers place in their baskets[6]. 2. RESEARCH AND METHOD In previous research[1] used an apriori algorithm that is based on charts in the bestselling Glasses brands. Then, in previous studied [3] using the apriori algorithm to determine the type of fish most in demand at UD. Mumu Jaya Pandeglang is designed with UML (Unified Modeling Language) modeling made using Borland Delphi 7 and Database using MySQL. This application helps UD in determining the type of fish that is most in demand. This study discusses [5] the Implementation of Rapid miner with the K-Means Method (Case Study: Measles Immunization in Toddlers by Province). The clustering process carried out using the rapid miner resulted in the conclusion that high clusters received more attention and increased socialization of measles immunization to toddlers. In the different journal [6] this study utilizes two data mining techniques, namely the implementation of the Apriori algorithm and the CLHM algorithm (Centroid Linkage Hierarchical Method) for data clustering. In this study, the clustering technique was used first using the CLHM algorithm, so that the data used for the association rules was well clustered in looking for links or relationships between different items. the ultimate goal of research is decision-making support solutions. Then [7] this study is data mining application can classify STMIK Dipanegara Makassar students who can graduate on time and who can’t graduate on time using the Naive Bayes Classifier Algorithm. Based on the results of accuracy testing. There are factors that influence the graduation of STMIK Dipanegara Makassar students not only from academic factors but also non- academic factors. From [8] the test results, it can be concluded that the CE application in SVM is able to classify two classes of data with accuracy comparable to the standard SVM method. Then, this method is able to solve problems with faster computation time than standard SVM for big data. [9] The results of this cluster are used as a reference for student recommendations in taking the topic of thesis title. [10] this study using FP-Growth Algorithm in purchasing decisions withdrawal clay, for [11] this research was done on RDBMSS Oracle utilizing TKPROF tools to measure query performance based on I/O operation using apriori algorithm, [12] for sales in retail companies using apriori algorithm, then [13] the Apriori algorithm was applied to find frequent itemset in association rule mining for market base analyze, then [14] regarding fertilizers that are often purchased simultaneously it is done using association rules, then [15] using the weka application to provide drug suitability information for diseases based on the most frequently purchased drugs. Next [16] knowing the relationship between menus using the PHP programming language, then [17] increase shoes sales using the apriori algorithm and the last [18] for predict weather. This research is different with another research because this researching purchase of tools and building materials, that’s help the store can make stock and arrange the tools near each other. This research is rare found and easy for user using to looking for association rule or the results or these can make conclusion. This research using Rapid miner as a processing tool it’s not difficult for user learn about the application. The level of accuracy of the results in this study reached the highest level of accuracy, which can be set with the Min.Criterion Value on the rapid miner display. The association results displayed vary from data, graphs, descriptions and annotations. IT Jou Res and Dev, Vol.7, No.2, March 2023 : 170 - 180 Apriori to Analyze Sales Patterns of Building Tools and Materials, Siti 172 3. RESULT AND ANALYSIS The benchmarks in the association search process are support and confidence. Support is a measure that shows how big the level of dominance of an item or item set from the whole transaction while confidence is a measure that shows the relationship between two items conditionally (based on certain conditions). High-frequency pattern analysis looking for a combination of items has been found the minimum requirements of the support value in the database. The support value of an item is obtained by the following formula: 𝑆𝑢𝑝𝑝𝑜𝑟𝑡(𝐴) = 𝚺 Transaction Contain Value A 𝚺 Transaction X 100% (1) While the support value of 2-item is obtained from the following formula: 𝑆𝑢𝑝𝑝𝑜𝑟𝑡(𝐴 𝑈 𝐵) = 𝚺 Transaction Contain Value A and B 𝚺 Transaction X 100% (2) The next step to find association rule that find the minimum requirements for confidence by calculating the confidence of the association rule A U B. The confidence value of the A U B rule obtained by the following formula. 𝐶𝑜𝑛𝑓𝑖𝑑𝑒𝑛𝑐𝑒 𝑃(𝐵|𝐴) = Transaction Contain Value A and B 𝚺 Transaction Contain Value A X 100% (3) 3.1 Sales Pattern Analysis Design In designing the analysis of the pattern of sales of building tools and materials using apriori algorithm using rapid miner application, following steps are carried out: (1) create tabular data in Microsoft Excel format contain data on sales of building tools and materials that have been grouped; (2) determine benchmark for data analysis transactions where reference is the form of name product as a benchmark; (3) testing process, conduct the data testing process using the rapid miner application and calculated manually; (4) the results from the tests carried out are conclusions. 1. Tabular Data Make tabular format based on data existing transactions, the format will be formed tabular corresponding apriori algorithm. if we buy then we sign with (1) and if we sign with (0) it’s means the item didn’t buy [15]. Some samples of transaction data [16] for sales of building tools and materials are made in tabular tables in Microsoft Excel format as shown below: Table 1. Sample Tabular Format of Transaction Data Pattern of Sales of Building Tools and Materials Jayaboard Acoustic Grapes Aplus Brush Tub Bathub Bamboo Brick Be glass white 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 IT Jou Res and Dev, Vol.7, No.2, March 2023 : 170 - 180 Apriori to Analyze Sales Patterns of Building Tools and Materials, Siti 173 0 1 0 0 1 0 0 0 2. Benchmark Analysis The benchmark apriori algorithm in this study is based on the minimum support and minimum confidence that will be inputted before starting the rapid miner. Manual calculations with calculations using rapid miners in the study obtained the same results, meaning that the level of accuracy of the test was high. 3. Testing Process The application used in the Rapid Miner Studio Educational 9.8.001 as research did by [20]. This process consists of several stages, namely: (1) add data is a process of retrieving tabular data that has been saved in Microsoft Excel data format; (2) selecting data, namely selecting the data to be used; (3) the apriori algorithm process, namely entering operators and functions and then connecting them together to produce the results of the association rules carried out on the work space; (4) start is the process of running the entire apriori algorithm calculation. 3.2 Block Diagram Figure 1. Block diagram of Sales Patterns on the Apriori Algorithm Step of research as in research like[17]. The explanation of the block diagram above is as follows: 1. Data collection, collecting transaction data to be processed 2. Preprocessing data, before data processing is carried out, data preprocessing is carried out so that there is no duplication, human error in data entry, lost/damaged data or data discrepancies 3. Transformation data, then data is processed into numbers 0 and 1 which that’s means if 1 = buy and 0 = didn’t buy then data is processed 4. Process, at this stage the data is processed and then will produce association rules 5. Result, is a conclusion or evaluation of the results of apriori algorithm which becomes new knowledge. Block diagram above as same as [18]. Collected Data Preprocessing Data Data Transformation Process: 1.Item set frequency 2.Association rule Result IT Jou Res and Dev, Vol.7, No.2, March 2023 : 170 - 180 Apriori to Analyze Sales Patterns of Building Tools and Materials, Siti 174 3.3 Flowchart Figure 2. Apriori Algorithm Flowchart 3.4 Results The Apriori algorithm uses the previously known attribute frequency knowledge to process further information. The apriori algorithm determines candidates which selected by paying attention to the minimum support and minimum confidence. Support is the support value or percentage of combination from an item in the database. Confidence is value of certainty, namely the strength of the relationship between items in the formed associative rules. The apriori algorithm is one of the algorithms that performs frequent item set searches using the association rule technique[3]. The results of analysis obtained are if the minimum support is high, the result from item set is low due to the large number of product data so the result from combinations are many with low frequency of occurrence, while if minimum confidence is high, more better in forming association rules because confidence is supporting value in determine from selection an item set. When minimum of the higher from Criterion Value is set, the less association rules results are obtained because only the association rules obtained that have a high frequency are displayed. The association rules above can be used to develop a sales strategy in the form of arranging adjacent goods in accordance with the association rules and also providing stock of tools and buildings at the Sakha Building store. 3.5 Discussion After the testing process for this research is carried out, this section will discuss in detail the process of implementation data mining in analyzing sales pattern of building tools and materials. The following will be discussed: 1. Calculation After determining the minimum support and minimum confidence, calculations are carried out to find 1-itemset combination to get the support value for each item as an example below: 1.Support (Akustik Jayaboard) = (82 /1000) * 100% = 8.2% IT Jou Res and Dev, Vol.7, No.2, March 2023 : 170 - 180 Apriori to Analyze Sales Patterns of Building Tools and Materials, Siti 175 2.Support (Profil Anggur) = (61 / 1000) * 100% = 6.1% Item sets that have been qualified requirements will be combined between item sets and then calculation process will be carried out to find 2 combinations of item sets as follows: Table 2. Candidates Combination 2 Itemset Numbers Materials Amount Calculation Support 1 Batubata , Cat NoDrop 10 (10/1000) * 100% 1% 2 Batubata , Cat Putih 21 (21/1000) * 100% 2.10% 3 Batubata , Furing Jumbo 37 (37/1000) * 100% 3.70% After obtaining 2 combinations have been qualified the minimum support formula, then looking for the confidence value which will become association rule, example calculation as follows: Table 3. Calculation Of Finding Confidence Numb er Materials Amoun t Calculation Confid ence 1 Cat Putih , Furing Jumbo 141 (141/184) * 100% 76,63% 2 Cat Putih , Papan VSB 130 (130/184) * 100% 70,65% 3 Cat Putih , Tepung 150 (150/184) * 100% 81.52% After calculating confidence from above, we get a 2-itemset combination have been qualified the minimum confidence requirements, then those have been qualified requirements will become association rules as in the following example: Table 4. Confidence Value Of 50% Eligible Num ber Materials Amount Confidence 1 Cat Putih , Furing Jumbo 141 76,63% 2 Cat Putih , Papan VSB 130 70,65% 3 Cat Putih , Tepung 150 81.52% Then association rules are as follows: Table 5. Association Rules Numbers Association Rules Support Confidence 1 If the customer buys Cat Putih then customer also buys Furing Jumbo 14,10% 76,63% 2 If the customer buys Cat Putih then customer also buys the Papan VSB 13% 70,65% 3 If the customer buys Cat Putih then customer also buys Tepung 15% 81,52% IT Jou Res and Dev, Vol.7, No.2, March 2023 : 170 - 180 Apriori to Analyze Sales Patterns of Building Tools and Materials, Siti 176 2. Adding data Import data is carried out to retrieve data that has been stored in the format (*.xlsx) in Microsoft Excel in the form of numbers 1 and 0. Number 1 means that the item(s) is sold, while number 0 means that the item(s) is not purchased. 3. Apriori algorithm process Figure 3. Worksheet View After all the functions was process, next step is input a minimum support value of 0.1 in the FP-Growth parameters and a minimum confidence of 0.5 in the Create Association Rule parameters. The next step is to press the blue "Start" button located at the top left to run the apriori algorithm program command. The worksheet looks like the following image: Figure 4. Display Results of Create Association Rule - Data Here are some descriptions in Figure 4: IT Jou Res and Dev, Vol.7, No.2, March 2023 : 170 - 180 Apriori to Analyze Sales Patterns of Building Tools and Materials, Siti 177 Table 6. Association Rules Number Premises Conclusion Suppor t Confiden ce 21 Tepung Furing Jumbo, Papan VSB 0.189 0.549 22 Kasa Tepung, Furing Jumbo, Papan VSB 0.094 0.55 23 Tepung, Furing Jumbo Cat Putih 0.132 0.557 24 Furing Jumbo, Papan VSB, Cat Putih Tepung, Kasa 0.066 0.559 25 Tepung, Papan VSB Cat Putih 0.121 0.56 26 Tepung, Papan VSB, Cat Putih Kasa 0.068 0.562 27 Tepung, Kasa Cat Putih 0.073 0.566 28 Batabata Pasir 0.068 0.567 29 Furing Jumbo, Papan VSB, Cat Putih Kasa 0.067 0.568 30 Tepung, Sekrup Papan VSB 0.065 0.57 Figure 5. Display of Create Association Rule Results – Graphics IT Jou Res and Dev, Vol.7, No.2, March 2023 : 170 - 180 Apriori to Analyze Sales Patterns of Building Tools and Materials, Siti 178 Figure 6. Display of Create Association Rule Results - Description The results of the association rules apriori algorithm with a minimum support 0.1 and a minimum confidence 0.5 with min.criterion: unaltered confidence obtained 133 association rules that qualify requirements starting with the results of the association rules as shown in the table below: Table 7. Association Table Number Premises Conclusion Support Confidence 21 Tepung Furing Jumbo, Papan VSB 0.189 0.549 22 Kasa Tepung, Furing Jumbo, Papan VSB 0.094 0.55 23 Tepung, Furing Jumbo Cat Putih 0.132 0.557 24 Furing Jumbo, Papan VSB, Cat Putih Tepung, Kasa 0.066 0.559 25 Tepung, Papan VSB Cat Putih 0.121 0.56 26 Tepung, Papan VSB, Cat Putih Kasa 0.068 0.562 27 Tepung, Kasa Cat Putih 0.073 0.566 28 Batabata Pasir 0.068 0.567 29 Furing Jumbo, Papan VSB, Cat Putih Kasa 0.067 0.568 30 Tepung, Sekrup Papan VSB 0.065 0.57 From the table above, several results of association rules have been qualified requirements can be described as follows: 1. If you buy Tepung, you also buy Furing Jumbo and Papan VSB with a support value of 18.9% and a confidence value of 54.9% 2. If you buy Kasa, you also buy Tepung, Furing Jumbo and Papan VSB with a support value of 9.4% and a confidence value of 55% 3. If you buy Tepung, Furing Jumbo, you also buy Cat Putih with a support value of 13.2% and a confidence value of 55.7% 4. If you buy Furing Jumbo, Papan VSB and Cat Putih, you also buy Tepung and Kasa with a support value of 6.6% and a confidence value of 55.9% IT Jou Res and Dev, Vol.7, No.2, March 2023 : 170 - 180 Apriori to Analyze Sales Patterns of Building Tools and Materials, Siti 179 5. If you buy Tepung and Papan VSB, you also buy Cat Putih with a support value of 12.1% and a confidence value of 56% 6. If you buy Tepung, Papan VSB and Cat Putih, you also buy Kasa with a support value of 6.8% and a confidence value of 56.2% 7. If you buy Tepung and Kasa, you also buy Cat Putih with a support value of 7.3% and a confidence value of 56.6% 8. If you buy Batubata, you also buy Pasir with a support value of 6.8% and a confidence value of 56.7% 9. If you buy Furing Jumbo, Papan VSB and Cat Putih, you also buy Kasa with a support value of 6.7% and a confidence value of 56.8% 10. If you buy Tepung and Sekrup, you also buy a Papan VSB with a support value of 6.5% and a confidence value of 57% 4. CONCLUSION Based on the results of research conducted with 1000 transactions data on sales of building tools and materials the results of calculations using rapid miners concluded some of the results from association rules is if Minimum support 0.1 (10%) and minimum confidence 0.5 (50%) then obtained 122 association rules, one of which in the 100th order obtained "If a customer buys a Papan VSB, customer also buy Furing Jumbo with a support value of 23 .3% and 82.9% confidence value” then two rules from the 122th order obtained “If a customer buys Furing Jumbo, Cat Putih and Kasa the customer also buy Tepung with support value of 68% and 98% confidence value”. The conclusion is if the minimum support high it make item set low cause many product make combination will be result become many with low frequency, while if minimum confidence is high, it's make strong association rules because confidence is supporting value in determining selection of item set. Association rules from the above can be sales strategy, then arrange product each near based on result from association rule and also providing stock of tools and buildings at the Sakha Building store. Suggestions for future research is the further research should use multiple categories conducted in research such as interior, exterior, building architecture etc. So that it can be known in detail what it can be stocked and the arrangement of the materials closely based on association rules. REFERENCES [1] V. N. Budiyasari, P. Studi, T. Informatika, F. Teknik, U. Nusantara, and P. Kediri, “Implementasi Data Mining Pada Penjualan kacamata Dengan Menggunakan Algoritma Apriori,” Indones. J. Comput. Inf. Technol., vol. 2, no. 2, pp. 31–39, 2017. [2] J. Han and M. Kamber, Data Mining Concept and Technique. San Francisco: Morgan Kauffman, 2006. [3] S. Saefudin and S. DN, “Penerapan Data Mining Dengan Metode Algoritma Apriori Untuk Menentukan Pola Pembelian Ikan,” JSiI (Jurnal Sist. Informasi), vol. 6, no. 2, p. 36, 2019, doi: 10.30656/jsii.v6i2.1587. [4] M. Delisle, Effective MySQL Management About the Author, no. 4. . [5] R. W. Sari, A. Wanto, and A. P. Windarto, “Implementasi Rapidminer Dengan Metode K- Means ( Study Kasus : Imunisasi Campak Pada Balita Berdasarkan Provinsi ),” vol. 2, pp. 224–230, 2018. [6] H. Gani, “Menggunakan Algoritma Apriori Dan Algoritma Centroid Linkage Hierarchical Method ( Clhm ),” vol. 9, no. April, pp. 62–69, 2017. [7] M. Syukri Mustafa, M. Rizky Ramadhan, A. P. Thenata, K. Kunci -Algoritma Naive Bayes Classifier, and K. Akademik Mahasiswa, “Implementasi Data Mining untuk Evaluasi Kinerja Akademik Mahasiswa Menggunakan Algoritma Naive Bayes Classifier Implementation of Data Mining for Evaluation of Student Academic Performance Using a NBC Algorithm,” Citec J., vol. 4, no. 2, 2017. [8] S. Sains, M. Siswa, D. Out, and S. Kasus, “Penerapan Teknik Data Mining dengan Metode IT Jou Res and Dev, Vol.7, No.2, March 2023 : 170 - 180 Apriori to Analyze Sales Patterns of Building Tools and Materials, Siti 180 Support Vector Machine,” vol. 3, no. 1, 2017. [9] M. Rafi, “Algoritma K-Means untuk Pengelompokan Topik Skripsi Mahasiswa,” vol. 12, no. 2, pp. 121–129, 2020. [10] D. P. Mulya, “Analisa Dan Implementasi Association Rule Dengan Algoritma Fp-Growth,” Teknol. dan Sist. Inf. Bisnis, vol. 1, no. 1, pp. 1–11, 2019. [11] D. S. Kusumo, M. A. Bijaksana, and D. Darmantoro, “Data Mining Dengan Algoritma Apriori Pada Rdbms Oracle,” TEKTRIKA - J. Penelit. dan Pengemb. Telekomun. Kendali, Komputer, Elektr. dan Elektron., vol. 8, no. 1, pp. 1–5, 2016, doi: 10.25124/tektrika.v8i1.215. [12] J. L. Putra et al., “IMPLEMENTASI ALGORITMA APRIORI TERHADAP DATA PENJUALAN,” vol. 15, no. 1, pp. 85–90, 2019. [13] L. I. Prahartiwi and W. Dari, “Algoritma Apriori untuk Pencarian Frequent itemset dalam Association Rule Mining,” PIKSEL Penelit. Ilmu Komput. Sist. Embed. Log., vol. 7, no. 2, pp. 143–152, 2019, doi: 10.33558/piksel.v7i2.1817. [14] A. R. Program Studi Teknik Komputer AMIK Bina Sarana Informatika Jakarta Jl Fatmawati no, P. Labu, and J. Selatan, “Data Mining Dengan Algoritma Apriori untuk Penentuan Aturan Asosiasi Pola Pembelian Pupuk,” vol. XIX, p. 74, 2017. [15] E. C. Sibarani, M. Iqbal, T. Rahmadi, R. Syahputra, T. Informatika, and U. P. Indonesia, “Implementasi kesesuaian obat pada penyakit menggunakan algoritma apriori,” vol. 3, no. 1, pp. 56–62, 2019. [16] D. Sophia and L. Y. Banowosari, “Implementasi Metode Aturan Asosiasi Menggunakan Algoritma Apriori Pada Data Transaksi Penjualan Di Waroeng Spesial Sambal,” J. Inform. dan Komput., vol. 22, no. 1, pp. 44–56, 2017. [17] E. D. Sikumbang, “Penerapan Data Mining Penjualan Sepatu Menggunakan Metode Algoritma Apriori,” J. Tek. Komput. AMIK BSI, vol. Vol 4, No., no. September, pp. 1–4, 2018. [18] M. Fauzy, K. R. Saleh W, and I. Asror, “Penerapan Metode Association Rule Menggunakan,” J. Ilm. Teknol. Inf. Terap., vol. II, no. 2, pp. 221–227, 2016. [19] S. K. P. Barakbah, Ali Ridho, M. K. Karlita, Tita, S.Kom., and S. K. Ahsan, Ahmad Syauqi, Logika dan Algoritma, no. tahun 2013. Surabaya: PENS, 2012. [20] D. Nofriansyah and G. W. Nurchayo, “Algoritma Data Mining dan Pengujiannya,” Andi Offset, vol. 2, pp. 1–140, 2015.