Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-11530

Return eigenvalues with PCA model

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.5.1
    • 2.0.0
    • ML, MLlib
    • None

    Description

      For data scientists & statisticians, PCA is of little use if they cannot estimate the proportion of variance explained by selecting k principal components (see here for the math details: https://inst.eecs.berkeley.edu/~ee127a/book/login/l_sym_pca.html , section 'Explained variance'). To estimate this, one only needs the eigenvalues of the covariance matrix.
      Although the eigenvalues are currently computed during PCA model fitting, they are not returned; hence, as it stands now, PCA in Spark ML is of extremely limited practical use.
      For details, see these SO questions
      http://stackoverflow.com/questions/33428589/pyspark-and-pca-how-can-i-extract-the-eigenvectors-of-this-pca-how-can-i-calcu/ (pyspark)

      http://stackoverflow.com/questions/33559599/spark-pca-top-components (Scala)

      and this blog post http://www.nodalpoint.com/pca-in-spark-1-5/

      Attachments

        Issue Links

          Activity

            People

              srowen Sean R. Owen
              ctsats Christos Iraklis Tsatsoulis
              Xiangrui Meng Xiangrui Meng
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: