Challenge

Optimizing Humanitarian Aid Allocation: Classification of Countries Using PCA and Clustering

Classification of Countries for Humanitarian Aid Allocation


Project Overview

This project aims to classify countries based on socio-economic and health factors to strategically allocate $120 million in humanitarian aid. The classification is achieved using Principal Component Analysis (PCA), K-Means Clustering, and Hierarchical Clustering techniques. The goal is to identify countries in dire need of aid and prioritize them for funding.


Data Preparation

1. Data Import:

  • The dataset, Country-data.xlsx, contains socio-economic and health indicators for 167 countries.

2. Data Columns:

  • country: Name of the country.
  • child_mort: Child mortality rate (per 1,000 live births).
  • exports: Exports as a percentage of GDP.
  • health: Health expenditure as a percentage of GDP.
  • imports: Imports as a percentage of GDP.
  • income: Gross national income per capita.
  • inflation: Inflation rate (percentage).
  • life_expec: Life expectancy at birth (years).
  • total_fer: Total fertility rate (children per woman).
  • gdpp: GDP per capita.


Preprocessing and PCA

1. Data Preprocessing:

  • The 'country' column is removed as it is not needed for the analysis.
  • The remaining data is normalized using StandardScaler to standardize the features.

2. Principal Component Analysis (PCA):

  • PCA is performed to reduce the dimensionality of the dataset to two principal components.
  • This reduction helps in visualizing the data and understanding its structure.

3. Visualization:

  • The PCA results are visualized in a scatter plot with Principal Component 1 (PC1) and Principal Component 2 (PC2).


K-Means Clustering

1. Determining Optimal Clusters:

  • The Elbow Method is used to determine the optimal number of clusters by analyzing the inertia (sum of squared distances from points to their cluster center) for different numbers of clusters.

2. Grid Search for K-Means:

  • A Grid Search is performed to find the best number of clusters and to fit the K-Means model.
  • The optimal K-Means model is applied to the normalized data to classify countries into clusters.

3. Visualization:

  • The results of K-Means clustering are visualized on the PCA plot, with countries colored according to their assigned cluster.


Hierarchical Clustering

1. Grid Search for Hierarchical Clustering:

  • A Grid Search is conducted to determine the optimal number of clusters and the best linkage method (ward, complete, average, single) for Agglomerative Clustering.

2. Fitting the Model:

  • The best Agglomerative Clustering model from Grid Search is applied to the normalized data.
  • The resulting clusters are added to the PCA dataframe.

3. Visualization:

  • Hierarchical clustering results are visualized on the PCA plot, showing clusters formed by Hierarchical Clustering.

4. Dendrogram:

  • A dendrogram is created to illustrate the hierarchical relationships between clusters, helping to understand how clusters are formed.


Results and Recommendations

1. Cluster Analysis:

  • The K-Means and Hierarchical Clustering results reveal distinct clusters of countries based on their socio-economic and health conditions.
  • Countries in clusters with high child mortality rates, low income, and other indicators of critical need should be prioritized.

2. Strategic Allocation:

  • Based on clustering results, the CEO should focus on countries in the clusters with the most severe indicators of need. This prioritization ensures that the humanitarian aid is allocated to the countries that will benefit the most from it.

3. Visualization Insights:

  • The PCA and clustering visualizations provide a clear understanding of the distribution of countries and their classification, aiding in decision-making.


Conclusion

The application of PCA, K-Means Clustering, and Hierarchical Clustering has successfully identified clusters of countries in need of humanitarian aid. By analyzing these clusters, the NGO can make informed decisions about where to allocate the $120 million effectively to maximize its impact.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.