Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17757#discussion_r113362748
  
    --- Diff: R/pkg/inst/tests/testthat/test_mllib_classification.R ---
    @@ -284,22 +284,11 @@ test_that("spark.mlp", {
                    c("1.0", "1.0", "1.0", "1.0", "0.0", "1.0", "2.0", "2.0", 
"1.0", "0.0"))
     
       # test initialWeights
    -  model <- spark.mlp(df, label ~ features, layers = c(4, 3), maxIter = 2, 
initialWeights =
    +  model <- spark.mlp(df, label ~ features, layers = c(4, 3), 
initialWeights =
         c(0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 9, 9, 9, 9, 9))
       mlpPredictions <- collect(select(predict(model, mlpTestDF), 
"prediction"))
       expect_equal(head(mlpPredictions$prediction, 10),
    -               c("1.0", "1.0", "1.0", "1.0", "2.0", "1.0", "2.0", "2.0", 
"1.0", "0.0"))
    -
    -  model <- spark.mlp(df, label ~ features, layers = c(4, 3), maxIter = 2, 
initialWeights =
    -    c(0.0, 0.0, 0.0, 0.0, 0.0, 5.0, 5.0, 5.0, 5.0, 5.0, 9.0, 9.0, 9.0, 
9.0, 9.0))
    -  mlpPredictions <- collect(select(predict(model, mlpTestDF), 
"prediction"))
    -  expect_equal(head(mlpPredictions$prediction, 10),
    -               c("1.0", "1.0", "1.0", "1.0", "2.0", "1.0", "2.0", "2.0", 
"1.0", "0.0"))
    -
    -  model <- spark.mlp(df, label ~ features, layers = c(4, 3), maxIter = 2)
    -  mlpPredictions <- collect(select(predict(model, mlpTestDF), 
"prediction"))
    -  expect_equal(head(mlpPredictions$prediction, 10),
    -               c("1.0", "1.0", "1.0", "1.0", "0.0", "1.0", "0.0", "2.0", 
"1.0", "0.0"))
    +               c("1.0", "1.0", "1.0", "1.0", "0.0", "1.0", "2.0", "2.0", 
"1.0", "0.0"))
    --- End diff --
    
    I got the uncoverged test with the maxIter. 
    My main concern at this end is to at least exercise calling from R to JVM 
for each public API we export (ie. by calling `predict` on the MLP model) - we 
have had issues in the past the API never works and/or it is broken and we 
don't know.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to