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

 ##########
 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:
   This change concerns me; those predictions are all wrong now according to 
the data. It probably means the test was insufficient to begin with. I think 
the tolerance parameter is way too high; unset it if possible or use a much 
smaller value like 0.00001

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