Recommendation System for SmartMart-A Virtual Supermarket

A R T I C L E I N F O A B S T R A C T Article history: Received: 15 October, 2020 Accepted: 26 November, 2020 Online: 16 December, 2020 The current online shopping system does not provide the actual shopping experience to the users where they scroll through the web pages and select an item to purchase, which becomes monotonous soon and lacks the shopping experience. This paper describes the development of the SmartMart, a 3D shopping mart where the user can navigate around the mart with the help of a virtual cart and interact with the products as they would do in real life. Further, this paper explains the integration of the recommendation system with the SmartMart that provides efficient and seamless customer experience. Here, the customers are recommended with various products based on their previous purchase history. This gives a more personalized touch to each user adding on to their shopping experience. This paper describes the implementation of recommendation system using three types of algorithms namely item-based collaborative filtering, popularity model and userbased collaborative filtering. These algorithms are integrated with Unity SmartMart application and tested with the open source dataset. This dataset is organized in three waysoriginal data, data with a dummy field and normalized data. Distance metrics such as Pearson co-relation co-efficient, Jaccard similarity, cosine similarity metrics are used to compute the similarity among customers. This paper presents a comparative study of these different similarity metrics for user-based recommendation algorithm based on precision, recall, F-value and accuracy. From results obtained it can be seen that the Pearson coefficient metric gives the highest accuracy value (86.6%) but the F-value, mean precision and mean recall values are very less compared to Jaccard Similarity Metric. Hence, Jaccard similarity metric is preferred over Pearson co-relation co-efficient. The design and development of SmartMart along with the recommendation system adds a new dimension to both the existing online shopping system and provides better customer satisfaction.


Introduction
3D simulation software provides a rich training experience to the user for various end-user applications, without using any physical asset and loss to the company. This is a key factor of 3D simulation that is expected to boost market growth. The simulation software market was valued at USD 8.24 billion in 2019, and it is expected to reach USD 19.22 billion, by 2025. The 3D simulation enables users to immerse in a computer-generated environment where they can interact with various simulated objects in a way replicating the real-life process. These 3D objects can be generated automatically or manually created by deformation of the mesh structure, or otherwise manipulating vertices. Using 3D simulation for online shopping primarily enhances the customer experience and takes online shopping to a new level of sublimity.
This adds a realistic window which is absent with the existing online shopping websites where the user does not get to perceive the actual depiction of an item which they are inclined to purchase. Though the current websites try to minimize the hassle of the actual shopping process but it cuts away many privileges of a customer which would be helpful in selecting the appropriate item they want to purchase.
Currently, the e-commerce websites display 2D images of the products and facilitates the text-based search to seek out desired items to be purchased. But this does not allow customers to associate themselves with the real-world object experience. So, to replicate the real-world shopping experience for customers, this paper describes the design and development of a 3D shopping mart ASTESJ ISSN: 2415-6698 called SmartMart. Here, each object is modeled in three dimensions to recreate the real-world object and also includes the other aspects of physics such as rotation, rolling, dragging of objects that makes the whole process more engaging. Due to this, the customer's experience of selecting an item from the SmartMart becomes more impeccable.
The SmartMart is designed using Unity along with its copious features to establish a smooth user interface. Also, the products to be bought are modeled and rendered in the gaming engine in way that provides the customers with a flawless online shopping experience. MySQL database used stores the information about the products, customers and their transaction details. MySQL database further enables to scale the number of products or customers without any inconvenience.
To broaden the scope of this proposed idea, a recommendation system has been implemented. To recommend appropriate products to customers the purchase history of multiple users is considered. A few factors that measures E-commerce success and customer satisfaction are as follows: • What are the most trending products for sale?
• What are most suitable products for a particular customer based on his purchase history?
• What items are more often bought together?
Considering all the above-mentioned key factors, this paper describes implementation of recommendation system using three types of algorithms namely item-based collaborative filtering, popularity model and user-based collaborative filtering. Further, these algorithms are designed and integrated with Unity SmartMart application. For this, an open source dataset is used and organized in three ways-original data, data with a dummy field and normalized data. Further, Pearson co-relation co-efficient, Jaccard similarity, cosine similarity matrices are used to compute the similarity between purchase pattern usages among customers. Jaccard similarity metric provided the best result.
The admin of the SmartMart application is authorized to append the data of the ongoing transactions and periodically train the model with latest dataset. This ensures that the recommendation system takes into account the changing trends of customer's shopping patterns with proposed SmartMart application.

Literature Review
In [1], the author described a personalized Recommender System based on data clustering techniques to deal with the scalability problem. User-clusters are formed to categorize them based on their shopping behavior. The proposed work use DBSCAN clustering algorithm for clustering the users, and then implement voting algorithms to recommend items to the user depending on the cluster into which it belongs. Their idea was to partition the users of the Recommendation system using clustering algorithm and apply the Recommendation Algorithm separately to each partition. The system recommends item to a user in a specific cluster only using the rating statistics of the other users of that cluster. They have tested the algorithm on the Netflix prize dataset.
The work in [2], proposed two recommendation models for offline grocery/retail stores. The accumulated PoS (Point of Sales) data is used to understand the shopping behavior of different customers and recommend better products. The proposed recommendation models are-Direct recommendation of products and two step recommendation systems. These recommendation algorithms are analyzed based on precision and accuracy of the model.
In [3], the author presented a recommendation system in their 3D environment where they consider the pre-purchase ratings of users to suggest products. The pre-purchase ratings include the interaction of user with the 3D objects. The user's emotions are captured in the form of electroencephalogram (EEG) signals. This makes the recommendations more users specific and accurate. A combination of this and the already existing recommendation system makes it dynamic.
The study in [4] presents a Recommendation system which offers real-time personalized suggestions on offers to its customers. Using iBeacons personalized notifications telling about the offers which are pushed to the smart phones of the customer in real-time as they navigate through the shopping mart. This approach uses a Bayesian Inference and a Hard k-modes clustering approaches. Bayesian Inference approach uses Entropy-based algorithm to give accurate and user specific recommendations on the offers provided to each user.
In [5], the author has proposed a virtual shopping mart which simulates a real working of shopping mart. The virtual shopping mart enables a cost efficient and high flexible way to store data. Researchers can use this data to improve the shopping experience of the customers. The data can be used to accurately predict the reactions of the customers to price change and the reactions to availability of the products that the customers need. These reactions can be used to optimize the shopping mart in a way to efficiently serve the customer's requirements.
In virtual reality the customers have the exact 3D representation of the items unlike the other 2D shopping websites this helps in analyzing the exact reactions the customers have towards a product in the shopping mart which enables researchers to capture an accurate consumer behavior.
The architecture that is proposed in this paper stands out from the other existing prototypes in a way that it integrates the recommendation system with the 3D environment (Unity software) which makes it possible for the user to have a sublime shopping experience. This entire system is based on client server model that allows concurrent access to the SmartMart by the potential customers. The use of recommendation system which recommends the most popular items and the items that the user would purchase helps the user to manage his/her shopping time more efficiently. The interaction with the 3D environment using keyboard and mouse makes the customer's shopping experience realistic.

Proposed Design of Smart-Mart
The system architecture for the proposed SmartMart is illustrated in Figure 1. It manifests a computing model in which a server hosts, delivers and manages most of the resources and services to be utilized by the clients. The project aims at building a Client-Server architecture where the client application entails a 3D UI (User Interface) platform that would grant customers/users a real-time shopping experience at the click of a button.
The customer interacts with the environment through keyboard and mouse input controls to bring in various changes ranging from the state of a product to updating the fields in database in the server. The MySQL database stores all the information about products, customers, transaction details and billing information. A virtual shopping cart designed in unity platform can freely move around the SmartMart.
Also, customers are allowed to add products to shopping cart, thereby facilitating a user-friendly experience to the users, unlike the existing shopping platforms. As the user proceeds towards the billing section, the inventory is updated which would help administrators to track and maintain the stock efficiently. The Figure 1 describes about the Unity gaming engine that is used to host the entire shopping environment application. The Unity APIs used in the proposed work handle various user interactions and allow communication with third party scripts, namely, C# and PHP (Hypertext Preprocessor). The user interactions are translated into corresponding events by the interface. The application processes these events and triggers other events or updates the SQL database connected to it. A PHP script acts as an intermediary to communicate between the SQL database and the application.
The figure 2 describes the 3D view of the proposed SmartMart. This figure shows a virtual cart an products placed on shelves in the SmartMart. The user can move around virtual around the mart along with the Virtual-Cart.
The uniqueness of this paper is integration of SmartMart with the recommendation system. This recommendation system is deployed using the Python script and connected to the SmartMart application via PHP.

Workflow of Proposed Work
Unity is a cross-platform game engine with a built-in IDE (Integrated Development Environment) used to develop video games for web plug-ins, desktop platforms, consoles and mobile devices. Pro-Builder is a tool that gives Unity the ability to edit the shape of primitive objects and model these 3D objects as per the requirements. The work flow of the Virtual Supermarket is depicted in the Figure 3. The application starts with the initial scene where user credentials are validated with username and password. If the credentials are correct, the user gets into the game scene, which is the main application. The user is placed at the entrance of the mart, with a virtual cart placed there. The cart is designed using Pro-Builder. The cart is scripted such that the customer can move it around the mart with the help of the mouse control.
Shelves at the virtual mart are rendered using unity platform and various products are placed on it. The products at the mart are built as 3D objects using Pro-builder platform in order to recreate the real-life products such as baseball bats or celery. These virtual products created in the Unity platform are nothing but Game Objects. Game Objects are the fundamental objects in Unity that represent characters, props and scenery. Every Game Object is associated with a tag which is used to identify, retrieve and store the information about a particular product. Each product/Game Object is associated with a script which allows the user to rotate, drag and drop it into the virtual cart. Whether the customer puts or removes the item to or from the cart, the inventory database is updated accordingly in real time. As soon as the user selects the product, the details of the product along with the recommendations are displayed on the monitor installed at the billing counter. This is accomplished using PHP server that communicates with MySQL and Unity.
Once the user completes the adding of products to the virtual cart, the cart can be dragged to the billing counter where appropriate billing information is displayed. This billing information includes the items purchased, per piece price, total quantity, total price, time of billing, customer id and customer details. These transaction details are stored in the database in real time. Once the billing details are generated, the user signs out and the session is over.
Thus, database manages all the transactions, user and product information efficiently. The details of the products are displayed to customers as required without any latency. The interactions, ranging from dragging and dropping of the items into virtual cart to its movement in 3D environment in the first-person view is flawless.
After the text edit has been completed, the paper is ready for the template. Duplicate the template file by using the Save As command, and use the naming convention prescribed by your conference for the name of your paper. In this newly created file, highlight all of the contents and import your prepared text file. You are now ready to style your paper; use the scroll down window on the left of the MS Word Formatting toolbar.

Recommendation System
Al the proposed virtual Super market is further integrated with a Recommendation System. In the field of e-commerce, recommendation systems are an attempt to bridge the gap between the online and in-store shopping experience reiterating the very aspect that made this project distinctive. Recommendation systems streamline our online shopping experience by suggesting products that customers might be interested in.
With the growing technological advancements in the fields of business intelligence and data science, recommendation systems have become increasingly popular. They help the customers to know and decide what to buy based on their previous purchase history, their feedbacks and features of the products to be purchased. The two most popular approaches for building a recommendation system are Collaborative Filtering and Contentbased algorithms as shown in Figure 4. While the former approach requires only the user's historical preferences over the existing inventory, the latter requires a fair amount of knowledge on the item's characteristics such as ingredients, trademark and features. Although Collaborative Filtering depends on only purchase history of users one assumption that this model makes is that the users who have purchased a certain set of products in the past also tend to agree with the same kind of products in the future.
Collaborative filtering algorithms [6] are mainly classified as model based and memory based approaches. Further there are two types of Memory based Collaborative filtering algorithms namely Item-based collaborative filtering and User-based collaborative filtering . Item-based collaborative filtering that depends on items and their similarity to other items. User-based collaborative filtering algorithm is more resource-intensive as it looks at customer behaviors and preferences. In memory based approach the similarities with the closest users or items are calculated by using Cosine similarity or Pearson correlation coefficients, which depend primarily on arithmetic operations. Model based collaborative filtering algorithms provide recommendations by developing a machine learning model on existing user ratings and then to predict user's rating of unrated items [7]. As building a model is both time and resource consuming. It is difficult to add data to model based systems. The quality of prediction for memory based algorithms is good as it uses the entire database every time it makes a prediction. Thus, we go with memory based algorithms for the proposed work.
The similarity metrics [8] used for recommending products in the SmartMart application are Cosine, Pearson Correlation Coefficient and Jaccard similarity methods.
where Ui represents users, who have purchased only item i & Uij represents users who have purchased both i & j item.
• Jaccard similarity technique calculates the extent of similarity between two users by taking number of preferences common between them and is shown in equation 3.
where Ui represents users, who have purchased only item i.
As mentioned in the previous section this paper implements recommendation system using three types of algorithms namely item-based collaborative filtering, popularity model and userbased collaborative filtering. Popularity based recommendation systems learn data in a certain way, after which, suggest items that are in trend at the moment. For instance, if there exists a product that is being purchased by many users then it is likely that it will be recommended to every user.

Details of Dataset and Data Pre-processing
The proposed work makes use of two datasets. First one is MySQL database created to store details pertaining to the customers, their transactions and product information. The other one is an open-source dataset [9].
The MySQL database being employed has the following tables that stores vital informationthe validation details of the customers; the customer table contains the details of all the existing customers; the inventory table contains details like product ID, product name and their respective quantities that directly correlate to the stock available with the seller; the billing table which stores the bill generated during shopping and holds information like user ID, items bought, time of purchase, etc and the orders table that contains all the bills generated along with respective product information.
The open-source dataset that is used to build a recommendation system is available in .csv format. It has information regarding the purchase history of the customers. There are 3 approaches in terms of how data is being used.
Taking customer ID and product ID as they are.
Creating a dummy field for marking whether a customer bought an item or not.
Normalize purchase frequency of each item across users by first creating a user-item matrix.
Since normalization is always used as a basic component for the predictor models and most often produces the best results when it comes to recommender systems, it was decided to proceed with normalized data. We have normalized the purchase history of users on a scale of 0 to 1. 1 depicts the greatest number of purchases for an item and 0 depicts 0 purchase count for that item.

Results and Discussions
The proposed work evaluates the different Similarity Metrics for user-item recommendation algorithm based on recall, precision, and F-value with the number of recommended items for each user as 10 [10]. The results presented in Table 1 evaluate the different similarity matrices for user-item recommendation algorithm by using the average value of recall, precision, and Fvalue. Table 1 also provides the recall, precision, and F-value for popularity model variant of recommendation system. Cut-off 'K' is a user definable integer that is set by the user to match the top-N recommendations. The value of cut-off is kept as 10 (K=10).  From Table-1 it can be inferred that the Jaccard similarity has the highest F-Value (0.04546) followed by cosine similarity (0.04399). The mean precision and mean recall are also the highest for Jaccard similarity (0.0271 and 0.1414 respectively). By the results it can be seen that Jaccard similarity is the best metrics to recommend products for the dataset used in this paper.

Conclusion
The Virtual SmartMart application is an innovative platform, which evolves the way people shop online when compared to different E-commerce websites. The above deployed recommendation models make sure that the customers never miss out on any current trending products (Popularity model), the most liked products by other users (user-item model) and best products related to the items present in the cart (item-based model). Therefore, the recommended products will provide customers a sense of satisfaction.
This paper presents a comparative study of different similarity metrics for user-based recommendation algorithm based on precision, recall, F-value and accuracy. From results obtained it can be seen that the Pearson co-efficient metric gives the highest accuracy value (86.6%) but since the F-value, mean precision and mean recall values are very less, Jaccard similarity metric is preferred.
From the dealer point of view, Unity Analytics (integrated with Unity game engine) with SmartMart will help him in monitoring the most selling products, the most active time during a day, the number of shoppers active at any point of time and the countries with leading number of shoppers. This helps dealer make appropriate decision at right time. Integration of Unity Analytics with the SmartMart can be considered as future work for this work proposed here.
For any company retaining customers and up scaling of business are two very important aspects. SmartMart Unity application successfully helps a company in doing so. The limitations of the virtual supermarket include cold start problem, data sparsity problem and scalability. This can be overcome by developing a hybrid recommendation system; a combination of collaborative and content-based filtering. This can be taken up as future work.