如何保存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)