df = sqlContext.createDataFrame([(Vectors.dense([1, 2, 0]),), (Vectors.
    dense([2, 0, 1]),), (Vectors.dense([0, 1, 0]),)], ('features',))
pca = PCAml(k=2, inputCol='features', outputCol='pca')
model = pca.fit(df)
transformed = model.transform(df)
Анализ PCA в PySpark