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 
([email protected]) 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to