Ok, so then the S gives the individual components, good. Thanks Tony! But what about the principal components from the PCA plot, how are they calculated?
And are the linear mixing matrix A really the same as the loadings/weights? There must be different loadings for the PCA and ICA right? Best regards, Joel > Date: Wed, 11 Nov 2009 14:29:06 -0700 > From: tpl...@acm.org > To: joel_furstenberg_h...@hotmail.com > CC: r-help@r-project.org > Subject: Re: [R] Loadings and scores from fastICA? > > The help for fastICA says: > > The data matrix X is considered to be a linear combination of > non-Gaussian (independent) components i.e. X = SA where columns of > S contain the independent components and A is a linear mixing > matrix. > > The value of fastICA is a list with components "S" (the estimated source > matrix) and "A" (the estimated mixing matrix). Are these what you want? > > -- Tony Plate > > Joel Fürstenberg-Hägg wrote: > > Hi all, > > > > > > > > Does anyone know how to get the independent components and loadings from an > > Independent Component Analysis (ICA), as well as principal components and > > loadings from a Pricipal Component analysis (PCA) using the fastICA > > package? Or perhaps if there's another way to do ICAs in R? > > > > > > Below is an example from the fastICA manual > > (http://cran.r-project.org/web/packages/fastICA/fastICA.pdf) > > > > > > > > if(require(MASS)) > > { > > x <- mvrnorm(n = 1000, mu = c(0, 0), Sigma = matrix(c(10, 3, 3, 1), 2, > > 2)) > > x1 <- mvrnorm(n = 1000, mu = c(-1, 2), Sigma = matrix(c(10, 3, 3, 1), > > 2, 2)) > > X <- rbind(x, x1) > > a <- fastICA(X, 2, alg.typ = "deflation", fun = "logcosh", alpha = 1, > > method = "R", row.norm = FALSE, maxit = 200, tol = 0.0001, verbose = TRUE) > > par(mfrow = c(1, 3)) > > plot(a$X, main = "Pre-processed data") > > plot(a$X%*%a$K, main = "PCA components") > > plot(a$S, main = "ICA components") > > } > > > > > > > > Best regards, > > > > > > > > Joel > > > > _________________________________________________________________ > > Hitta kärleken i vinter! > > http://dejting.se.msn.com/channel/index.aspx?trackingid=1002952 > > [[alternative HTML version deleted]] > > > > > > > > > > ------------------------------------------------------------------------ > > > > ______________________________________________ > > R-help@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > _________________________________________________________________ Hitta kärleken nu i vår! http://dejting.se.msn.com/channel/index.aspx?trackingid=1002952 [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.