You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/10/19 06:59:37 UTC

[GitHub] [commons-math] aherbert commented on pull request #213: [MATH-1651] fix flaky test in commons-math-neuralnet

aherbert commented on PR #213:
URL: https://github.com/apache/commons-math/pull/213#issuecomment-1283525473

   Changing the implementation should be done after consideration of whether the tests should be changed. In this case the KohonenUpdateActionTest#testUpdate can be altered to use the Neuron identifier to store the distances, e.g.:
   
   ```Java
   for (Neuron n : net) {
       distancesBefore[(int) n.getIdentifier()] = dist.applyAsDouble(n.getFeatures(), features);
   }
   ```
   
   As for the NetworkTest#testIterationOrder, that is imposing a constraint that the collection of Neurons has to be ordered by the identifier. This constraint is not documented in the Neuron class. The test may be too constrictive, preventing use of the optimum implementation in the Network.
   
   Can you post this issue to the developer mailing list (dev@commons.apache.org) with the subject '[Math] neuralnet <details>' . It may be the best solution is to remove the testIterationOrder test, rather than change the Network implementation, and document the behaviour as having an unspecified iteration order.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org