Package org.apache.spark.mllib.feature
Class PCA
Object
org.apache.spark.mllib.feature.PCA
A feature transformer that projects vectors to a low-dimensional space using PCA.
param: k number of principal components
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
PCA
public PCA(int k)
-
-
Method Details
-
fit
Computes aPCAModel
that contains the principal components of the input vectors.- Parameters:
sources
- source vectors- Returns:
- (undocumented)
-
fit
Java-friendly version offit()
.- Parameters:
sources
- (undocumented)- Returns:
- (undocumented)
-
k
public int k()
-