Principle Component Analysis
This repository contains a Google Colab notebook demonstrating Principal Component Analysis (PCA) on a dataset of African data. The notebook walks through the entire PCA workflow, from data loading and standardization to dimensionality reduction and visualization.
AfricanData.csvβ The dataset used for analysis (numeric columns only).PCA_Analysis.ipynbβ Google Colab notebook implementing PCA step by step.README.mdβ This file.
Principal Component Analysis (PCA) is a statistical technique used to reduce the dimensionality of a dataset while preserving as much variance as possible. It helps to:
- Identify patterns in data
- Remove redundant features
- Visualize high-dimensional data in 2D or 3D
- Load and Standardize Data β Convert data into a standardized numeric form.
- Compute Covariance Matrix β Understand relationships between features.
- Perform Eigendecomposition β Find eigenvalues and eigenvectors.
- Sort Principal Components β Rank components based on explained variance.
- Project Data β Reduce dimensions by projecting onto top principal components.
- Visualize Data β Compare original and reduced datasets.
- Open Google Colab.
- Click File β Open notebook β GitHub.
- Paste the repository URL or search for this repo.
- Run all cells to perform PCA and visualize results.
- The notebook produces a reduced dataset with top principal components.
- Visualizations show before-and-after dimensionality reduction.
- Python 3.x
- NumPy
- Pandas
- Matplotlib
- Google Colab (optional, but recommended)
For questions or suggestions, please open an issue in this repository.