[ https://issues.apache.org/jira/browse/MATH-1656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17740671#comment-17740671 ]
Gilles Sadowski edited comment on MATH-1656 at 7/6/23 6:13 PM: --------------------------------------------------------------- {quote}please find a patch with a provisional version [...] {quote} Thanks! Here is a (probably non-exhaustive) list of issues from a first look. # The default build fails. Log excerpt: {noformat} [...] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0:test (default-test) on project commons-math4-legacy: Please refer to /home/gilles/gilles/devel/java/apache/commons-math/trunk/commons-math-legacy/target/surefire-reports for the individual test results. Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. There was an error in the forked process Error occurred in starting fork, check output in log 0 java.lang.SecurityException: 0 at org.apache.commons.math4.test.util.DiffTest$TestSecurityManager.checkExit(DiffTest.java:150) at java.base/java.lang.Runtime.exit(Runtime.java:114) at java.base/java.lang.System.exit(System.java:1752) at org.apache.maven.surefire.booter.ForkedBooter.acknowledgedExit(ForkedBooter.java:381) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:178) at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495) [...] {noformat} # Files location of ** *source code* is in directory {noformat} commons-math-legacy/src/main/java/org/apache/commons/math4/optim/ {noformat} but should be in {noformat} commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/ {noformat} ** *test source code* is in directory {noformat} commons-math-legacy/src/test/java/org/apache/commons/math4/optim/ {noformat} but should be in {noformat} commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/optim/ {noformat} ** *(test) resources* are in directory {noformat} commons-math-legacy/src/test/resources/org/apache/commons/math4/optim {noformat} but should be in {noformat} commons-math-legacy/src/test/resources/org/apache/commons/math4/legacy/optim {noformat} # Strange (spurious ?) files in resources directories: ** {{stdout.txt}} ** {{stderr.txt}} ** {{status.txt}} # Additions to the _public_ API need prior discussion (to avoid code bloat), e.g. ** {{DebugMode}} ** {{DoubleData}} ** {{DoubleStrictlyPostiveData}} ** {{ObjectiveFunctionDimension}} ** {{OptimizationStatus}} ** {{SearchRange}} ** {{MinDirectionNorm}} ** {{LinearUtil}} ** ... # {{LinearUtil}} defines many utilities already present in (or that should belong to) class [{{MathArrays}}|https://github.com/apache/commons-math/blob/master/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/MathArrays.java]. # The test infrastructure may be a neat idea (I didn't look at the details) but it completely departs from the existing approach (Junit 4) and the expected upgrade path using Junit 5 features (see e.g. in ["SimplexOptimizerTest.java"|https://github.com/apache/commons-math/blob/master/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/optim/nonlinear/scalar/noderiv/SimplexOptimizerTest.java]) # New _public_ or _protected_ methods (like {{{}initOptimization{}}}) should be discussed. Other, comparatively smaller, issues: * We don't use {{@author}} tags. * All fields and methods (including _private_ ones) must be documented. * Abbreviated names should be avoided ({{{}initOptimization{}}} for example should be {{{}initializeOptimization{}}}, or perhaps just {{{}initialize{}}}) unless they have become "well-known" (like "BFGS" maybe). * The "default constructor" should not be explicitly declared. was (Author: erans): {quote}please find a patch with a provisional version [...] {quote} Thanks! Here is a (probably non-exhaustive) list of issues from a first look. # The default build fails. Log excerpt: {noformat} [...] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0:test (default-test) on project commons-math4-legacy: Please refer to /home/gilles/gilles/devel/java/apache/commons-math/trunk/commons-math-legacy/target/surefire-reports for the individual test results. Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. There was an error in the forked process Error occurred in starting fork, check output in log 0 java.lang.SecurityException: 0 at org.apache.commons.math4.test.util.DiffTest$TestSecurityManager.checkExit(DiffTest.java:150) at java.base/java.lang.Runtime.exit(Runtime.java:114) at java.base/java.lang.System.exit(System.java:1752) at org.apache.maven.surefire.booter.ForkedBooter.acknowledgedExit(ForkedBooter.java:381) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:178) at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495) [...] {noformat} # Files location of ** *source code* is in directory {noformat} commons-math-legacy/src/main/java/org/apache/commons/math4/optim/ {noformat} but should be in {noformat} commons-math-legacy/src/main/java/org/apache/commons/math4/legacy/optim/ {noformat} ** *test source code* is in directory {noformat} commons-math-legacy/src/test/java/org/apache/commons/math4/optim/ {noformat} but should be in {noformat} commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/optim/ {noformat} ** *(test) resources* are in directory {noformat} commons-math-legacy/src/test/resources/org/apache/commons/math4/optim {noformat} but should be in {noformat} commons-math-legacy/src/test/resources/org/apache/commons/math4/legacy/optim {noformat} # Strange (spurious ?) files in resources directories: ** {{stdout.txt}} ** {{stderr.txt}} ** {{status.txt}} # Additions to the _public_ API need prior discussion (to avoid code bloat), e.g. ** {{DebugMode}} ** {{DoubleData}} ** {{DoubleStrictlyPostiveData}} ** {{ObjectiveFunctionDimension}} ** {{OptimizationStatus}} ** {{SearchRange}} ** {{MinDirectionNorm}} ** {{LinearUtil}} ** ... # {{LinearUtil}} defines many utilities already present in (or that should belong to) class [{{MathArrays}}|https://github.com/apache/commons-math/blob/master/commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/MathArrays.java]. # The test infrastructure may be a neat idea (I didn't look at the details) but since it completely departs from the existing approach (Junit 4) and the expected upgrade path using Junit 5 features (see e.g. in ["SimplexOptimizerTest.java"|https://github.com/apache/commons-math/blob/master/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/optim/nonlinear/scalar/noderiv/SimplexOptimizerTest.java]) # New _public_ or _protected_ methods (like {{initOptimization}}) should be discussed. Other, comparatively smaller, issues: * We don't use {{@author}} tags. * All fields and methods (including _private_ ones) must be documented. * Abbreviated names should be avoided ({{initOptimization}} for example should be {{initializeOptimization}}, or perhaps just {{initialize}}) unless they have become "well-known" (like "BFGS" maybe). * The "default constructor" should not be explicitly declared. > Classical multivariate optimizers (gradient descent, Raphson-Newton, BFGS) > are missing > -------------------------------------------------------------------------------------- > > Key: MATH-1656 > URL: https://issues.apache.org/jira/browse/MATH-1656 > Project: Commons Math > Issue Type: Wish > Components: legacy > Affects Versions: 4.0-beta1 > Reporter: François Laferrière > Priority: Major > Labels: features > Attachments: MATH-1658-GradientDescent-Newton-BFGS.patch > > > Some classical multivariate such as > * gradient descent, > * Raphson-Newton, > * BFGS > are missing. -- This message was sent by Atlassian Jira (v8.20.10#820010)