Github user shahidki31 commented on a diff in the pull request: https://github.com/apache/spark/pull/22784#discussion_r228788331 --- Diff: mllib/src/main/scala/org/apache/spark/mllib/feature/PCA.scala --- @@ -49,7 +50,16 @@ class PCA @Since("1.4.0") (@Since("1.4.0") val k: Int) { "Try reducing the parameter k for PCA, or reduce the input feature " + "vector dimension to make this tractable.") - val mat = new RowMatrix(sources) + val mat = if (numFeatures > 65535) { + val meanVector = Statistics.colStats(sources).mean --- End diff -- Thank you @srowen . I have updated.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org