Apache spark SparkR save ML模型
如何保存SparkR模型并单独加载模型并进行预测?Apache spark SparkR save ML模型,apache-spark,apache-spark-mllib,sparkr,Apache Spark,Apache Spark Mllib,Sparkr,如何保存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 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)
#加载训练数据
df我相信你在寻找和我相信你在寻找和你比我快:-)哈:)我也不使用SparkRMe,但我在寻找Spark中的金牌:)我离目标还有很长的路你比我快:-)哈:)我甚至也不使用SparkRMe,但我在寻找Spark中的金牌:)我是离这个目标还有很长的路要走