Skip to content

duan-n2d/Customer-Segmentation-with-RFM-and-KMeans

Repository files navigation

Customer Segmentation in Marketing Using RFM and Machine Learning

This project is the final assignment for the interdisciplinary research methods course at the University of Economics and Law, focusing on customer segmentation in marketing using RFM (Recency, Frequency, Monetary) analysis combined with machine learning techniques.

Table of Contents

Introduction

In marketing and any business field related to customer service, understanding and effectively targeting customers is crucial. This project aims to segment customers into different groups based on their behavior and value using the RFM model and machine learning techniques. This segmentation helps businesses to tailor their marketing strategies more effectively.

Project Overview

This research combines traditional marketing segmentation methods with modern data science techniques. By applying the RFM model and K-means clustering, the project segments customers into distinct groups, providing insights for personalized marketing strategies.

Research Methods

The project utilizes a combination of quantitative and qualitative research methods: screenshot

  • Literature Review: Reviewing existing research on customer segmentation and machine learning applications in marketing.
  • Data Collection: Using sales and customer data from AdventureWorks Cycles.
  • Data Analysis: Applying Exploratory Data Analysis (EDA) and data preprocessing techniques.
  • Model Implementation: Using RFM analysis and K-means clustering for segmentation.
  • Evaluation: Assessing the model using metrics such as the Elbow method and Silhouette score.

Technologies Used

  • Programming Language: Python
  • Libraries: Pandas, NumPy, Scikit-learn, Matplotlib, Seaborn
  • Tools: Jupyter Notebook

Installation

To run this project locally, follow these steps:

  1. Clone the repository:
git clone https://github.com/yourusername/customer-segmentation.git
  1. Navigate to the project directory:
cd customer-segmentation
  1. Create a virtual environment:
python3 -m venv venv
  1. Activate the virtual environment: On Windows:
venv\Scripts\activate

On MacOS/Linux:

source venv/bin/activate
  1. Install the dependencies:
pip install -r requirements.txt

Usage

  1. Prepare the data: Place your dataset in the data/ directory.
  2. Run the Jupyter Notebook:
jupyter notebook
  1. Open and run the notebook: Open customer_segmentation.ipynb and run the cells to see the analysis and results.

Contributors

Nguyen Duy Duan, Bui Chanh Thien, Le Thi Thu Tinh, Le Huong Giang, Nguyen Thuy Tram.

Acknowledgments

We extend our sincere gratitude to our professors, PGS.TS. Ho Trung Thanh and ThS.Nguyen Văn Ho, for their guidance and support. We also thank the University of Economics and Law for providing us with the resources and knowledge to complete this project.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Customer Segmentation with RFM and KMeans

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published