SparkR 保存 ML 模型

SparkR save ML model

如何保存一个SparkR模型并单独加载模型进行预测?
Spark 版本 2.0

# Load training data
 df <- read.df("data/mllib/sample_libsvm_data.txt", source = "libsvm")
 training <- df
 testing <- df

# Fit a random forest classification model with spark.randomForest
 model <- spark.randomForest(training, label ~ features, "classification", numTrees = 10)

# Model summary
 summary(model)



 ### Save and Load
 ??

# Prediction
 predictions <- predict(model, test)
 head(predictions)

我相信你正在寻找read.ml(path) and write.ml(object, path)