[ 
https://issues.apache.org/jira/browse/MATH-1651?focusedWorklogId=818335&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-818335
 ]

ASF GitHub Bot logged work on MATH-1651:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Oct/22 06:59
            Start Date: 19/Oct/22 06:59
    Worklog Time Spent: 10m 
      Work Description: 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.
   




Issue Time Tracking
-------------------

    Worklog Id:     (was: 818335)
    Time Spent: 0.5h  (was: 20m)

> junit flaky tests in commons-math-neuralnet
> -------------------------------------------
>
>                 Key: MATH-1651
>                 URL: https://issues.apache.org/jira/browse/MATH-1651
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Anant Dahiya
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
>  
> Flaky JUnit Tests identified  in commons-math-neuralnet
> *How did we detect Flaky Test ?*
> We detected the existence of flaky test using the tool 
> [NonDex|https://github.com/TestingResearchIllinois/NonDex]
>  
> *Command*
> {code:java}
> mvn -pl commons-math-neuralnet edu.illinois:nondex-maven-plugin:1.1.2:nondex 
> -Dtest=org.apache.commons.math4.neuralnet.NetworkTest#testIterationOrder{code}
>  
> *Tests :* 
>  
>  
> ||Path||Test||
> |commons-math-neuralnet|org.apache.commons.math4.neuralnet.NetworkTest#testIterationOrder|
> |commons-math-neuralnet|org.apache.commons.math4.neuralnet.sofm.KohonenUpdateActionTest#testUpdate|



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to