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

    https://github.com/apache/spark/pull/17326#discussion_r107296261
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/MultilayerPerceptronClassifier.scala
 ---
    @@ -329,7 +329,8 @@ class MultilayerPerceptronClassificationModel 
private[ml] (
     
       @Since("1.5.0")
       override def copy(extra: ParamMap): 
MultilayerPerceptronClassificationModel = {
    -    copyValues(new MultilayerPerceptronClassificationModel(uid, layers, 
weights), extra)
    +    val copied = new MultilayerPerceptronClassificationModel(uid, layers, 
weights)
    --- End diff --
    
    It doesn't seem that we have a "standard" way of doing this, i.e. some 
places do
    ```scala 
    val copied = new X().setParent(parent)
    ``` 
    and some places do 
    ```scala
    val copied = ...
    copyValues(...).setParent(parent)
    ```
    
    But at least for this PR let's be consistent, so maybe change this one to 
be the first version like you have in the rest of the PR?


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