Empowering Small Farmers: MARE - Mayani's Personalized Recommendation Engine

Empowering Small Farmers: MARE - Mayani's Personalized Recommendation Engine

Table of Contents

  1. Introduction
  2. Customer Clusters
    1. Nanai Karidad - The Regular Customer
    2. Lorenzo - The Health Conscious Customer
    3. Ito Andrelito - The Occasional Buyer
  3. Objective: Creating a Recommendation Engine for Miani
  4. Data Analysis
    1. Daily Sales Analysis
    2. Sales by Day of the Week
    3. Top 10 City Sales
    4. Seasonality of Mayani Products
    5. Granbag Sahan Promotion Analysis
  5. Current Recommendation System of Miani
  6. Methodology
    1. Business Understanding
    2. Data Preparation
    3. Exploratory Data Analysis (EDA)
    4. Feature Engineering
    5. Models: RFM, K-means Clustering, Bay Analysis, and A Priori
    6. Evaluation of Results
    7. Model Deployment
  7. RFM Customer Segmentation
    1. Regular Customers
    2. Inactive Customers
    3. Loyal Customers
  8. Connecting Models: General Priority Algorithm and Customer Segmentation
  9. The Apriori Algorithm
  10. Limitations of the Recommendation Engine
  11. Recommendations for Miami
    1. Market Basket Analysis for Bundle Suggestions
    2. Utilizing RFM Clusters for Personalized Marketing Campaigns
    3. Standardization of Products for Better Data Analysis
  12. Conclusion

A Better Recommendation Engine for Miani: Empowering Small Farmers through Market Baskets Analysis


The Pinya Group is excited to present Capstone, an advanced recommender engine designed specifically for Miani, an online grocery platform. Our goal is to create a recommendation engine that improves Miani's customer market baskets, thereby empowering smallholder farmers and enhancing their livelihoods. To achieve this, we first need to analyze customer clusters and understand their buying habits. Through data analysis and implementation of various models like RFM, K-means clustering, and Apriori algorithm, we can develop a more effective recommendation system. In this article, we will explore the entire journey of developing this recommendation engine and its potential impact on Miani's business.

Customer Clusters

To better understand Miani's customers, let's meet three individuals who represent different customer segments. Nanai Karidad is a regular customer who discovered online grocery shopping and has become a loyal fan. Lorenzo is a health-conscious customer who orders vegetables online to maintain a healthy lifestyle and support farmers. Lastly, Ito Andrelito occasionally buys groceries online but often forgets to pre-order due to his busy schedule. These customer clusters are an essential part of our objective to create a recommendation engine that caters to their unique preferences and increases Miani's customer market baskets.

Objective: Creating a Recommendation Engine for Miani

At its core, our objective is to develop a recommendation engine that takes into account the buying habits of Miani's customers and suggests relevant products based on their previous purchases. By understanding the relationship between products frequently bought together, we can enhance the overall shopping experience and encourage customers to explore new products. This, in turn, will drive market baskets and support smallholder farmers.

Data Analysis

Before diving into the development of the recommendation engine, we need to analyze the data provided by Miani. Our analysis includes examining daily sales trends, sales by day of the week, top city sales, product seasonality, and the impact of promotional campaigns. By understanding these patterns, we can uncover valuable insights that will inform our recommendation engine's design.

Current Recommendation System of Miani

To provide a basis for comparison, we evaluate Miani's existing recommendation system, which relies on Shopify. Through reverse engineering, we discovered that the current system's clustering of products is not efficient, leading to potential recommendations of the same products for different users. We aim to improve this by applying real transaction data analysis and creating a more coherent and interconnected network of recommended products.


Our development process starts with clearly understanding the business requirements and gathering the necessary data. After cleaning and preparing the data, we proceed with exploratory data analysis (EDA) to gain insights into the data's characteristics. Subsequently, we employ feature engineering techniques to extract meaningful features that will contribute to our models. These models include RFM (Recency, Frequency, Monetary), K-means clustering, Bay analysis, and Apriori algorithm. The results of these models are meticulously evaluated before deploying the final recommendation engine.

RFM Customer Segmentation

Utilizing the RFM approach, we segment Miani's customers into three clusters: regular customers, inactive customers, and loyal customers. Regular customers make consistent purchases but spend less than loyal customers. Inactive customers show limited activity in all aspects, whereas loyal customers are frequent buyers who exhibit high spending patterns. These customer segments play a crucial role in understanding customer behavior and tailoring recommendations accordingly.

Connecting Models: General Priority Algorithm and Customer Segmentation

To ensure a seamless user experience, we integrate two recommendation algorithms. For new users with no account history, we apply a general priority algorithm that suggests popular products. For existing users, we personalize recommendations based on their segment from the customer segmentation models. This combination provides a comprehensive recommendation system that caters to both new and existing customers.

The Apriori Algorithm

To improve the accuracy of recommendations and enhance the customer shopping experience, we implement the Apriori algorithm. This algorithm identifies products that are frequently bought together and recommends them based on the metrics of support and confidence. By suggesting relevant products, customers are more likely to explore and add complementary items to their carts.

Limitations of the Recommendation Engine

Although the recommendation engine shows promising results, there are certain limitations to consider. Firstly, the data used for analysis does not include demographic information, limiting its scope. Additionally, the models rely solely on past transaction data, making them susceptible to concept drift. To overcome these limitations, future improvements should focus on gathering more data, including demographic information, and incorporating real-time data processing capabilities.

Recommendations for Miami

In addition to the recommendation engine, we propose utilizing market basket analysis to suggest product bundles and personalized marketing campaigns. By leveraging the RFM customer segmentation, Mayani can tailor marketing messages based on customer segments. We also emphasize the importance of standardizing products to facilitate future data analysis as Mayani grows and becomes more influential in the Filipino agricommerce landscape.


In conclusion, our Capstone project aims to revolutionize Miani's recommendation system and empower smallholder farmers by enhancing market baskets. Through the implementation of customer segmentation, RFM analysis, and the Apriori algorithm, we can provide personalized recommendations that align with customers' preferences. Furthermore, utilizing market basket analysis and customer segmentation allows for targeted marketing campaigns and bundle suggestions, ultimately driving customer engagement and boosting Mayani's success in the online grocery market.


  1. Developing a recommendation engine that increases Miani's customer market baskets
  2. Analyzing customer clusters and buying habits for personalized recommendations
  3. Utilizing RFM customer segmentation to understand customer behavior
  4. Integrating the Apriori algorithm to suggest frequently bought together items
  5. Enhancing the overall shopping experience and supporting smallholder farmers
  6. Suggestions for bundle recommendations and personalized marketing campaigns


Q: How does the recommendation engine work? A: The recommendation engine analyzes customers' buying habits and suggests relevant products based on their previous purchases. By identifying products frequently bought together, customers are encouraged to explore and add complementary items to their carts.

Q: What is RFM customer segmentation? A: RFM stands for Recency, Frequency, Monetary, which are three important factors used to segment customers based on their spending habits. Regular customers, inactive customers, and loyal customers are identified through this segmentation.

Q: How can market basket analysis help Mayani? A: Market basket analysis allows Mayani to suggest product bundles and create personalized marketing campaigns. By understanding the products frequently bought together, Mayani can offer bundled deals and target specific customer segments with tailored messages.

Q: What are the limitations of the recommendation engine? A: The recommendation engine is limited by the lack of demographic data and reliance on past transaction data. To overcome these limitations, gathering more data, including demographic information, and incorporating real-time data processing capabilities are recommended.

Q: How can Mayani standardize products for better data analysis? A: Standardizing products will facilitate future data analysis as Mayani grows. By ensuring consistency in product categorization, naming, and attributes, it becomes easier to extract meaningful insights and improve the recommendation engine's accuracy.

I am a shopify merchant, I am opening several shopify stores. I use ppspy to find Shopify stores and track competitor stores. PPSPY really helped me a lot, I also subscribe to PPSPY's service, I hope more people can like PPSPY! — Ecomvy

Join PPSPY to find the shopify store & products

To make it happen in 3 seconds.

Sign Up
App rating
Shopify Store
Trusted Customers
No complicated
No difficulty
Free trial