{"id":50429010,"url":"https://github.com/steviecurran/interactive-customer-segmentation","last_synced_at":"2026-05-31T12:30:55.588Z","repository":{"id":358707239,"uuid":"1242675223","full_name":"steviecurran/interactive-customer-segmentation","owner":"steviecurran","description":"Interactive Customer Segmentation Pipeline","archived":false,"fork":false,"pushed_at":"2026-05-18T17:58:00.000Z","size":1062,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-18T19:33:28.773Z","etag":null,"topics":["clustering","custumer-segmentation","dendrogram","elbow-plot","hierarchical-clustering","pricing","principal-component-analysis","python","sklearn","unsupervised-machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steviecurran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-18T16:39:11.000Z","updated_at":"2026-05-18T17:58:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/steviecurran/interactive-customer-segmentation","commit_stats":null,"previous_names":["steviecurran/interactive-customer-segmentation"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/steviecurran/interactive-customer-segmentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steviecurran%2Finteractive-customer-segmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steviecurran%2Finteractive-customer-segmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steviecurran%2Finteractive-customer-segmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steviecurran%2Finteractive-customer-segmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steviecurran","download_url":"https://codeload.github.com/steviecurran/interactive-customer-segmentation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steviecurran%2Finteractive-customer-segmentation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33731998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["clustering","custumer-segmentation","dendrogram","elbow-plot","hierarchical-clustering","pricing","principal-component-analysis","python","sklearn","unsupervised-machine-learning"],"created_at":"2026-05-31T12:30:54.833Z","updated_at":"2026-05-31T12:30:55.577Z","avatar_url":"https://github.com/steviecurran.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Interactive Customer Segmentation Pipeline\n\nAn interactive machine learning workflow for customer segmentation using hierarchical clustering, K-means clustering, and Principal Component Analysis (PCA).\n\nThis project focuses on exploratory segmentation and interpretability rather than static clustering outputs. The notebook allows dynamic adjustment of clustering parameters, dimensionality reduction thresholds, and visualisation settings to investigate how customer populations separate into meaningful behavioural groups.\n\n### Project Overview\n\nCustomer segmentation is widely used in:\n- marketing and targeting\n- customer retention\n- pricing strategy\n- behavioural analytics\n- product personalisation\n\nThis project demonstrates an end-to-end unsupervised learning pipeline combining:\n- exploratory analysis\n- hierarchical clustering\n- K-means clustering\n- PCA dimensionality reduction\n- interactive visualisation tools\n\nUnlike standard clustering examples, this workflow emphasises:\n- interactive exploration\n- cluster interpretation\n- dynamic parameter selection\n- reusable analytical tooling\n\n![](https://raw.githubusercontent.com/steviecurran/interactive-customer-segmentation/refs/heads/main/dendo.png)\n  \n### Key Features\n**Hierarchical Clustering**\n- Ward linkage dendrogram visualisation\n- Interactive branch selection\n- Large-dataset sampling safeguards\n**K-Means Segmentation**\n- Dynamic cluster count selection\n- Interactive feature comparison\n- Cluster visualisation with custom labels\n**Principal Component Analysis (PCA)**\n- Automatic variance-threshold component selection\n- Manual component override\n- Explained variance diagnostics\n- PCA-space cluster projection\n**Interactive Workflow**\n- Widget-driven exploration\n- Dynamic cluster naming\n- Adjustable visualisation axes\n- Real-time recomputation of segmentation outputs\n\n### Example Workflow\n**1. Explore Dataset Structure**\n\nHierarchical clustering is first used to estimate the natural grouping structure within the dataset.\n\n**2. Generate Customer Segments**\n\nK-means clustering partitions the dataset into behavioural groups.\n\n**3. Interpret Clusters**\n\nClusters are translated into meaningful customer profiles \n\n**4. Reduce Dimensionality**\n\nPCA compresses the feature space while preserving most of the dataset variance.\n\n**5. Visualise Cluster Separation**\n\nClusters are projected into lower-dimensional PCA space for interpretability and exploratory analysis.\n\n![](https://raw.githubusercontent.com/steviecurran/interactive-customer-segmentation/refs/heads/main/segmentation_2.png)\n\n### Technologies Used\n\nPython Libraries\n- pandas\n- numpy\n- matplotlib\n- seaborn\n- scikit-learn\n- scipy\n- ipywidgets\n\n### Example Outputs\n\nThe notebook includes:\n- dendrogram visualisations\n- elbow plots\n- explained variance analysis\n- interactive scatter plots\n- PCA cluster projections\n- labelled segmentation outputs\n\n### Business Interpretation\n\nThe segmentation pipeline identifies statistically distinct customer groups with meaningful behavioural and demographic characteristics.\n\nPotential applications include:\n\n- targeted marketing campaigns\n- customer retention strategies\n- pricing differentiation\n- behavioural profiling\n- product recommendation systems\n\nThe interactive design allows rapid exploration of how segmentation changes under different assumptions and clustering configurations.\n\n### Running the Notebook\n\nClone the repository:\n\n    git clone https://github.com/steviecurran/\u003crepo-name\u003e.git\n\nInstall dependencies:\n\n    pip install pandas numpy matplotlib seaborn scikit-learn scipy ipywidgets\n\nLaunch Jupyter Notebook:\n\n    jupyter notebook\n\n![](https://raw.githubusercontent.com/steviecurran/interactive-customer-segmentation/refs/heads/main/variance.png)\n\n### Notes\n\nThis project prioritises:\n\n- interpretability\n- exploratory analysis\n- interactive workflow design\n\nrather than production deployment or automated optimisation pipelines.\n\nThe notebook is intended as a reusable analytical framework for segmentation exploration and educational demonstration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteviecurran%2Finteractive-customer-segmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteviecurran%2Finteractive-customer-segmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteviecurran%2Finteractive-customer-segmentation/lists"}