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

    https://github.com/apache/spark/pull/13076#discussion_r63308195
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/MultilayerPerceptronClassifier.scala
 ---
    @@ -65,22 +63,23 @@ private[ml] trait MultilayerPerceptronParams extends 
PredictorParams
           "it is adjusted to the size of this data. Recommended size is 
between 10 and 1000",
         ParamValidators.gt(0))
     
    -  /** @group getParam */
    +  /** @group expertGetParam */
       final def getBlockSize: Int = $(blockSize)
     
       /**
    -   * Allows setting the solver: minibatch gradient descent (gd) or l-bfgs.
    -   * l-bfgs is the default one.
    +   * The solver algorithm for optimization.
    +   * Supported options: "gd" (minibatch gradient descent) or "l-bfgs".
    +   * Default: "l-bfgs"
        *
        * @group expertParam
        */
       final val solver: Param[String] = new Param[String](this, "solver",
    -    " Allows setting the solver: minibatch gradient descent (gd) or 
l-bfgs. " +
    -      " l-bfgs is the default one.",
    -    ParamValidators.inArray[String](Array("gd", "l-bfgs")))
    +    "The solver algorithm for optimization. Supported options: " +
    +      s"${MultilayerPerceptronClassifier.supportedSolvers.mkString(", ")}. 
(Default l-bfgs)",
    +    
ParamValidators.inArray[String](MultilayerPerceptronClassifier.supportedSolvers))
     
    -  /** @group getParam */
    -  final def getOptimizer: String = $(solver)
    +  /** @group expertGetParam */
    +  final def getSolver: String = $(solver)
     
       /**
        * Model weights. Can be returned either after training or after 
explicit setting
    --- End diff --
    
    I think this can only used to set initial weights for training. The 
original documents said we can also get the ```weights``` after training, I 
speculate that it means we can get the result ```weights``` from 
```MultilayerPerceptronClassificationModel.weights``` which is different from 
this one. So I rename this param to ```initialWeights``` and can differentiate 
it with the member variable of ```MultilayerPerceptronClassificationModel```. 


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

Reply via email to