This project visualizes the top 10 countries based on their Principal Component Analysis (PCA) values for the first two principal components (PC1 and PC2). It loads a pre-trained PCA model, extracts the data, and plots a grouped bar chart for comparison.
Principal Component Analysis (PCA) is a dimensionality reduction technique that transforms correlated variables into a smaller set of uncorrelated variables called principal components.
In this project:
- A saved PCA model (
pca_model.pkl) is loaded. - The top 10 countries are selected based on their ordering in the PCA results.
- PC1 and PC2 values are visualized in a side-by-side bar chart for easy comparison.
pip install matplotlib numpy