Github user yanboliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/17757#discussion_r113215088
--- 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 =
--- End diff --
If set ```maxIter = 2```, the result is not converged, so the result is
vulnerable. We should check the last converged result.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]