0
如何保存SparkR模型並單獨加載模型並預測?
星火2.0SparkR保存ML模型
# 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)
你比我快了:-) – eliasah
哈:)我甚至不使用SparkR –
我也沒見過,但我在星火尋找金牌:) – eliasah