Github user wangzk commented on the pull request:
https://github.com/apache/spark/pull/1290#issuecomment-101486117
@avulanov I ran your test code with SGD optimizer and find that there may
be some wrong with the output. Your test code try to train an XOR classifier
but with SGD it failed (with LBFGS it is OK.).
I got the following result:
```
(prediction, label)
(0.4442522868286226,0.0)
(0.4341183288415796,1.0)
(0.5305968528789123,1.0)
(0.5141176170143846,0.0)
```
I use the following test code to train with SGD:
```scala
val initialWeights = FeedForwardModel(topology, 23124).weights()
val trainer = new FeedForwardTrainer(topology, 2, 1)
trainer.setWeights(initialWeights)
trainer.SGDOptimizer.setNumIterations(20).setStepSize(0.1)
val model = trainer.train(rddData)
```
I have changed the iteration number and step size but with no help.
---
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]