This repository contains code for customer segmentation with K means clustering algorithm. The data used is the commonly used data set that can be found here K means clustering is used to build the segmentation model. The model is built in R. The model is based on frequency, recency, and monetary segmentation.
The objective of the repository:
- To provide a reproducible logic for K means customer segmentation that can be applied to different data sets;
- To showcase some ideas for further analysis of the segments like assessing the segment value for the business and providing basic code for geospatial visualisation of the dominant segments per.
Before attempting to reproduce the code for your own needs pay attention to the business context of the question you are dealing with. At every step of the code you will find notes that will help you adjust the code to your business scenario.
This repository is part of a bigger project for development of basic marketing analytics stack. The development of the stack will be described also in my Medium Blog. The idea is to build a stack of reusable and replicable templates for ML based marketing analysis. Every template in the stack will resolve a particular business problem through machine learning model. The template will be related to a separately developed shiny app for interactive representation of the data analysis and model output. The aim of the app is to serve as a reusable framework for representation of the model.
This repository contains 3 main files: