org.apache.spark.mllib.feature
Class PCA

Object
  extended by org.apache.spark.mllib.feature.PCA

public class PCA
extends Object

A feature transformer that projects vectors to a low-dimensional space using PCA.

param: k number of principal components


Constructor Summary
PCA(int k)
           
 
Method Summary
 PCAModel fit(JavaRDD<Vector> sources)
          Java-friendly version of fit()
 PCAModel fit(RDD<Vector> sources)
          Computes a PCAModel that contains the principal components of the input vectors.
 int k()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PCA

public PCA(int k)
Method Detail

k

public int k()

fit

public PCAModel fit(RDD<Vector> sources)
Computes a PCAModel that contains the principal components of the input vectors.

Parameters:
sources - source vectors
Returns:
(undocumented)

fit

public PCAModel fit(JavaRDD<Vector> sources)
Java-friendly version of fit()