I modified a Collaborative Filtering (CF) technique based on matrix factorisation for an e-commerce business in order to enhance cross-category product recommendations. Sparse interaction data between different categories (e.g., electronics and home decor) presented a hurdle. A platform found it difficult to advise products across several categories in a real-world e-commerce scenario, such suggesting home decor items to users who purchased electronics. Using TF-IDF to encode textual input, I added product metadata (such as descriptions, brands, and categories) as extra features to their Matrix Factorization-based Collaborative Filtering (CF) algorithm. I used Graph Neural Networks (GNNs) to train latent connections from co-purchase and co-view patterns after modelling products as nodes in a graph in order to find cross-category associations. In order to ensure relevance across and within categories, the final recommendation system blended content-based and CF scores using a weighted ensemble. For example, a customer purchasing a smartphone may get personalised recommendations for a desk lamp or other smart home appliance. I used browsing and demographic data to initialise recommendations in order to handle scant data for new users. The system became more useful and interesting for a variety of buying habits thanks to this hybrid approach, which also increased cross-category click-through rates by 22%. This solution showed the value of combining strategies and customising algorithms to meet particular business goals by increasing user engagement by 15% and buy conversion rates by 12%.
I was developing a forecast model for middle-mile and last-mile delivery operations for one of the largest B2B retailers in the US. Typically, the default method for training the model parameters is to minimize the OLS (ordinary least squares) loss function or some standard loss function. Even though this will give us the best model by equally penalizing under-forecasting and over-forecasting, the forecast generated from such a model might not always align with operational challenges and bottlenecks. For example, in my use case, over-forecasting was preferred over under-forecasting for delivery operations. It is not easy to arrange extra delivery capacity on short notice, which leads to delays in fulfilling customer orders. Therefore, the delivery managers wanted to get forecasts that allow them to fulfill all customer orders in a timely manner rather than planning for less capacity and losing out on customer satisfaction. I changed the loss function to penalize under-forecasting more so that the model parameters could be trained accordingly. This model generated a more robust forecast from a delivery operations perspective. The takeaway is understanding the use case for any mathematical model and modifying the algorithm accordingly to suit the context.