Github user jkbradley commented on the pull request:

    https://github.com/apache/spark/pull/1290#issuecomment-67380904
  
    I meant to use the actual Optimizer class, as @Lewuathe suggested.  
However, I prefer to use setter methods:
    ```
    val ann = new ArtificialNeuralNetwork()
    ann.setOptimizer(new GradientDescent())
    ann.optimizer.setParam(...)
    ```
    It's easier to maintain binary compatibility by using setters (whenever we 
add new parameters to the algorithm).  When parameters are passed to train(), 
every new parameter we add in the future will require a new train() method 
(since Java & default parameters don't play well together).
    
    If you need to check whether it's an acceptable optimizer for ANN, then I 
was thinking of a match-case like @bgreeven wrote above.


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