Github user bgreeven commented on the pull request:

    https://github.com/apache/spark/pull/1290#issuecomment-67267236
  
    @avulanov @jkbradley
    
    The issue is, that some optimisers use different parameters than others. 
For example, LBFGS uses tolerance and whereas SGD has miniBatchFraction and 
stepSize. So if you use a train function, you should somehow convey these 
parameters within that string (or maybe another string, but you should have 
some mechanism). Maybe something like "SGD,miniBatchFraction=1.0,stepSize=1.0"? 
Seems a bit of an artificial workaround though. However, you could define 
default values, making the calling simpler, and indeed omitting the need for 
defining separate functions for different sets of default values.
    
    With different train functions in a single class, you can define the 
parameters on a per training function basis. You would have to create the 
optimizer objects on invoking the training function, but that may not be too 
big an issue.
    
    Creating a new class e.g. ArtificialNeuralNetworkWithSGD is yet another 
possibility. It has the disadvantage of duplicated code though, which is 
especially bothersome when some of the core code is changed. That issue could 
be reduced by moving as much as possible to Scala traits.
    
    Just philosophising here, needs some more thought...


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