-
- Downloads
[SPARK-14312][ML][SPARKR] NaiveBayes model persistence in SparkR
## What changes were proposed in this pull request? SparkR ```NaiveBayesModel``` supports ```save/load``` by the following API: ``` df <- createDataFrame(sqlContext, infert) model <- naiveBayes(education ~ ., df, laplace = 0) ml.save(model, path) model2 <- ml.load(path) ``` ## How was this patch tested? Add unit tests. cc mengxr Author: Yanbo Liang <ybliang8@gmail.com> Closes #12573 from yanboliang/spark-14312.
Showing
- R/pkg/NAMESPACE 4 additions, 2 deletionsR/pkg/NAMESPACE
- R/pkg/R/generics.R 4 additions, 0 deletionsR/pkg/R/generics.R
- R/pkg/R/mllib.R 48 additions, 0 deletionsR/pkg/R/mllib.R
- R/pkg/inst/tests/testthat/test_mllib.R 12 additions, 0 deletionsR/pkg/inst/tests/testthat/test_mllib.R
- mllib/src/main/scala/org/apache/spark/ml/r/NaiveBayesWrapper.scala 49 additions, 3 deletions.../main/scala/org/apache/spark/ml/r/NaiveBayesWrapper.scala
- mllib/src/main/scala/org/apache/spark/ml/r/RWrappers.scala 45 additions, 0 deletionsmllib/src/main/scala/org/apache/spark/ml/r/RWrappers.scala
Loading
Please register or sign in to comment