简体   繁体   English

Spark导入mllib软件包成员

[英]Spark import of the mllib package member

I want to import from Spark CholeskyDecomposition . 我想从Spark CholeskyDecomposition导入。

I do it in the next way. 我会以另一种方式来做。 First of all I have modified my sbt file and add additional dependency: 首先,我修改了sbt文件并添加了其他依赖项:

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

then I do import in my Scala code: 然后我确实导入了我的Scala代码:

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

When I execute my code (via build.sbt) I have got the next error message: 当我执行代码(通过build.sbt)时,我收到了下一条错误消息:

object CholeskyDecomposition is not a member of package org.apache.spark.mllib.linalg 对象CholeskyDecomposition不是软件包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). 一切顺利,代码执行时没有错误消息(当然也没有CholeskyDecomposition对象)。 Anyway, I'm pretty sure the object CholeskyDecomposition is a member of linalg package of mllib Spark. 无论如何,我很确定对象CholeskyDecomposition是mllib Spark的linalg包的成员。 I also just copy the import statement and couldn't do an syntax error. 我还只是复制了import语句,并且不会发生语法错误。

It is a member of org.apache.spark.mllib.linalg now, but it wasn't in spark-mllib 1.3. 现在它是org.apache.spark.mllib.linalg的成员,但不是在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 . 我什至不确定何时引入它,但是我相信它是从1.6.0-SNAPSHOT当我阅读commits以来添加的。 (commit hash : 7bf07faa716bd6a01252c5e888d0956096bde026) (提交哈希:7bf07faa716bd6a01252c5e888d0956096bde026)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么import…RandomForest给出“对象RandomForest不是包org.apache.spark.mllib.tree的成员”? - Why does import …RandomForest give “object RandomForest is not a member of package org.apache.spark.mllib.tree”? 无法在 IntelliJ 中导入 spark mllib - not able to import spark mllib in IntelliJ 错误:对象 Stemmer 不是包 org.apache.spark.mllib.feature 的成员 - error: object Stemmer is not a member of package org.apache.spark.mllib.feature 值_1不是org.apache.spark.mllib.recommendation.Rating的成员 - value _1 is not a member of org.apache.spark.mllib.recommendation.Rating 对象StreamingContext不是包org.apache.spark的成员[错误]导入org.apache.spark.StreamingContext - object StreamingContext is not a member of package org.apache.spark [error] import org.apache.spark.StreamingContext 对象spark不是包org的成员 - Object spark is not a member of package org Spark MLLIB问题 - Spark MLLIB questions spark.mllib中的并行性 - Parallelism in spark.mllib Scala Spark MLLib NoClassDefFoundError - Scala Spark MLLib NoClassDefFoundError 错误:对象StreamingContext不是包的成员org.apache.spark.streaming import org.apache.spark.streaming.StreamingContext - error: object StreamingContext is not a member of package org.apache.spark.streaming import org.apache.spark.streaming.StreamingContext
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM