https://github.com/plambert777/pca-principal-component-analysis
This repository contains an R script for performing Principal Components Analysis (PCA) on a dataset. The script includes functions for data preprocessing, such as reading in data and imputing missing values, and for conducting PCA using both spectral decomposition and singular value decomposition (SVD). Additionally, the script calculates centroid
https://github.com/plambert777/pca-principal-component-analysis
pca-analysis r rmd
Last synced: 6 months ago
JSON representation
This repository contains an R script for performing Principal Components Analysis (PCA) on a dataset. The script includes functions for data preprocessing, such as reading in data and imputing missing values, and for conducting PCA using both spectral decomposition and singular value decomposition (SVD). Additionally, the script calculates centroid
- Host: GitHub
- URL: https://github.com/plambert777/pca-principal-component-analysis
- Owner: plambert777
- Created: 2024-08-26T16:15:02.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-26T21:10:51.000Z (about 1 year ago)
- Last Synced: 2025-02-08T08:14:50.149Z (8 months ago)
- Topics: pca-analysis, r, rmd
- Homepage:
- Size: 1.22 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PCA - Principal Component Analysis
Welcome to the PCA_R repository! This project is designed to provide a straightforward yet comprehensive approach to performing Principal Components Analysis (PCA) using R.## Overview
This repository contains an R script that guides you through the process of conducting PCA on a dataset. PCA is a powerful tool for dimensionality reduction, allowing you to uncover the underlying structure of your data. This script not only handles the computation of PCA but also includes data preprocessing steps and visualization techniques to help you interpret the results.
FeaturesData Import and Preprocessing
- Reads in data from a file.
- Imputes missing values by calculating the mean for each feature.PCA Calculation
- Uses spectral decomposition to perform PCA.
- Also includes an implementation using Singular Value Decomposition (SVD) for comparison.Centroid Calculation
- Calculates centroids for three populations within the dataset (e.g., European, Asian, African).Visualization
- Visualizes the PCA results using color-coded clusters for different populations.
- Generates a PCA plot with labeled principal components.