Re: saving or visualizing PCA

2015-03-18 Thread Reza Zadeh
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

Re: saving or visualizing PCA

2015-03-18 Thread Reza Zadeh
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 wrote: > You can visualize PCA for example by > > val N = 2 > val pc: Matrix = mat.computePrincipalComponents(N)