Github user loachli commented on the pull request:

    https://github.com/apache/spark/pull/1290#issuecomment-67812105
  
    @avulanov: *Could you write a brief description to the ANN test called 
"Gradient of ANN" to let the reader understand more clearly what we are 
testing?*
    
    The test ensures that the ANNLeastSquaresGradient is correctly implemented.
    
    It does so by comparing the computation of the gradient in the 
ANNLeastSquaresGradient class with an approximation of the gradient. If we 
denote the squared error of the neural network with E(w, x), where w=(w_ijl) is 
the weights vector, ANNLeastSquaresGradient.compute calculates the gradient 
dE(w_ijl, x)/dw_ijl. This gradient is subsequently compared with the 
approximation
    
    (E(w_ijl + eps, x) - E(w_ijl)) / eps
    
    for all weights w_ijl. For eps we chose the value 1e-6.
    
    If the difference is not too big (less than "accept=1e-7"), the 
ANNLeastSquaresGradient.compute function is supposed to be correctly 
implemented.
    
    Maybe we should add some comments in the code about this.



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