Market Basket Analysis to Identify Stock Handling Patterns and Item Arrangement Patterns Using Apriori Algorithms

The process of managing the pattern of handling stock of goods and the pattern of arranging goods on store shelves requires an identification process by utilizing data from sales transaction results. Market basket analysis of sales transaction data using Apriori Algorithm stages produces an information in the form of association rules with a minimum support value of 50% and a minimum confidence of 60%. It can be a reference in the arrangement of items on store shelves by referring to a combination of items that are often bought by consumers simultaneously. In addition, the stock inventory pattern can take advantage of the results of determining the high frequency value in the combination pattern 1 itemset C1 with a minimum support value of 50% which is compared with the initial inventory.


Introduction
In the management of a minimarket, it is necessary to have a system management in the process of handling the patterns of stock handling and patterns of arrangement of goods, with the aim of structuring the goods to make it easier for customers to shop and patterns of handling stock of goods to provide the availability of goods needed by customers. Of the two, if not handled by an analysis of sales transaction data, it can be a problem for the development of minimarkets. Many business sellers of goods that assume that the sales transaction data report is only to be a report on several things, such as how many items are sold, how many items are still available, and how much profit is obtained. Sales transaction data can be used to help decisions in predicting the layout of goods so that consumers easily find the items sought and determine the prediction of the amount of stock in the future. These problems can be solved by market basket analysis using the stages of Apriori Algorithm, namely by identifying the value of support and confidence of goods sold at the minimarket. It can be a preference in the pattern of arrangement of goods based on customer habits in buying goods simultaneously and can also be a prediction of the stock of goods in the future [1].
Market basket analysis is the process of analyzing customer buying habits on each sales transaction data, by identifying associations between different items of the consumer shopping basket [2].
This research focuses on the event identifying the process of managing stock patterns of handling goods and structuring patterns of goods using Apriori Algorithm. This algorithm is used to find rules or measure the relationship between two or more items. Associative rules are expressed in terms of if they are antecedents, so they are consistent with the amount of support and confidence associated with the rules [3].
In a study entitled "Implementation of Apriori Algorithms with market basket analysis for product layout settings" explained that the association rules formed from the results of the discussion are used to regulate product placement in stores. Products that have high associations with other products will be placed close together, so as to facilitate consumers in buying products and store management in managing stock [4]. Maharani, et al. Also conduct research under the heading "Implementation of data mining for minimarket layout by applying association rule". The research aims to apply the association rule in the preparation of product layouts. From the rules generated, it can help companies in the preparation of product layouts [5]. Meanwhile, according to research conducted by Adyawangkara, et al with the title "Analysis of the rules of association between items in purchase transactions using data mining with Apriori Algorithm (case study: Gunungan minimarket, Central Java)", in that study aims to find the rules of association in the purchase of items in minimarkets to solve the problem of procurement of goods stock, determining promotional strategies, and arranging goods in minimarkets [6]. Research on the rules of association between items in identifying products that are sold and the relationship between products based on the conditions of the sales transaction data. [

Research Methods
This study conducted an experimental process with the aim of understanding the steps in the market basket analysis process using Apriori Algorithms in identifying patterns of handling stock items and patterns of arrangement of goods on store shelves. The stages in this study can be shown by Figure 1:

a. Data Collection Stage
The data used in this study were taken from the sales transaction database that is available at the Surya Mart minimarket. The mini market is a campus cooperative located at STMIK Muhammadiyah Paguyangan Brebes which is located on Jl. Pangeran Diponegoro, Kec. Paguyangan, Kab. Brebes. Postal Code 52276. b. Data Processing Stage At this stage the database scan process is carried out from the sales transaction table in order to calculate the number of purchases that occur on each item of goods. After that, the process is implemented into tabular data in the form of binary data with the statement 0 if the item was not purchased and 1 if the item was purchased on each item sales transaction identity. c. Market Basket Analysis Phase Using Apriori Algorithms. From the tabular data generated at the data processing stage, a market basket analysis process is performed using Apriori Algorithm to find high frequency values of sales transaction data by identifying support values and determining a minimum support value of 50%. The next step is to establish a 2-item A association containing B by finding a confidence value, and determining a minimum confidence value of 60%. Figure 2 shows the completion stage of the market basket analysis process using apriori algorithm:

d. Results Determination Stage
The final stage of this research is the process of determining the pattern of handling stock of goods and the arrangement of goods on store shelves from the results of the market basket analysis process using Apriori Algorithm in sales transaction data.

Results snd Discussion a. Data collection stage
At this stage the data collection process is carried out from the database, in the form of sales data at the solar mart minimarket during the 1 (one) month transaction period as shown in Figure 3: After that, the data processing stage is carried out by scanning the database and changing it into tabular data.

b. Data Processing Stage
Data processing stage is done by scanning the database of sales transaction data, namely by identifying the number of items purchased at each transaction id, information Y and N on each item explains if "Y" means the item was purchased and if "N" means the item is not bought. Data is presented in tabular form as in table 1: From the data in Table 1 which contains the items column with information Y and N, it is changed in binary form to Y = 1 and N = 0 with the aim that it is easy to count each item on each transaction, as shown in Table 2:

1) Market Basket Analysis Phase Using Apriori Algorithms. a) Analysis of high frequency patterns
High frequency pattern analysis is done by finding a combination of items that meet the minimum requirements of the support value in the transaction data. The data in Table 3 shows the results of the number of transactions in each itemset: The next step is to calculate the value of support in combination with 1 -itemset or C_1 using equation (1): The results of determining the support value of each item can be seen in table 4: The next step is to identify a combination pattern with a minimum support of 50%, then the process of forming 2 -itemset or C_2 with a minimum support of 50% as shown in table 5. Calculation of support values using a 2-itemset combination using equation (2): In the process of forming a 2-itemset combination pattern no one meets the minimum support value of 50%, then a 1-itemset combination can be met for the formation of associative rules.

2) Establishment of associative rules
After a minimum support value of 50% of the C_1 combination is determined, an associative rule is sought that meets the minimum confidence requirement of candidate 2 item A containing B in each itemset. The confidence value of the associative rule 2 -item A → B is obtained using equation (3): Next is determining the minimum confidence value of 60%, the confidence value of 2 -items A → B that will qualify for the determination of association rules has a confidence value above 60%.

c. Results Determination Stage
From the results of the analysis of determining the value of support and confidence, it can be concluded the results of the pattern of handling stock of goods and arrangement of goods on the store shelf, as follows: 1. Pattern of handling stock of goods From the results of determining the minimum support value of 50% in the 1-itemset combination pattern, it can be identified the addition of stock items with a percentage: From Table 9 results can be drawn from the stage of identifying the pattern of handling stock of goods utilizing a minimum value of support of 50% of the combination of 1-itemset, by calculating the initial inventory is compared with the value of support so that it can be identified in the item stock increase column in Table 9.

Pattern of Arrangement of Goods
From the results of the analysis in identifying the handling of the layout of the goods using Apriori Algorithm, it can be determined from the minimum value of 50% support and the minimum value of Confidence 60% which produces the following association rules: From Table 10. it can be identified the tendency of customer purchases, it is known that the tendency of customers if buying Black Coffee items ½ Kg is most likely with a Confidence value of 69.23% customers will also buy 1 Kg Granulated Sugar. from this tendency can be a strategy to arrange the layout of the item with the pattern of Black Coffee ½ Kg brought closer to 1 Kg Granulated Sugar, Black Coffee ½ Kg closer to Granulated Sugar ½ Kg and so on, so that customers can easily find the items they need.

Conclusion
Based on the analysis phase of the results and discussion above, it can be concluded that identification of patterns of handling stock of goods and arrangement of goods can utilize data on the results of sales transactions. And then, analysis of high frequency patterns with a minimum support value of 50% from a combination of 1 -itemset C1 can determine the pattern of handling stock of goods, namely by balancing the initial inventory with a support value so that the prediction results of adding stock will be obtained. Beside that, the results of the formation of association rules that are determined from a minimum value of 50% support and a minimum value of 60% confidence can produce a tendency of customers to buy items, so that these tendencies can be a reference in the process of item layout by arranging items close together.