本帖隐藏的内容
http://apache.github.io/incubator-systemml/spark-mlcontext-programming-guide#spark-mlcontext-programming-guide
- Create MLContext
- All primary classes that a user interacts with are located in the org.apache.sysml.api.mlcontext package. For convenience, we can additionally add a static import of ScriptFactory to shorten the syntax for creating Script objects. An MLContext object can be created by passing its constructor a reference to the SparkSession (spark) or SparkContext (sc). If successful, you should see a “Welcome to Apache SystemML!” message.
复制代码- import org.apache.sysml.api.mlcontext._
- import org.apache.sysml.api.mlcontext.ScriptFactory._
- val ml = new MLContext(spark)
复制代码