from pyspark.mllib.feature import PCA as PCAmllib
rdd = sc.parallelize([Vectors.dense([1, 2, 0]), Vectors.dense([2, 0, 1]),
    Vectors.dense([0, 1, 0])])
model = PCAmllib(2).fit(rdd)
transformed = model.transform(rdd)
Анализ PCA в PySpark