Skip to content

GuyGael-Karekezi/ML

Repository files navigation

Clustering Countries with Demographic Indicators

This project groups countries into demographic clusters using fertility, mortality and life expectancy indicators. The goal is to explore whether countries naturally form meaningful groups based on these indicators.

Steps in this project

  1. Load and clean the dataset using DataProcessor
  2. Create new features using FeatureEngineer
  3. Scale selected features for clustering
  4. Use PCA to reduce dimensionality for visualization
  5. Apply K-Means clustering and choose the best number of clusters
  6. Evaluate cluster quality using silhouette score, Calinski Harabasz index and Davies Bouldin index
  7. Apply hierarchical clustering and plot a dendrogram
  8. Save final cluster assignments

Code structure

  • src/data_processor.py
  • src/feature_engineer.py
  • src/cluster_modeler.py
  • src/evaluator.py
  • notebooks/clustering_analysis.ipynb
  • results/clusters.csv

How to run

Open the notebook clustering_analysis.ipynb and run all cells in order.

About

All about datascience and machine learning

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors