필터 지우기
필터 지우기

What comes after sorting eigenvalues in PCA?

조회 수: 1 (최근 30일)
Shahd Ewawi
Shahd Ewawi 2015년 10월 15일
답변: arushi 2024년 8월 1일
I'm a student, I have to build PCA from scratch using Matlab on iris data. Iris data have 4 features i want to reduce them to 2. I reached the sorting of eigenvalues step. What is the next step?

답변 (1개)

arushi
arushi 2024년 8월 1일
Hi Shahd,
Steps to Perform PCA from Scratch -
1. Load the Iris Dataset
2. Standardize the Data - Standardize the features to have zero mean and unit variance.
3. Compute the Covariance Matrix - Compute the covariance matrix of the standardized data.
4. Compute Eigenvalues and Eigenvectors - Compute the eigenvalues and eigenvectors of the covariance matrix.
5. Sort Eigenvalues and Corresponding Eigenvectors - Sort the eigenvalues in descending order and sort the eigenvectors accordingly.
6. Select Top `k` Eigenvectors - Select the top `k` eigenvectors (where `k` is the number of dimensions you want to reduce to, in this case, 2).
7. Transform the Data - Transform the original data to the new subspace using the selected principal components.
Hope this helps.

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by