Github user yanboliang commented on a diff in the pull request:
https://github.com/apache/spark/pull/12943#discussion_r64532238
--- Diff: python/pyspark/ml/classification.py ---
@@ -1063,6 +1064,13 @@ class MultilayerPerceptronClassifier(JavaEstimator,
HasFeaturesCol, HasLabelCol,
True
>>> model.weights == model2.weights
True
+ >>> mlp2 = mlp2.setInitialWeights([2, 5, 1, -7, -5, -10, 0, 0.6, -1,
2, -2, 1, 2, -7, -1, -2,
+ ... 2, 1, -1, 9, -9, 3, -3, -3, 3.0, 0, -1])
--- End diff --
In MLlib, Scala unit tests focus on verifying the correctness, Java unit
tests focus on compatibility verification, and Python doc tests should focus on
providing examples to users. So I think we should keep Python doc tests
succinct just as you see in the code base.
---
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]