Analysis of Data Mining Associations on Drug Sales at Pharmacies with APRIORI Techniques

The purpose of the research is to utilize artificial intelligence techniques in analyzing drug sales. Sources of data used are observations and interviews with shop owners. The method used as a solution is the Association method with the Apriori technique. By using the RapidMiner software, the test results are obtained using a minimum support of 25% and a minimum of 60% confidence as many as 5 rules with a predetermined itemset. The results of the study are expected to provide information and make it easier for related parties to find combinations of selling items. The results of this analysis can be used by pharmacies for marketing strategies and product promotion.


Introduction
Sales transaction data shall be available to a pharmacy or shops selling their goods. Due to the large number of transactions occurring daily, daily transaction information will increase data. A pharmacy must have important information to boost sales by processing transaction data, which have collected useful information, in order to increase sales. This helpful data can be used for a corporate policy, namely by using the information in a corporate strategy. To develop your company, a pharmacy certainly needs a business strategy. Data mining [1], [2] is an activity that seeks out interesting patterns in large amounts of data and stores them in a data warehouse or other form of information storage. Data mining patterns must be simple to understand and practical [3]. The Apriori algorithm [4][5][6] is a frequent itemset search algorithm that employs association rule technology. One of the many pharmacies in the area is "United." This pharmacy is on Jalan Sangnawaluh Rasaan, not far from residential areas. "United" pharmacies always strive to provide high-quality services and products, but they still fall short of competing with other pharmacies in the area. As a result, "ABC" pharmacies must be able to comprehend consumer needs. One method is to keep various drugs available in the pharmacy warehouse. Data mining can be used for analytical technology, namely analyzing consumer needs, to determine which drugs are purchased by consumers. The Apriori algorithm can help shape the possible combinations of candidate products and then test whether those combinations meet the user's minimum support and trust parameters. Every day, there are more and more buying and selling activities for services to consumers at the "United" Pharmacy, resulting in a larger data pile. Although the "ABC" pharmacy's service activities and transactions have not encountered any issues thus far, the large amount of data collected at one time can become an impediment to improving services, making it difficult for pharmacies to analyze the types of products that are most in demand and least desired by consumers.

Data Mining
Data mining is an iterative and interactive process for discovering new patterns or models in large databases that are completely effective, useful, and easy to understand. Data mining patterns must be simple to understand, novel, and useful. Data mining is the process of discovering interesting patterns or information in selected data by employing specific techniques or methods. In data mining, the relationship sought can be one between two or more in one dimension [7].

Association
The Association method is to display the confidence or relationship between items. The Association method includes two stages, namely finding the most frequent combination of an itemset and defining the conditions and results (for the conditional association method). In determining an association method, there is an interestness measure obtained from the results of data processing with certain calculation data [8].
The formation of association rules consists of two steps: a) Mode analysis at high frequencies At this point, the database is searched for a combination of items that meet the minimum support value requirements. Support for the rule "X => Y" is the likelihood of an attribute or set of attributes X and Y appearing in a transaction at the same time.

Support (X => Y) = P (X∩Y)
(1) X => Y = items that appear in the same order P (XY) = probability of X and Y transactions divided by total number of transactions.
b) Formation of the association's rules After locating all high-frequency patterns, compute the confidence of the if X then Y rules in order to identify association rules that meet the minimum confidence requirements..
X => Y = items that appear in the same order P (Y | X) = the probability of the number of transactions that contain X and Y divided by the number of transactions that contain X.

Apriori Algorithm
The Apriori algorithm was proposed in 1994 by Agrawal and Srikant to determine frequent itemsets for boolean association rules. Apriori algorithm makes use of prior knowledge about itemsets with frequent occurrences, also known as itemset frequency frekuensi [9].

Result and Discussion
The information used in this study is from drug sales in "ABC" pharmacies. In this study, 8 data samples were collected, and the collected data will be calculated by looking for support and confidence values. Insto Tetes Mata  50  55  53  40  49  30  50  4  Albothyil 5 ml  40  40  45  49  50  10  15  5 Alvita Tablet  45  15  30  30  40  45  49  6  Andalan  25  26  10  15  10  25  20  7  Andalan Laktasi  15  16  19  25  27  14  11  8 Alpara Tablet  20  10  15  11  25  20  10 The manual calculation of the Apriori Algorithm is as follows: a) Transaction Patterns in Drug Sales at "ABC" Pharmacies Based on drug sales data from "United" Pharmacies. The transaction patterns are obtained by analyzing the eight types of drugs that occur the most frequently on a daily basis, as shown in table 2 below.

Combination of 2 Itemset
The process of forming C2 or called 2 itemset with a minimum amount of support = 20%. With the following formula: The following is the calculation of the formation of 2 itemsets:

Support(A,F) =
The minimum Support specified is 20%, so the combination of 2 itemsets that do not meet the minimum Support will be removed, as shown in Table 5 below:

Combination of 3 Itemset
The process of forming C3 or called 3 itemset with a minimum amount of 20%. With the following formula: The following is the calculation of the formation of 3 itemset:

Support(B,D dan F) =
Based on the description above, it can be made table 6: The minimum support specified is 25%, then 3 combinations that meet the requirements will form an association rule.

d) Rules for Association Formation
After identifying all high-frequency patterns, the association rules that meet the minimum Confidence requirements are found by calculating the Confidence of the associative rules AB with a minimum confidence value of 60%. The following formula yields the AB rule's confidence value: The following is a Confidence calculation: