Web-Based POS with Apriori Market Basket Analysis

This research project focuses on the design and development of a web-based Point of Sale (POS) application that incorporates advanced analytical techniques, specifically Market Basket Analysis with the Apriori algorithm and the Association Rule method. The primary objective of this web-based POS system is to empower retailers in managing their sales transactions efficiently and gaining valuable insights into customer purchasing behavior. The web-based POS application is multifaceted, offering features such as sales transaction recording, product inventory management, and customer data tracking. What sets it apart is the integration of the Apriori algorithm and Association Rule method, which enable the system to analyze and understand customer purchasing patterns. It identifies strong product associations and establishes rules that support intelligent decision-making for businesses. The advantages of Market Basket Analysis are substantial. Retailers can identify relevant purchase patterns, such as frequently co-purchased products or cross-selling opportunities. This information can be used to enhance marketing strategies, optimize product placement in stores, and create bundled product offerings, ultimately boosting sales and revenue. By analyzing transaction data and recognizing patterns, retailers can streamline their operations, minimize wastage, and allocate


I. INTRODUCTION
In the dynamic world of retail, the demand for inventive and data-centric approaches has grown more pressing for companies aiming to stay competitive and up-to-date.This study explores the creation of a web-based Point of Sale (POS) system that combines sophisticated data analysis methods to offer an all-encompassing and enlightening solution for retailers.As a result, numerous businesses today opt for the incorporation of POS (Point of Sale) applications into their daily business operations.
The central objective of this research is to design and implement a web-based POS system that seamlessly combines Market Basket Analysis with the Apriori algorithm while incorporating the Association Rule method.This integration aims to empower retailers with tools to efficiently manage sales transactions and, more importantly, to extract invaluable insights into customer purchasing behaviors.The Apriori algorithm is frequently used in various MBA (Market Basket Analysis) research studies.This method predicts purchases by relying on previous transaction data, also known as prior information or prior knowledge [1].The Apriori algorithm can uncover relationships between attributes and extract information from data.This research applies the Apriori algorithm to business patterns and product purchase habits.
The web-based POS application under scrutiny allows users to effortlessly record sales transactions, oversee product inventories, and diligently track customer data.By harnessing the power of the Apriori algorithm, the Association Rule method, and Market Basket Analysis, this system is poised to analyze intricate patterns in customer purchasing habits.It achieves this by identifying robust product associations, facilitating the establishment of rules that underpin more informed and intelligent business decision-making.The application of association rules with the Apriori algorithm has advantages in terms of simplicity and the ability to handle large datasets, making it very practical for companies with limited data processing capabilities [2].
One of the standout advantages of this integrated approach is its ability to uncover relevant purchase patterns, such as frequently co-purchased products and cross-selling opportunities.Such insights provide a fertile ground for devising and implementing more effective marketing strategies.For instance, retailers can strategically position products within stores or create enticing bundled product offerings, thereby enhancing customer engagement and bolstering sales.This can assist in creating more effective marketing strategies, such as implementing cross-selling or upselling of products that are most frequently purchased by customers [3].
This research project serves as an exemplar of the practical application of web-based POS technology that is enriched by the fusion of Market Basket Analysis, the Apriori algorithm, and the Association Rule method.Its significance lies in the potential it holds to not only streamline operational efficiency within retail enterprises but also to unlock opportunities for revenue optimization and heightened customer satisfaction.Then, based on the data that has been created every day, the data will not only become a staple for the company but will also be very useful in increasing the store owner's sales or as a reference to determine promotional items [4].

II. RELATED WORKS/LITERATURE REVIEW (OPTIONAL)
According to [5], Data mining is a process used to extract valuable information from large datasets.This process involves extracting relevant data to transform it into new information that can be used in decision-making.The goal is to discover patterns, trends, and new insights within the existing data.By leveraging data mining techniques and algorithms, this information can be used to support better decision-making and enhance the understanding of the data at hand.
According to [6], By using data mining, this system can assist users in making informed decisions about the products they plan to buy.
According to [7], The Apriori algorithm is an algorithm used to find frequent relationship patterns to create related rules.It uses prior knowledge about the characteristics of previously known frequently occurring itemsets According to [8], Association rule is one of the data mining methods included in the Market Basket Analysis method.
According to [9], The process of association rules involves examining pre-existing datasets to identify connections between different items.
According to [10], The Apriori algorithm is one of the algorithms used to search for frequent itemsets using association rule techniques.
Market Basket Analysis is a method of evaluating consumer shopping habits with the goal of identifying associations and correlations between various purchased products.The purpose of this analysis is to discover sets of products that are frequently bought together (itemsets) [11].
According to [12], Market Basket Analysis is a very common and valuable method or technique in the field of marketing.Its goal is to uncover products that are purchased together by customers.The name of this method originates from customers' habits of placing items in a shopping basket or shopping list, hence it is referred to as market basket analysis.
According to [13], The Point of Sales (POS) system plays a crucial role in migrating from manual processes to automated ones by leveraging the internet.POS software greatly assists in daily and weekly administrative tasks, including monitoring inventory levels based on Stock Keeping Units (SKUs) and locations, order status, stock percentages, and storage of additional stock.

III. METHODS
To conduct our research, we have determined that the most effective approach will be to utilize the CRISP-DM (Cross-Industry Standard Process for Data Mining) research method.This particular method has been widely recognized for its ability to guide data mining processes consistently and efficiently and has been successfully implemented across a variety of different industries [14].
CRISP-DM, or Cross-industry Standard Process for Data Mining, is a method that provides standard procedures in data mining that can be applied to common problem-solving strategies in business or research units, consisting of several phases [15].Based on CRISP-DM, a data mining process has a lifecycle consisting of six phases.These phases are as follows: 1. Bussiness understanding phase This phase is related to understanding the objectives and needs from a business perspective, which are translated into problem definition in data mining.

Data understanding phase
This phase is related to data collection to gain a deeper understanding of matters related to the data.In this research, the initial data is obtained directly from the company.

Data preparation phase
This phase includes activities to build a dataset, which involves selecting tables and data attributes, as well as a data cleaning process to remove unnecessary data.The results are obtained through various transformations applied during these processes.Some of the changes made include: -Removing transactions with only one item purchased (as they would interfere with association rule mining results).Transactions with a single item purchased are removed because it is already certain that no association rules can be derived from such transactions due to the absence of item pairs.-Deleting unnecessary attributes, leaving three attributes: Transaction Number, Transaction Date, and Product Name.As a result of these processes, the following dataset is formed: With the completion of these processes, the dataset to be used consists of sales transaction data from the period of June 1-10 June 2023, totaling 55 sales transaction records.

Modelling phase
This phase is related to the selection and application of various modeling techniques customized to achieve optimal results.

Evaluation phase
This phase is related to the evaluation of the results of the previous modeling as well as business issues that may not have been considered.In the CRISP-DM (Cross-Industry Standard Process for Data Mining) process, evaluation is a crucial stage for measuring how successful the developed data mining model has been in achieving business objectives.One of the methods used in the evaluation stage is Cross-Validation.
In cross-validation, data is divided into several subsets, and the model is evaluated on each subset.This helps identify the extent to which the model has consistent performance and is not just tailored to a specific training dataset.The evaluation stage is critical in assessing the quality of the model, in the context of association analysis the method used is Chi-squared Test 6. Deployment phase This phase is related to the implementation of data mining in a company, The deployment phase or model utilization plan is the most valuable phase in the CRISP-DM process.Planning for Deployment begins during the Business Understanding phase and should include not only how to generate model value but also how to convert the decision value and how to integrate the decision into operational systems.Once the data mining is completed the model is analyzed or the results of such analysis, which is used in the decision-making, operational systems, or decision support systems of the company.In addition, there needs to be continuous monitoring to ensure the effectiveness of the model over time.Ultimately, the Deployment system plan recognizes that no model is static.Models are built from data that represents data at a specific point in time, so changes over time can cause changes in the characteristics of the data.The model must be monitored and possibly replaced with a better mode.
The basic methodology of association rule is divided into two stages [16], which are: 1. Analysis of high-frequency patterns In this stage, we search for combinations of items that meet the minimum support value in a database.Support is a measure that indicates the level of dominance of an item or itemset within the entire set of transactions.The formula to calculate the support value for an item is as follows: To obtain the support value for two items, you can use the following formula:

Formation of associative rules
This stage is carried out after all the highest-frequency patterns have been identified, where we search for associative rules that meet the minimum confidence criteria by calculating confidence(A -> B).Confidence is a measure that indicates the relationship between two items conditionally or based on a certain condition.The confidence value for the rule A -> B can be obtained using the following formula:

A. Association Rule using the Apriori algorithm
The System testing is conducted to test the system processes implemented in the Market Basket Analysis application with the calculation method of Association Rule using the Apriori algorithm.This research discusses the system testing process and evaluates the results generated by the system.Through this testing, an understanding of the differences in the generated data patterns can be obtained.Testing was performed on transaction data from June 1-10, 2023, using the following initial values: Table 3 presents the data used for testing, which is transaction data for the period of June 1-10, 2023, with a total of 55 sales transaction records.thenew insights.Where applicable, results should be illustrated in terms of non-dimensional variables.

Itemset
Frequency Support PIC-SPATULA-2 + PIC-SPATULA 12 0,218181818 PIC-SPATULA-2 + PRO8-BOOST 10 0,181818182 PIC-SPATULA + PRO8-BOOST 3 0,054545455 Table 5 represents the selected candidate 2-itemsets.In the calculation of candidate 3-itemsets, no candidates meeting the minimum support were found, so the calculation stopped at the 3-itemset.4 represents The calculation of confidence value, From the manual calculations conducted with a minimum support value of 0.2 and a minimum confidence value of 0.5, the formed association rule is: "If a consumer purchases PIC-SPATULA-2, then the consumer also purchases PIC-SPATULA, with a confidence value of 0.5 or 50%."

B. Point of Sales Visualization
In this part containing explanation about visualization market basket analysis through related to transaction data.
1) Dashboard Menu Display In the Fig. 2: Dashboard Menu Display is designed to provide a comprehensive and easily understandable display of various aspects relevant to the company's performance and operations 3) Apriori Results Menu Display In the Fig. 6: Apriori Results Menu Display (1), users can view the results of the Apriori analysis.This information is presented in a structured and easily understandable format.In the Fig. 7: Apriori Results Menu Display (2) The print feature in this display allows users to easily print the Apriori analysis results.This can be useful when you want to share information with your team or relevant parties in a printed format that is easy to read and can be taken to meetings or presentations.Additionally, the Apriori Results Menu Display also provides a data deletion feature.This feature allows users to remove irrelevant or no longer needed data after the Apriori analysis is completed.V. DISCUSSION This research focuses on the implementation of Market Basket Analysis using the Association Rule method that utilizes the Apriori algorithm.The first part of the research discusses the process of testing the system and evaluating the results generated by the system.This test was conducted using transaction data from the period of June 1 to 10, 2023, with the initial parameters determined, namely Minimum Support of 0.2 and Minimum Confidence of 0.5.The first test results produced a 1-itemset with a minimum support of 0.2.This result includes item-sets such as PIC-SPATULA-2, PIC-SPATULA, PRO8-BOOST, and many others.This data provides initial insights into significant buying patterns in customer transactions.In the second iteration, the test results created 2-itemsets that met the minimum support requirement.Item-sets such as PIC-SPATULA-2 + PIC-SPATULA and PIC-SPATULA-2 + PRO8-BOOST emerged as a result of this process.However, in the 3-itemset candidate calculation, no candidates were found that met the minimum support requirement, so the calculation was stopped at 3-itemsets.Next, the calculation of confidence values was performed for the association rules formed.By using a minimum support value of 0.2 and a minimum confidence value of 0.5, the calculation results show that the association rule formed is: "If a consumer buys PIC-SPATULA-2, then the consumer will also buy PIC-SPATULA, with a confidence value of 0.5 or 50%." In addition to the analysis of the results, the second part of the study describes the visualization of the Shopping Cart Analysis.The Dashboard Menu Display was designed to provide a comprehensive view of the company's performance and operations.It helps in better understanding the transaction data and the results of the Apriori analysis.The Apriori Process Menu Display presents a visual workflow that visualizes the stages of the Apriori analysis.This makes it easier to understand and navigate through the process.Users can monitor the steps of the Apriori analysis, including item or variable selection, association rules generated, support and confidence measures, and other relevant analysis results.The Apriori Results Menu Display displays the results of the Apriori analysis in a structured and easy-to-understand format.Users can print the results or delete irrelevant data after the analysis is complete.Overall, this research shows that the application of the Apriori algorithm in Market Basket Analysis is a useful tool for identifying significant purchase patterns.The results of transaction data analysis and visualization help understand consumer patterns, which in turn can be used to optimize sales strategies and identify better business opportunities.With this system in place, companies can better understand consumer behavior and respond to it more effectively.

VI. CONCLUSIONS
Based on the research conducted in this thesis titled " Web-Based POS with Apriori Market Basket Analysis" the following conclusions can be drawn: Suitability of the Apriori Algorithm in Market Basket Analysis: In this research, the Apriori algorithm was used to analyze purchasing patterns in companies transaction data.The results indicate that the Apriori algorithm effectively identifies associations between purchased product items, Implementation of a Web-Based Point of Sales Application: Successfully designed and implemented a web-based Point of Sales (POS) application that can be used by companies.This application enables efficient and fast sales management and data analysis and Benefits of Market Basket Analysis: By applying Market Basket Analysis to transaction data, Companies can identify relevant purchase patterns, such as frequently co-purchased products or cross-selling opportunities.This information can be used for more effective marketing strategies, such as product placement in stores or bundled product offers.

TABLE 2 THE
DATASET FORMED THROUGH THE PROCESSES OF BUSINESS UNDERSTANDING, DATA UNDERSTANDING, AND DATA PREPARATION

Table 4
represents the results based on the data provided in Table1.The process involves forming 1-itemsets with a minimum support count of 0.2.