Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

object ml is not a member of package org.apache.spark

I'm trying to take my first steps in Mllib. My library dependencies are:

libraryDependencies += "org.apache.spark" % "spark-core_2.11" % "2.2.0"
libraryDependencies += "com.github.fommil.netlib" % "all" % "1.1.2"

but I still get:

Error:(4, 27) object ml is not a member of package org.apache.spark
  import org.apache.spark.ml.regression.GeneralizedLinearRegression
like image 437
user1761806 Avatar asked Mar 08 '23 04:03

user1761806


1 Answers

You've included dependency to Spark Core, you should also add Spark MLLib:

libraryDependencies += "org.apache.spark" % "spark-mllib_2.11" % "2.2.0"

Or simpler:

libraryDependencies += "org.apache.spark" %% "spark-mllib" % "2.2.0"
like image 92
T. Gawęda Avatar answered Mar 23 '23 06:03

T. Gawęda