利用对象我有点新的火花,我想知道如何使用对象,如SVMDataGenerator,在API文档说明如下:http://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.mllib.util.SVMDataGenerator $像SVMDataGenerator在星火壳牌/ Scala代码
具体来说,我遇到了麻烦实际上让它们在Spark shell或我在.scala文件中创建的代码中工作,然后用sbt编译。在星火壳,我想是这样的:
import org.apache.spark.mllib.util._
SVMDataGenerator("local", <filepath>)
然而,这将引发一个错误,因为它声称SVMDataGenerator不接受参数。我在scala文件中做了类似的事情,并再次抛出错误。然而,查看该对象的源代码,我可以看到它接受参数。我只是失去了如何实际使用这个对象(和其他类似的对象),任何帮助,这将不胜感激。
由于
感谢。我没有意识到我必须把SVMDataGenerator.main – AnthonyCaterini