MaxGekk commented on a change in pull request #20793: 
[SPARK-23643][CORE][SQL][ML] Shrinking the buffer in hashSeed up to size of the 
seed parameter
URL: https://github.com/apache/spark/pull/20793#discussion_r268340925
 
 

 ##########
 File path: R/pkg/tests/fulltests/test_mllib_classification.R
 ##########
 @@ -307,13 +307,13 @@ test_that("spark.mlp", {
   expect_equal(summary$numOfOutputs, 3)
   expect_equal(summary$layers, c(4, 5, 4, 3))
   expect_equal(length(summary$weights), 64)
-  expect_equal(head(summary$weights, 5), list(-0.878743, 0.2154151, -1.16304, 
-0.6583214, 1.009825),
+  expect_equal(head(summary$weights, 5), list(0.327309, 0.2385232, -0.8763775, 
-1.01558, 0.8494107),
                tolerance = 1e-6)
 
   # Test predict method
   mlpTestDF <- df
   mlpPredictions <- collect(select(predict(model, mlpTestDF), "prediction"))
-  expect_equal(head(mlpPredictions$prediction, 6), c("0.0", "1.0", "1.0", 
"1.0", "1.0", "1.0"))
+  expect_equal(head(mlpPredictions$prediction, 6), c("2.0", "2.0", "2.0", 
"2.0", "2.0", "2.0"))
 
 Review comment:
   I tried to set `tol = 0.00001`:
   ```
   > head(summary$weights, 5)
   [[1]]
   [1] -24.28415
   
   [[2]]
   [1] 107.8701
   
   [[3]]
   [1] 16.86376
   
   [[4]]
   [1] 1.103736
   
   [[5]]
   [1] 9.244488
   
   > mlpTestDF <- df
   >   mlpPredictions <- collect(select(predict(model, mlpTestDF), 
"prediction"))
   > head(mlpPredictions$prediction, 6)
   [1] "1.0" "1.0" "1.0" "1.0" "0.0" "1.0"
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to