利用對象我有點新的火花,我想知道如何使用對象,如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