The website browsing products or categories
The step of checking and cleaning information is crucial to the final effect in accordance with the Garbage In Garbage Out principle. For the sake of clarity of this article we will skip the data verification stage and go straight to their preparation. First of all we ne to aggregate data on the value of sales of individual products because this is our measure of interest. dfretailagg dfretail\ .groupby \ .agg totalquantity quantity sum totalorder transactionid count totalamount lineitemamount sum \ .resetindex dfretailagg.head The fields in the newly creat set are in turn the unique product ID in the database the sum of items sold the sum of orders in which the product occurr the sum of the sales value.Bas on the ID we can combine the calculat sales values with product data and fill in the values for products that have never been purchas with zeros. dfproducts dfproducts.merge dfretailagg onproductid howleft dfproducts Taiwan WhatsApp Number List dfproducts.fillna . Definition of product clusters In order to build the final model we ne to have labels that will determine the value of individual products. We can get them in a variety of ways including RFM analysis. On our blog you can find what RFM analysis is and how to apply it. That text focus on the context of customers but the concept of RFM is so broad that it can be appli to other fields as well.
https://static.wixstatic.com/media/789318_6687943033084c6da10da360a5432cbd~mv2.png/v1/fill/w_704,h_398,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/789318_6687943033084c6da10da360a5432cbd~mv2.png
If we take into account the sales characteristics of the products we offer in the select period volume value frequency etc. we can use RFM as in the case of customers to determine the key areas of our assortment. We can do it in a classic way by counting individual percentiles and then constructing appropriate groups from them determining those that are important to us. An alternative is to use models from the field of unsupervis learning Unsupervis learning so that the algorithm itself finds clusters that are relevant to it.
页:
[1]