{"id":26553973,"url":"https://github.com/nthaihoc/rfm-segmentation-ml","last_synced_at":"2026-04-28T01:32:28.500Z","repository":{"id":282905067,"uuid":"950043070","full_name":"nthaihoc/rfm-segmentation-ml","owner":"nthaihoc","description":"An automatic machine learning based customer segmentation model with RFM analysis at ICTA conference 2024","archived":false,"fork":false,"pushed_at":"2025-03-17T15:39:37.000Z","size":226,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T06:46:42.324Z","etag":null,"topics":["customer-segmentation","hadoop","kmeans-clustering-algorithm","machine-learning","mllib","rfm-analysis","spark"],"latest_commit_sha":null,"homepage":"https://nthaihoc.github.io/rfm-segmentation-ml/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nthaihoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-17T14:40:50.000Z","updated_at":"2025-05-26T23:50:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"0de09e4d-77af-49c6-b23b-a1ec5bc299e0","html_url":"https://github.com/nthaihoc/rfm-segmentation-ml","commit_stats":null,"previous_names":["nthaihoc/rfm-segmentation-ml"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/nthaihoc/rfm-segmentation-ml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nthaihoc%2Frfm-segmentation-ml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nthaihoc%2Frfm-segmentation-ml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nthaihoc%2Frfm-segmentation-ml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nthaihoc%2Frfm-segmentation-ml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nthaihoc","download_url":"https://codeload.github.com/nthaihoc/rfm-segmentation-ml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nthaihoc%2Frfm-segmentation-ml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32362781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["customer-segmentation","hadoop","kmeans-clustering-algorithm","machine-learning","mllib","rfm-analysis","spark"],"created_at":"2025-03-22T09:38:08.082Z","updated_at":"2026-04-28T01:32:28.484Z","avatar_url":"https://github.com/nthaihoc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An Automatic Machine Learning based Customer Segmentation Model with RFM Analysis\n\n\u003cimg src=\"background.png\" alt=\"icta\" style=auto/\u003e\n\n[Thai Hoc Nguyen*](https://nthaihoc.github.io/about-me/), [Xuan Thi Tran*](https://www.facebook.com/profile.php?id=100011111342596) (*equal contribution)\n\n| [**PDF**](https://) \n| [**Website**](https://books.google.com.vn/books?hl=vi\u0026lr=\u0026id=U7VNEQAAQBAJ\u0026oi=fnd\u0026pg=PA151\u0026ots=nVD6xihs4e\u0026sig=0ttGfynVgVQVw_Xn1QdzW0_babM\u0026redir_esc=y#v=onepage\u0026q\u0026f=false) \n|\n\n\n## Introduction\nThe focus of many companies is to provide the best products and services to attract attention in the market.Each customer has different preferences due to variations in age, gender, and other personal factors. Purchasing behavior is a significant indicator that helps determine customer's preferences. To achieve this, they must find the way to classify customers with similarities into segments. Customer segmentation based on their direct or indirect interaction behavior with the company can be challenging due to the difficulty in selecting key features that highlight the interactions.\n\nRFM model that refers to the three key features of Recency, Frequency, and Monetary value has been considered as an effective technique to expose valuable insights of customers' behaviors. Some studies have addressed that applying the K-means algorithm combined with the RFM model can be a promiser solution for customer segmentation. \n\nWith the continuous growth of generated data, it is crucial to deploy a machine learning based segmenting model in a Big data system. Hadoop and Spark are among best Big data storage and processing technologies. In this study, we propose an automatic, engaged machine learning based customer segmentation solution developed by Spark application framework while costumer data are stored in the HDFS storage. \n\n\n## Environment Setup\n\n### Install Hadoop and Spark\nFirst, you need to install Hadoop and Spark tools. Follow the installation instructions below:\n- [Installing latest Hadoop 3.4 on Ubuntu 2024](https://medium.com/@nsidana123/installing-latest-hadoop-3-4-on-ubuntu-2024-easy-installation-guide-874f889fede7)\n- [How to Install Spark on Ubuntu](https://medium.com/@redswitches/how-to-install-spark-on-ubuntu-965266d290d6)\n \n### Create environment\nCreate virtual environments to ensure that libraries between applications do not conflict.You can create virtual environments anywhere you want. Using `python` for Window or `python3` for Linux.\n\n```bash\n$ python3 -m venv demo-project\n$ cd demo-project\n$ source bin/activate\n```\n### Download Source Code\nDownload repo from github to local using command:\n\n```bash\n$ git clone https://github.com/nthaihoc/rfm-segmentation-ml.git\n```\n\n### Install Library Dependencies \n\nYou need to install the necessary libraries to manage and run the application. Using `pip` for Window or `pip3` for Linux.\n\n```bash\n$ cd rfm-segmentation-ml\n$ pip3 install -r requirements.txt\n```\n\n### Folder Structure\n\nThere are some important files as `artifacts`, `src` and `dvc.yaml`.\n\n+ `artifact` include model and results file\n+ `src` include source code of application\n+ `dvc.yaml` is a configuration file, supporting automatic command line execution, for building and managing pipelines\n\nSee more information about [`dvc`](https://dvc.org/)\n\n\u003cdiv style=\"text-align: center;\"\u003e\n    \u003cimg src=\"folder_structure.png\" alt=\"folder structure\" style=\"auto;\" /\u003e\n\u003c/div\u003e\n\n### PipeLine Start\n\nAfter successfully installing all the above steps, run the following command to start testing the application.\n\n```bash\n$ dvc repro\n```\n\n## Contributing\nFor any feedback or comments, please feel free to contact me through the following information [**thaihoc.ictu@gmail.com**](mailto:thaihoc.ictu@gmail.com)\n\n## Citation\n```bash\n@inproceedings{xuan2024automatic,\n  title={An Automatic Machine Learning Based Customer Segmentation Model with RFM Analysis},\n  author={Xuan, Tran Thi and Hoc, Nguyen Thai},\n  booktitle={Advances in Information and Communication Technology: Proceedings of the 3rd International Conference ICTA 2024},\n  pages={151},\n  organization={Springer Nature}\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnthaihoc%2Frfm-segmentation-ml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnthaihoc%2Frfm-segmentation-ml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnthaihoc%2Frfm-segmentation-ml/lists"}