简体   繁体   中英

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.

It is a member of org.apache.spark.mllib.linalg now, 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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM