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

Return eigenvalues with PCA model

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.1
    • Fix Version/s: 2.0.0
    • Component/s: ML, MLlib
    • Labels:
      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

              • Assignee:
                srowen Sean R. Owen
                Reporter:
                ctsats Christos Iraklis Tsatsoulis
                Shepherd:
                Xiangrui Meng
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: