プログラミング色々
26 January 2013
2D PCA with SVD in R
res.svd <- svd(x)
t <- res.svd$u %*% diag(res.svd$d)
t1 <- t[,1]
p1 <- res.svd$v[,1]
gues <- t1 %*% t(p1)
plot(x)
points(gues[,1],gues[,2],col='red')
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment