Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A matrix (plural matrices) is a rectangular array of numbers, symbols, or expressions arranged in rows and columns. The individual items in a matrix are called its elements or entries.
3
votes
1
answer
298
views
How to explain the numerical discrepancy between FactoMineR::PCA() and the svd() in their ou...
So what would be the $U$ matrix in FactoMineR representing differently from that of the svd? How to make them match up using R? … Apart from the signs, it seems that the $V$ matrix is the same for the two function outpus, but what makes the $U$ different then between them? …
2
votes
Accepted
How to explain the numerical discrepancy between FactoMineR::PCA() and the svd() in their ou...
The difference between FactoMineR:::PCA() and base::svd() is the scaling and negative signs for some columns in the dataset.
The below code is a proof of the above:
# PCA using FactoMineR::PCA()
libra …
1
vote
1
answer
134
views
How to compute the left singular eigenvector matrix (U) from the output of prcomp() for PCA ...
identity matrix for Sigma
prcomp.pca$rotation %*% t(prcomp.pca$rotation) # identity matrix for V
# now compute the U matrix from prcomp() output per the equation above for U
prcomp.pca$u <- S %*% (solve … So the computed $U$ matrix eventually didn't match the $U$ matrix of the svd() function, what am I missing here to obtain the $U$ matrix from the output of prcomp()? …
1
vote
Accepted
How to compute the left singular eigenvector matrix (U) from the output of prcomp() for PCA ...
code of prcomp() this can be achieved by the following:
sigma <- prcomp.pca$sdev * sqrt(max(1, nrow(S) - 1))
round(sigma, 2) == round(svd.pca$d, 2) # TRUE
diag(sigma) %*% solve(diag(sigma)) # identity matrix … of Sigma
prcomp.pca$rotation %*% t(prcomp.pca$rotation) # identity matrix of V
prcomp.pca$u <- S %*% prcomp.pca$rotation %*% solve(diag(sigma))
round(svd.pca$u, 3) == round(prcomp.pca$u, 3) # TRUE …