Last active
August 29, 2015 14:17
-
-
Save lettergram/79fc9d39f6de5881b004 to your computer and use it in GitHub Desktop.
Graph seed dataset PCA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Graphs components % | |
file = 'seeds_dataset.csv'; | |
x = load(file); | |
% SVD matrix | |
[U,S,V] = svd(x * transpose(x)); | |
% An eigenvalue is the diagonal matrix of S off the SVD component | |
eV = diag(sqrt(S)); | |
% Plot the eigenvalues against eachother | |
scatter(eV, eV, 'filled'); | |
% Plot only the top 10 sorted eigenvalue | |
scatter(linspace(1,10,10), eV(1:10), 'filled') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment