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

    https://github.com/apache/spark/pull/17746#discussion_r112999875
  
    --- Diff: R/pkg/inst/tests/testthat/test_mllib_classification.R ---
    @@ -288,18 +288,18 @@ test_that("spark.mlp", {
         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"))
    +               c("1.0", "1.0", "2.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"))
    +               c("1.0", "1.0", "2.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", "0.0", "0.0", 
"1.0", "0.0"))
    --- End diff --
    
    Why are the prediction results changed in R and Python test cases? The bugs 
being fixed are in LBFGS-B. In theory, the current optimizer only uses LBFGS, 
so the results should be the same. 


---
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