Also the guide on this is useful: http://spark.apache.org/docs/latest/mllib-dimensionality-reduction.html#principal-component-analysis-pca
On Wed, Mar 18, 2015 at 11:46 PM, Reza Zadeh <r...@databricks.com> wrote: > You can visualize PCA for example by > > val N = 2 > val pc: Matrix = mat.computePrincipalComponents(N) // Principal components > are stored in a local dense matrix. > > // Project the rows to the linear space spanned by the top N principal > components. > val projected: RowMatrix = mat.multiply(pc) > > Each row of 'projected' now is two dimensional and can be plotted. > > Reza > > > > On Wed, Mar 18, 2015 at 9:14 PM, roni <roni.epi...@gmail.com> wrote: > >> Hi , >> I am generating PCA using spark . >> But I dont know how to save it to disk or visualize it. >> Can some one give me some pointerspl. >> Thanks >> -Roni >> > >