This repository contains the analysis and code for the 2nd Homework Assignment of the "Clustering Algorithms" graduate course of the MSc Data Science & Information Technologies Master's programme (Bioinformatics - Biomedical Data Science Specialization) of the Department of Informatics and Telecommunications department of the National and Kapodistrian University of Athens (NKUA), under the supervision of professor Konstantinos Koutroumbas, in the academic year 2023-2024.
The assignment includes an implementation of clustering algorithms applied to socio-economic and health data from 167 countries. The analysis uses features such as GDP per capita, life expectancy, child mortality, and more, to identify meaningful clusters of countries based on their development levels. The project is implemented in MATLAB and focuses on understanding how various socio-economic and health indicators contribute to global disparities.
The main goal of this project is to apply clustering techniques to categorize countries into distinct groups based on their socio-economic and health indicators. The workflow includes data preprocessing, feature selection, normalization, and the application of clustering algorithms such as K-Means and K-Medians. Additionally, the project evaluates the quality of clustering using metrics like the Silhouette Score and Calinski-Harabasz Index, and provides visualization of the results.
- Data Exploration ("Feeling the Data")
- Analysis of individual features for range, distribution, and correlation.
- Identification and handling of missing values.
- Normalization using Z-score and Min-Max scaling.
- Feature Selection and Transformation
- Principal Component Analysis (PCA) and correlation analysis to select significant features.
- Two experiments conducted:
- Experiment A: GDPP, Inflation, Total Fertility, and Life Expectancy (PCA-based).
- Experiment B: GDPP, Inflation, Total Fertility, Health, and Life Expectancy (Correlation-based).
- Clustering Algorithm Selection
- K-Means and K-Medians algorithms are used due to their efficiency in grouping compact clusters.
- Execution of Clustering Algorithms
- Determining the optimal number of clusters using methods like the Elbow Method and Silhouette Analysis.
- Clustering experiments for 3-5 clusters and evaluating results.
- Cluster Characterization
- Analysis of cluster properties using descriptive statistics and visualizations.
- Identification of the most contributing features to the clustering process.
- Visualization
- Heatmaps for correlation coefficients.
- Histograms and boxplots for feature distributions.
- Silhouette plots and elbow curves for cluster quality.
- Clustering revealed meaningful groupings of countries based on socio-economic and health metrics.
- Experiment A showed more compact clusters using fewer features, while Experiment B provided deeper insights with additional features.
- The optimal number of clusters was determined to be 3, aligning with common economic groupings such as developed, developing, and least developed countries.
To clone this repository, run the following command in your terminal:
git clone https://github.com/GiatrasKon/Clustering-Countries-Socioeconomic-Health-Analysis.git
- MATLAB: Core programming environment used for all computations and visualizations.
- MATLAB Toolboxes:
- Statistics and Machine Learning Toolbox
- Optimization Toolbox
- MATLAB Toolboxes:
- Dataset: Kaggle - Unsupervised Learning on Country Data.
- Open MATLAB and navigate to the repository folder.
- Ensure that the
data_country.mat
,Country-data.csv
anddata-dictionary.csv
are in thedata/
directory before running the script. - Run the
cluster_countries.m
script to process the dataset and generate output. - Follow the inline comments in the scripts to customize parameters like the number of clusters and seed numbers.
Refer to the documents
directory for the assignment description and report.