Dfproducts dfproducts.merge dfretailagg onproductid howleft dfproducts 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. 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. In this approach we will use this alternative we will Taiwan WhatsApp Number List choose one of the most popular models of this type i.e. Model construction Before we start thinking about the model itself we first ne to make a selection of features and then prepare them accordingly if they require it.
We will focus only on the features of the product because we want to check whether there are relationships among them that determine high or low value for customers. Below I have select features that may be potentially relevant to our model. features [productgroup productcategory producttype unitofmeasure taxexemptyn promoyn newproductyn] dfproducts[features].head Features can be of different types they can be categorical or continuous values. Depending on the type of model we are using some actions may be necessary such as converting to numeric values and normalization.


