【问题标题】:SparkR save ML modelSparkR 保存 ML 模型
【发布时间】:2017-07-30 13:24:38
【问题描述】:

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

【问题讨论】:

    标签: apache-spark apache-spark-mllib sparkr


    【解决方案1】:

    【讨论】:

    • 你比我快 :-)
    • 哈 :) 我什至不使用 SparkR
    • 我也没有,但我正在寻找 Spark 的金牌 :)
    • 我离这个目标还有很长的路要走
    猜你喜欢
    • 2016-08-05
    • 2016-10-17
    • 1970-01-01
    • 1970-01-01
    • 2019-03-13
    • 2016-01-06
    • 1970-01-01
    • 2018-01-08
    相关资源
    最近更新 更多