Guforu Guforu - 3 months ago 24
Scala Question

Spark import of the mllib package member

I want to import from Spark CholeskyDecomposition.

I do it in the next way. First of all I have modified my sbt file and add additional dependency:

"org.apache.spark"%%"spark-mllib"%"1.3.0"


then I do import in my Scala code:

import org.apache.spark.mllib.linalg.CholeskyDecomposition


When I execute my code (via build.sbt) I have got the next error message:


object CholeskyDecomposition is not a member of package
org.apache.spark.mllib.linalg


When I modify my import statement just to:

import org.apache.spark.mllib.linalg


everything is going good and the code is executed without error messages (of course without CholeskyDecomposition object).
Anyway, I'm pretty sure the object CholeskyDecomposition is a member of linalg package of mllib Spark.
I also just copy the import statement and couldn't do an syntax error.

Answer

It is a member of org.apache.spark.mllib.linalgnow, but it wasn't in spark-mllib 1.3.

I'm not even sure when it was introduced but I believe that it has been added since 1.6.0-SNAPSHOT when I read the commits. (commit hash : 7bf07faa716bd6a01252c5e888d0956096bde026)