[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13099276#comment-13099276 ] Dr. Dietmar Wolz commented on MATH-621: --- {quote} I have written a lot of symmetric matrix code, and it ALWAYS outperforms any Java library I can find, simply because I use the proper 1D array form of storage. {quote} A previous version of the code (attached as version 0.4) directly uses 1D arrays instead of Matrices and is definitely faster. But here in CM the focus is to produce code which is easily understandable. This way we have a chance to understand and improve the algorithm itself. If performance of the optimization algo is important (which in many applications is not the case because interesting cost functions are normally expensive to evaluate) then you could call the C-version of BOBYQA via JNI which gives you a performance boost of factor 6-10. This is possible still using the CM interfaces and when the cost function is implemented in Java. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, BOBYQAOptimizer.java.patch, BOBYQAOptimizer0.4.zip, bobyqa.zip, bobyqa_convert.pl, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13088330#comment-13088330 ] Dr. Dietmar Wolz commented on MATH-621: --- Problems with acurracy after refactoring are common with bobyqa. I always monitored also the number of function evaluations for each unit test. It is nontrivial to estimate which change is tolerable and which not. But if we plan further refactorings like a more extensive use of the CM matrix methods, we have to accept that we modify also the behaviour of the algorithm and have to adapt the tests. People who prefer the original can use the attachments here. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, BOBYQAOptimizer.java.patch, BOBYQAOptimizer0.4.zip, bobyqa.zip, bobyqa_convert.pl, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13088385#comment-13088385 ] Dr. Dietmar Wolz commented on MATH-621: --- For me the unit tests initially had a different porpose: to ensure we reproduce the original exactly in java. I compared the eval numbers and ensured they didn't change from the original. Now we are in a different phase. Failing tests should be more seen as a warning and we could adapt the limits. But it is not easy to decide what can betolerated. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, BOBYQAOptimizer.java.patch, BOBYQAOptimizer0.4.zip, bobyqa.zip, bobyqa_convert.pl, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dr. Dietmar Wolz updated MATH-621: -- Attachment: BOBYQAOptimizer.java.patch remove unused variables Would you take that one? patch related to remove unused variables and remove unused imports BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, BOBYQAOptimizer.java.patch, BOBYQAOptimizer0.4.zip, bobyqa.zip, bobyqa_convert.pl, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13086976#comment-13086976 ] Dr. Dietmar Wolz commented on MATH-621: --- I checked out immediately before producing the patch immediately before attaching it here, strange that there was a conflict. Is it a good idea to maintain a import order inconsistent with organize imports in eclipse? This makes organize imports useless. But ok, so should I again produce a patch without the imports? But I cannot avoid a conflict if you check in just as I produce the patch. By the way: such situations are much easier to handle using git, but this is no option here. - Ursprüngliche Mail Von: Gilles (JIRA) j...@apache.org An: drdietmarw...@yahoo.de Gesendet: Donnerstag, den 18. August 2011, 13:42:27 Uhr Betreff: [jira] [Commented] (MATH-621) BOBYQA is missing in optimization [ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13086967#comment-13086967 ] Gilles commented on MATH-621: - The patch does not apply cleanly on the last revision. Are you submitted to the commits ML? If not, we should really _coordinate_. In my mind, that meant that while waiting for your answer to my questions here, I can continue updating the code... {quote} remove unused imports {quote} Please don't do that. Or in a separate patch. Or not with Eclipse: Because it reordered the import lines, out of 12 changed lines, only 2 were really suppressing unused import statements. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, BOBYQAOptimizer.java.patch, BOBYQAOptimizer0.4.zip, bobyqa.zip, bobyqa_convert.pl, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087006#comment-13087006 ] Dr. Dietmar Wolz commented on MATH-621: --- So you want to force Eclipse users not to use the organize import functionality? What is the advantage for the non-Eclipse-users? Are there other tools with organize import functionality which produce a different order of imports? -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, BOBYQAOptimizer.java.patch, BOBYQAOptimizer0.4.zip, bobyqa.zip, bobyqa_convert.pl, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13086341#comment-13086341 ] Dr. Dietmar Wolz commented on MATH-621: --- So finally we use the cm vectors / matrices, fine. Whats next? My feeling is that before we look at the case statements we should do some easy stuff: 1) remove unused variables (eclipse shows some ugly yellow warnings) 2) reorganize variable use (limit their scope). Should be done with the case statement removal in mind. 3) would be great if we could use/identify some of the ArrayRealVector / Array2DRowRealMatrix operations (beside getEntry/setEntry) We should coordinate 1) + 2), 3) may perhaps be done independently - and later merged. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, BOBYQAOptimizer0.4.zip, bobyqa.zip, bobyqa_convert.pl, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13085643#comment-13085643 ] Dr. Dietmar Wolz commented on MATH-621: --- also remove the whole case 190 (lines 667-697) My gut feeling is yes. We could just do it and rely on our unit tests. Alternatively I could ask Mike Powell. It doesn't seem that case 190 does anything beside adaptions after rescue. - Ursprüngliche Mail Von: Gilles (JIRA) j...@apache.org An: drdietmarw...@yahoo.de Gesendet: Montag, den 15. August 2011, 23:27:27 Uhr Betreff: [jira] [Commented] (MATH-621) BOBYQA is missing in optimization [ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13085340#comment-13085340 ] Gilles commented on MATH-621: - Commenting out rescue (line 671) makes the testRescue test fail, as expected. So, if I also remove the test, we are fine. However, do you know whether I can also remove the whole case 190 (lines 667-697) as well as any code that references that state (e.g. lines 791-796, 846-851, 2597-2599, etc.)? -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, BOBYQAOptimizer0.4.zip, bobyqa.zip, bobyqa_convert.pl, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dr. Dietmar Wolz updated MATH-621: -- Attachment: BOBYQAOptimizer0.4.zip No changes from the perl generated code beside the ones necessary to get INDEX_OFFSET=0 working. Introduced INDEX_OFFSET where possible but there were many other adaptions necessary (just compare the perl generated code with the attachment). Version 0.3 had some useful additional minor changes/refactorings missing here (see remarks below), but the main work for 0.3 was the index change, and this we have here again. Remarks: 1) The perl script has damaged the for loop intendation 2) n, npt and nptm should be global variables and not set separately in each method 3) System generated locals: Declare variables in the scope they are needed and not method-globally if not necessary 4) testDiagonalRosen() is a copy/paste leftover from CMAES, should be removed 5) We should shink about removing rescue as proposed by Mike Powell. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, BOBYQAOptimizer0.4.zip, bobyqa.zip, bobyqa_convert.pl, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13085074#comment-13085074 ] Dr. Dietmar Wolz commented on MATH-621: --- {quote} I see that you hard-coded the offset in most places instead of using INDEX_OFFSET. I still think that this place-holder would be useful to keep track of places where the index variables might have been set to fit with the Fortran 1-based counting... Don't you? I am not convinced yet. I thought INDEX_OFFSET as a tool to support the conversion. If you don't use INDEX_OFFSET in the for loops (for int i = INDEX_OFFSET ...) I don't see why to introduce it artificially in other places. The final aim should be to get rid of the Fortran-Arrays/Matrices and have 0-based access. I don't see it essential to maintain INDEX_OFFSET as a kind of back reference to the old Fortran code in the future. We have the unit tests as regression test. Just try to convert one method - lets say prelim - the way you want to have it. The working 0-based version 0.4 should make this easy. Then lets have a look at it. I suspect it to become rather ugly using INDEX_OFFSET in all places. But then we also should convert the for loops as (for int i = INDEX_OFFSET ...) so that the code runs again with INDEX_OFFSET=1. If you then really think it is better this way, I will help to convert the other methods. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, BOBYQAOptimizer0.4.zip, bobyqa.zip, bobyqa_convert.pl, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13084673#comment-13084673 ] Dr. Dietmar Wolz commented on MATH-621: --- Will try to fix the offsets, but this will probably take some time. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, bobyqa.zip, bobyqa_convert.pl, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13082249#comment-13082249 ] Dr. Dietmar Wolz commented on MATH-621: --- Hi Gilles, it was not my intention to separate forces, but the only thing I could do during my vacation partly without internet access was to focus on one single topic, I chose the replace all 1-based loops by 0-based loops task. Of course I didn't expect that you restart from scratch, but that we somehow integrate what we have done so far. Question is now: should we really go to CM matrices in one step, or use 0-based Arrays as an intermediate step? I could for instance use your code as a basis and try to come up with an 0-based equivalent as an intermediate step. What do you think? By the way, thanks for your significant efforts. Gilles commented on MATH-621: That said, I'm a bit dismayed that we don't seem to combine our forces to achieve that goal. - Ursprüngliche Mail Von: Gilles (JIRA) j...@apache.org An: drdietmarw...@yahoo.de Gesendet: Samstag, den 6. August 2011, 19:16:27 Uhr Betreff: [jira] [Commented] (MATH-621) BOBYQA is missing in optimization [ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13080431#comment-13080431 ] Gilles commented on MATH-621: - My first steps in the (hopefully) good direction were committed in revision 1154550. I think that the next step would be to replace all 1-based loops by 0-based loops, together with changing all occurrences of FortranArray and FortranMatrix by ArrayRealVector and Array2DRealMatrix, respectively. This is a little delicate because all changes must be done at once, and also because some indices are hard-coded and there are some tests on various index bounds (e.g. in prelim and rescue)... However, I hope that Dietmar's new version with arrays (which I haven't looked at yet) will help sort this out. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, bobyqa.zip, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13082374#comment-13082374 ] Dr. Dietmar Wolz commented on MATH-621: --- If you already started writing scripts we should see what they generate. I needed several days fixing the indices / removing all newly introduced bugs when I moved to 0-based Java arrays. My hope is that the indexing problems can be solved by looking into my 0-based Java array version. maybe because I used the C++-port in dlib? http://dlib.net/dlib/optimization/optimization_bobyqa.h.html there are no matrices. But I agree, starting with matrices and automatically transform them into a Array2DRowRealMatrix seems a good idea. - Ursprüngliche Mail Von: Gilles (JIRA) j...@apache.org An: drdietmarw...@yahoo.de Gesendet: Mittwoch, den 10. August 2011, 16:19:27 Uhr Betreff: [jira] [Commented] (MATH-621) BOBYQA is missing in optimization [ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13082361#comment-13082361 ] Gilles commented on MATH-621: - Hello Dietmar. {quote} Of course I didn't expect that you restart from scratch, but that we somehow integrate what we have done so far. {quote} But I did not restart from scratch; I used your Java translation and went from there! In fact, it looks like I used the original Fortran because I indeed did transform the ScopedPtr that were inherently bi-dimensional (i.e. matrices like bmat and zmat) into (new auxiliary) FortranMatrix objects. It was only when I checked for the bug in rescue that I looked into the original Fortran, and discovered that it was using matrices! I still don't understand why they were translated into 1-d arrays in your code... {quote} Question is now: should we really go to CM matrices in one step, or use 0-based Arrays as an intermediate step? I could for instance use your code as a basis and try to come up with an 0-based equivalent as an intermediate step. What do you think? {quote} Going to 0-based loops and replace FortranArray and FortranMatrix with their CM-equivalent (ArrayRealVector and Array2DRowRealMatrix), which are 0-based, can only be done in one step, if I'm not mistaken. I've started to write a script that would do the translation of everything that can be spotted automatically i.e. construct like {code} for (int i = 1; i n; i++) {code} and {code} zmat.getEntry(2, j) {code} and {code} FortranArray glag = new FortranArray(n); {code} etc. But there are some contructs that must be changed concomitantly (like some test on array bounds in prelim) and cannot be done automatically. I also suspect that some simplification could be done there because of the use of a variable containing the number of evaluations + 1. Unfortunately, my first attempt was not successful :( So, what I suggest is that * I finish my (Perl) script; I'll test that it makes all the intended replacements (but obviously the resulting code will not pass the tests anymore until all the non-trivial replacements have been correctly performed). * I'll post it here so that you can run it on your working copy * you could then attempt to perform the rest of the 1-based to 0-based conversion. Once we are left with ArrayRealVector and Array2DRowRealMatrix, we can see whether some of the explicit loops can replaced by matrix operation methods from CM's RealMatrix interface. After this low-level clean-up we can discuss how to introduce the bounded optimization concept into the CM API (I've already marked the code with XXX to that purpose). Concurrently to the preceding point, it would be nice to gradually tackle the goto problem. What do you think? -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, bobyqa.zip, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13076222#comment-13076222 ] Dr. Dietmar Wolz commented on MATH-621: --- Hi Gilles, bug is confirmed - and it is also in the new array based version. Debugging the unit test reveals sum is 0 here, so for rescue the unit tests are not sufficient at the moment. Creating the array based version caused a lot of these bugs initially, but I would favour this version over the old one because it is much cleaner and easier to read and maintain. My experience is that if you introduce this kind of bug in any part beside rescue, you are guaranteed to see a difference in the output I put into the junit tests form my newest attachment. The number of function calls will differ from the C/Fortran version. But you definitinely have to compare these function call numbers with the C/Fortran version, to be sure everything is as intended. Even slight changes like a = a+b replaced by a += b can cause trouble because of subtle accuracy problems accumulating over time. Rescue is a completely different story, therfore I asked Mike Powell whether he could provide us with meaningful samples/testsm his answer was: --- Excerpt from a mail from Mike Powell: Concerning RESCUE, it is present in BOBYQA because, in some tests with unattainable accuracy requirements, a little more progress could be made by invoking RESCUE. Checking the correctness of RESCUE was possible only by modifying the package in a way that forced it to be called in situations that were not contaminated severely by loss of accuracy. I may decide to delete RESCUE from the Fortran package that I send to people who ask for BOBYQA. - To make progress we have a lot of options to decide: 1) Keep rescue? May be removing it from the initial release in commons.math doesn't do too much harm. When keeping it we should find useful applications before and add them to the unit tests. 2) Using arrays instead of pointers and don't use the large shared working space? I would prefer so, since the arrays-version is faster in Java (pointers need to be emulated) and the code becomes much clearer. 3) Complete redesign/refactor the code? A difficult issue. I would say that this is very hard to achieve. Instead I would try to build something equivalent from scratch. Problem is that Mike Powell put 50 years of experience developing optimization algos into BOBYQA and you can see that comparing the number of cost function calls needed with other optimization algos. So from the user perspective BOBYQA has a huge value even if not completely refactored/redesigned and it is not an easy decision to keep BOBYQA out of commons.math for code-aesthetic reasons. I would like to see other opinions on these options. Gilles commented on MATH-621: - Dietmar, I think I've come across a bug in function rescue. At line 2443 (of the Java translation I use for comparison, i.e. the one with ScopedPtr): {code} i__2 = ndim; for (ip = npt; ip = i__2; ip++) { sum += bmat.get(ip + j * bmat_dim1) * w.get(ip); } {code} Whereas, in the original Fortran code (at line 1544): {noformat} DO 220 IP=NPT+1,NDIM 220 SUM=SUM+BMAT(IP,J)*W(IP) {noformat} Can you confirm? If indeed, the loop should start at npt + 1, I've made the change; but tests still all pass! Does this mean that the one exercising rescue is too lenient? Trying to remove the w (split work space) from rescue provides many possibilities for my own mistakes; thus I am a little scared that they would also go unnoticed... -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, bobyqa.zip, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13076251#comment-13076251 ] Dr. Dietmar Wolz commented on MATH-621: --- The new version was not mentioned earlier because it didn't exist. I did that on my vacation and uploaded it at the day I got the tests through. I suspected you tried something similar but I thought that it would it make easier for you to locate bugs in your version if you had something working using arrays for comparison. Conversion of the state machine is far from trivial, if you want to do it properly. Problem is that you either define a lot of global variables or have to transfer a huge number of parameters. What would the jar-solution mean for the users? How will a user find the jar, who will host these kind of black box extensions to CM? Instead of providing a jar you could also provide a dll/shared libraries together with a JNI interface. It is also a black box - but up to six times faster according to my tests. But I agree - performance is not essentially here because you usually have expensive evaluation functions. Having the code published could inspire others to work and improve on it. Gilles commented on MATH-621: - :( It's a pity that you didn't mention this version earlier; I already spent quite a few hours replacing the ScopedPtr variables. Only a few of them remains in my working version: namely, those that are created as offsets in w before calling trsbox, rescue, altmov and update. Since I also made a few other changes along the way, I don't feel like starting all (almost) over again... Hence, I'll continue with my incremental changes; but, at some point, I could use some help to convert the state machine code into proper function calls. IMO, we should first arrive at a clearer code before worrying about performance (the more so that, as you pointed out, this algorithm will probably be put to use when function evaluation is expensive, overwhelming the optimizer's code running time). The refactoring from efficient Fortran to (very probably less efficient) Java is a big effort but it's indispensable: If it were not to become understandable and maintainable, I don't see the point in including it in CM; you could just provide the straight translation in a JAR file and people would use it as a black box. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, bobyqa.zip, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13078395#comment-13078395 ] Dr. Dietmar Wolz commented on MATH-621: --- The code is now fully documented - even the internals of the private functions. Gilles and me have already removed the main obstacle - the use of pointers und the nasty huge working area. A further refactoring - splitting the private functions into smaller ones - now is much more work. Maybe Gilles can give an estimation of the effort? I started and was a bit frustrated soon since I had to introduce so many global variables, I felt the code even lost readability. Now the variables are at least local to the (admittedly large) functions. I got the feeling that it would be easier to invent something equivalent from scratch describing the algorithm mathematically as a set of matrix operations first - similar as it was done for CMA-ES. Then a clean implementation (maybe starting with a matlab prototype) could be done. I can perform the second step - but for the first one an active researcher in the field would be required - a researcher willing to license his work for Apache. As discussed in the mailing list there are candidates and Luc offered to approach one of them. To summarize the opinions so far: Besides Luc and me everyone seems to favor to keep out BOBYQA from CM. It could be hosted at Apache Extras, GitHub or SourceForge. Gilles continues to try to further enhance the code with the aim to make it suitable for inclusion into CM. Phil Steitz commented on MATH-621: -- +1 for this and that we could do here. The key is to get the code to the point where others can follow it so they get inspired rather than confused and frustrated. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, bobyqa.zip, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dr. Dietmar Wolz updated MATH-621: -- Attachment: bobyqaoptimizer0.4.zip The attached new version contains three variants of BOBYQA implementing the MultivariateRealOptimizer together with their associated unit tests: BOBYQAOptimizerOld - essentially the previous version 0.3 with minor adaptions in the unit tests added for comparison. BOBYQAOptimizer - the actual version I use myself - all pointers are replaced by Java arrays. This version is much easier to read and faster than the old one. Nevertheless the finite state machine logic realized by the original code using gotos is still there - in Java realized using switch/case statements. BOBYQAOptimizerC - a version showing how MultivariateRealOptimizer can be implemented using the C-port of BOBYQA from the dlib library. The C++-code doing the mapping from Java to C++ to Java via JNI is also included. Some remarks: - all three versions are semantically equivalent - at least from the point of the actual unit test coverage. - the new Java version is about 30% faster than the old one - array access is cheaper than method calls simulating pointer arithmetic. - I observed a significant change of behaviour when statements like a = a+(b...) are replaced by a += (b...). Subtle accuracy differences add up during the optimization process. - The C version was tested both on Mac (Snow Leopard) and Windows7, both for 32 and 64-bit Java. For 64bit the Microsoft C++-compiler produced correct results only if optimization is switched off completely, on the Mac the gnu compiler works correctly using -O3. - On the Mac (a Macbook pro with a new sandy bridge processor) the C-version performs the unit tests three times faster than the (new) Java version. The difference on Win7 is much smaller, since I couldn't use compiler optimization there yet. The performance difference is not significant for my own application of the algo (space flight trajectory optimization) because of the high cost for the eval function. But this is perhaps not true for all other applications. So if we want to include BOBYQA in commons.math in my opinion we shouldn't neglect performance issues generally. Even a direct port of the code has a significant performance disadvantage, any refactoring should try to avoid adding too much additional performance bottlenecks. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, bobyqa.zip, bobyqaoptimizer0.4.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13066380#comment-13066380 ] Dr. Dietmar Wolz commented on MATH-621: --- Confirmed - this also happens with the original code, I will ask Mike Powell to provide us with a function exercising rescue. You are probably suspicious whether the Java rescue works, as am I. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, bobyqa.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13066425#comment-13066425 ] Dr. Dietmar Wolz commented on MATH-621: --- Now I remember that I debugged rescue (and removed a nasty infinite loop) testing MinusElli with GoalType.MAXIMIZE before I fixed the GoalType.MAXIMIZE handling. Testing MinusElli with GoalType.MINIMIZE still calls rescue: @Test public void testRescue() { double[] startPoint = point(DIM,1.0); double[][] boundaries = null; RealPointValuePair expected = new RealPointValuePair(point(DIM,0.0),-7.5072566333E53); doTest(new MinusElli(), startPoint, boundaries, GoalType.MINIMIZE, 1e45, 1e24, 1000, expected); } But parallel testing with the original revealed a problem, so please wait a few hours before working on rescue, I will fix it soon. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, bobyqa.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dr. Dietmar Wolz updated MATH-621: -- Attachment: bobyqav0.3.zip rescue was as I feared not correct, the fixed version v0.3 behaves exactly as the original. A breakup of the working area in separate double arrays should be straightforward, but still some work because of the nasty loop counting starting with 1. Something like double[] xbase = new double[n]; double[] xpt = new double[n * npt]; double[] fval = new double[npt]; double[] xopt = new double[n]; double[] gopt = new double[n]; double[] hq = new double[n * np / 2]; double[] pq = new double[npt]; double[] bmat = new double[ndim * n]; double[] zmat = new double[npt * (npt - np)]; double[] sl = new double[n]; double[] su = new double[n]; double[] xnew = new double[n]; double[] xalt = new double[n]; double[] d__ = new double[n]; double[] vlag = new double[ndim]; double[] w = new double[?]; Class ScopePtr could then be removed and the code should get even faster. The gotos/ switches are much harder to eliminate. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, bobyqa.zip, bobyqav0.3.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (MATH-621) BOBYQA is missing in optimization
BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dr. Dietmar Wolz updated MATH-621: -- Attachment: BOBYQA.math.patch Initial code contribution (BOBYQAOptimizer.java + Unit tests) BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dr. Dietmar Wolz updated MATH-621: -- Attachment: BOBYQA.v02.math.patch Tests with the original code confirmed a problem of BOBYQA with DiffPow and SsDiffPow. But the tests revealed a problem with the Java code: Initialization of the bounds with Double.MIN_VALUE and Double.MAX_VALUE (representing no bounds) caused trouble, I changed the values to -1e300, 1e300. The old performance numbers a not valid, BOBYQA changed the initial guess because of the bounds problem. Adjusted accuracy level for PowellOptimizer and the new BOBYQA code - now initialized correctly, lead to the following performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9831 / 1404 MinusElli = 183 / 115 Elli = 399 / 147 ElliRotated = 8964 / 7165 Cigar = 348 / 56 TwoAxes = 223 / 70 CigTab = 513 / 61 Sphere = 223 / 56 Tablet = 223 / 57 DiffPow = 308 / 10139 SsDiffPow = 667 / 4520 Ackley = 814 / 458 Rastrigin = 327 / 167 Essentially the same picture as before. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13065965#comment-13065965 ] Dr. Dietmar Wolz commented on MATH-621: --- FORTRAN code in Java clothes was the best I could do so far. Perhaps someone else voluteers to transfer the code into a more readable version using the commons.math matrix operations? The problem is that the original code heavily relies on pointers and gotos. It is indeed probably only maintainable by the author. The current code could simplify the development of a clean version by enabling parallel debugging using only a Java development environment. I started with embedding a C++ port via JNI treating the optimizer as a black box. Since JNI is not possible in commons.math, I tried to convert the code to Java. Unfortunately there is nothing publicly available which has comparable qualities in terms of usability. From the developer perspective we have a maintanance problem, but from the user perspective, it is not very satisfactory to abandon BOBYQA. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MATH-621) BOBYQA is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dr. Dietmar Wolz updated MATH-621: -- Attachment: bobyqa.zip As requested the source files of the second patch. BOBYQA is missing in optimization - Key: MATH-621 URL: https://issues.apache.org/jira/browse/MATH-621 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: BOBYQA.math.patch, BOBYQA.v02.math.patch, bobyqa.zip Original Estimate: 8h Remaining Estimate: 8h During experiments with space flight trajectory optimizations I recently observed, that the direct optimization algorithm BOBYQA http://plato.asu.edu/ftp/other_software/bobyqa.zip from Mike Powell is significantly better than the simple Powell algorithm already in commons.math. It uses significantly lower function calls and is more reliable for high dimensional problems. You can replace CMA-ES in many more application cases by BOBYQA than by the simple Powell optimizer. I would like to contribute a Java port of the algorithm. I maintained the structure of the original FORTRAN code, so the code is fast but not very nice. License status: Michael Powell has sent the agreement via snail mail - it hasn't arrived yet. Progress: The attached patch relative to the trunk contains both the optimizer and the related unit tests - which are all green now. Performance: Performance difference (number of function evaluations) PowellOptimizer / BOBYQA for different test functions (taken from the unit test of BOBYQA, dimension=13 for most of the tests. Rosen = 9350 / 1283 MinusElli = 118 / 59 Elli = 223 / 58 ElliRotated = 8626 / 1379 Cigar = 353 / 60 TwoAxes = 223 / 66 CigTab = 362 / 60 Sphere = 223 / 58 Tablet = 223 / 58 DiffPow = 421 / 928 SsDiffPow = 614 / 219 Ackley = 757 / 97 Rastrigin = 340 / 64 The number for DiffPow should be dicussed with Michael Powell, I will send him the details. Open Problems: Some checkstyle violations because of the original Fortran source: - Original method comments were copied - doesn't follow javadoc standard - Multiple variable declarations in one line as in the original source - Problems related to goto conversions: gotos not convertible in loops were transated into a finite automata (switch statement) no default in switch fall through from previos case in switch which usually are bad style make no sense here. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MATH-442) CMA evolution strategy is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12990737#comment-12990737 ] Dr. Dietmar Wolz commented on MATH-442: --- Just for clarification: The code used for GTOC is the code from the patch. This is a new implementation (from me) very closely related to the Matlab version from Nikolaus. There is also a Java-Version on Nikolaus homepage, but this is a bit different (and doesn't include the newest ideas). Please contact Nikolaus Hansen directly via mail, I am not shure he still follows the mailing list. Last info from him (two days ago) was that he will help to solve the licencing issue. CMA evolution strategy is missing in optimization - Key: MATH-442 URL: https://issues.apache.org/jira/browse/MATH-442 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Attachments: cmaes.math.patch Original Estimate: 48h Remaining Estimate: 48h Recently I implemented the optimization algorithm CMA-ES based on org.apache.commons.math.linear and used it for the GTOC5 global trajectory optimization contest http://gtoc5.math.msu.su/. It implements the MultivariateRealOptimizer interface and would nicely fit into the org.apache.commons.math.optimization package. The original author of CMA-ES (Nikolaus Hansen) volunteered to support me (proof-reading + testing) in the creation of a CMA-ES contribution for commons.math. The CMA evolution strategy http://www.lri.fr/~hansen/cmaesintro.html is a very powerful algorithm for difficult non-linear non-convex optimization problems in continuous domain. See http://www.lri.fr/~hansen/cec2005.html for a comparison chart. If there is interest I will create a patch including the proposed Implementation for evaluation. It seems we would need an additional sub-package - org.apache.commons.math.optimization.evolutionary. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MATH-442) CMA evolution strategy is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12934306#action_12934306 ] Dr. Dietmar Wolz commented on MATH-442: --- An initial version of the patch is now reviewed by Nikolaus Hansen and will hopefully soon be attached.I followed all the hints given in the mailing list. CMA evolution strategy is missing in optimization - Key: MATH-442 URL: https://issues.apache.org/jira/browse/MATH-442 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Fix For: 3.0 Original Estimate: 48h Remaining Estimate: 48h Recently I implemented the optimization algorithm CMA-ES based on org.apache.commons.math.linear and used it for the GTOC5 global trajectory optimization contest http://gtoc5.math.msu.su/. It implements the MultivariateRealOptimizer interface and would nicely fit into the org.apache.commons.math.optimization package. The original author of CMA-ES (Nikolaus Hansen) volunteered to support me (proof-reading + testing) in the creation of a CMA-ES contribution for commons.math. The CMA evolution strategy http://www.lri.fr/~hansen/cmaesintro.html is a very powerful algorithm for difficult non-linear non-convex optimization problems in continuous domain. See http://www.lri.fr/~hansen/cec2005.html for a comparison chart. If there is interest I will create a patch including the proposed Implementation for evaluation. It seems we would need an additional sub-package - org.apache.commons.math.optimization.evolutionary. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-442) CMA evolution strategy is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12932872#action_12932872 ] Dr. Dietmar Wolz commented on MATH-442: --- If all optimization algos which don't require derivatives go into direct this would be the right package for CMA-ES. But the term direct is often used with another meaning, see for instance http://en.wikipedia.org/wiki/Numerical_analysis#Direct_and_iterative_methods CMA evolution strategy is missing in optimization - Key: MATH-442 URL: https://issues.apache.org/jira/browse/MATH-442 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Original Estimate: 48h Remaining Estimate: 48h Recently I implemented the optimization algorithm CMA-ES based on org.apache.commons.math.linear and used it for the GTOC5 global trajectory optimization contest http://gtoc5.math.msu.su/. It implements the MultivariateRealOptimizer interface and would nicely fit into the org.apache.commons.math.optimization package. The original author of CMA-ES (Nikolaus Hansen) volunteered to support me (proof-reading + testing) in the creation of a CMA-ES contribution for commons.math. The CMA evolution strategy http://www.lri.fr/~hansen/cmaesintro.html is a very powerful algorithm for difficult non-linear non-convex optimization problems in continuous domain. See http://www.lri.fr/~hansen/cec2005.html for a comparison chart. If there is interest I will create a patch including the proposed Implementation for evaluation. It seems we would need an additional sub-package - org.apache.commons.math.optimization.evolutionary. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-442) CMA evolution strategy is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12932873#action_12932873 ] Dr. Dietmar Wolz commented on MATH-442: --- We already invested some time to merge the algo to be based on commons.math. If the code is accepted I will support it in the future including bug fixes. The author of the algorithm volunteered to support me. For discussions regarding IP issues I propose to involve also the original author (Nikolaus Hansen) via e-mail. CMA evolution strategy is missing in optimization - Key: MATH-442 URL: https://issues.apache.org/jira/browse/MATH-442 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Original Estimate: 48h Remaining Estimate: 48h Recently I implemented the optimization algorithm CMA-ES based on org.apache.commons.math.linear and used it for the GTOC5 global trajectory optimization contest http://gtoc5.math.msu.su/. It implements the MultivariateRealOptimizer interface and would nicely fit into the org.apache.commons.math.optimization package. The original author of CMA-ES (Nikolaus Hansen) volunteered to support me (proof-reading + testing) in the creation of a CMA-ES contribution for commons.math. The CMA evolution strategy http://www.lri.fr/~hansen/cmaesintro.html is a very powerful algorithm for difficult non-linear non-convex optimization problems in continuous domain. See http://www.lri.fr/~hansen/cec2005.html for a comparison chart. If there is interest I will create a patch including the proposed Implementation for evaluation. It seems we would need an additional sub-package - org.apache.commons.math.optimization.evolutionary. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-442) CMA evolution strategy is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12932936#action_12932936 ] Dr. Dietmar Wolz commented on MATH-442: --- http://cm.bell-labs.com/cm/cs/doc/96/4-02.ps.gz states that a method should not 'in its heart' develop an approximate gradient as for instance quasi-Newton methods. I don't think this qualifies CMA-ES as 'direct' method. Adaptation of the covariance matrix amounts to learning a second order model of the underlying objective function similar to the approximation of the inverse Hessian matrix in the Quasi-Newton method in classical optimization . CMA evolution strategy is missing in optimization - Key: MATH-442 URL: https://issues.apache.org/jira/browse/MATH-442 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Original Estimate: 48h Remaining Estimate: 48h Recently I implemented the optimization algorithm CMA-ES based on org.apache.commons.math.linear and used it for the GTOC5 global trajectory optimization contest http://gtoc5.math.msu.su/. It implements the MultivariateRealOptimizer interface and would nicely fit into the org.apache.commons.math.optimization package. The original author of CMA-ES (Nikolaus Hansen) volunteered to support me (proof-reading + testing) in the creation of a CMA-ES contribution for commons.math. The CMA evolution strategy http://www.lri.fr/~hansen/cmaesintro.html is a very powerful algorithm for difficult non-linear non-convex optimization problems in continuous domain. See http://www.lri.fr/~hansen/cec2005.html for a comparison chart. If there is interest I will create a patch including the proposed Implementation for evaluation. It seems we would need an additional sub-package - org.apache.commons.math.optimization.evolutionary. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-442) CMA evolution strategy is missing in optimization
[ https://issues.apache.org/jira/browse/MATH-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12932961#action_12932961 ] Dr. Dietmar Wolz commented on MATH-442: --- Will subscribe today CMA evolution strategy is missing in optimization - Key: MATH-442 URL: https://issues.apache.org/jira/browse/MATH-442 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Original Estimate: 48h Remaining Estimate: 48h Recently I implemented the optimization algorithm CMA-ES based on org.apache.commons.math.linear and used it for the GTOC5 global trajectory optimization contest http://gtoc5.math.msu.su/. It implements the MultivariateRealOptimizer interface and would nicely fit into the org.apache.commons.math.optimization package. The original author of CMA-ES (Nikolaus Hansen) volunteered to support me (proof-reading + testing) in the creation of a CMA-ES contribution for commons.math. The CMA evolution strategy http://www.lri.fr/~hansen/cmaesintro.html is a very powerful algorithm for difficult non-linear non-convex optimization problems in continuous domain. See http://www.lri.fr/~hansen/cec2005.html for a comparison chart. If there is interest I will create a patch including the proposed Implementation for evaluation. It seems we would need an additional sub-package - org.apache.commons.math.optimization.evolutionary. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (MATH-442) CMA evolution strategy is missing in optimization
CMA evolution strategy is missing in optimization - Key: MATH-442 URL: https://issues.apache.org/jira/browse/MATH-442 Project: Commons Math Issue Type: New Feature Affects Versions: 3.0 Reporter: Dr. Dietmar Wolz Recently I implemented the optimization algorithm CMA-ES based on org.apache.commons.math.linear and used it for the GTOC5 global trajectory optimization contest http://gtoc5.math.msu.su/. It implements the MultivariateRealOptimizer interface and would nicely fit into the org.apache.commons.math.optimization package. The original author of CMA-ES (Nikolaus Hansen) volunteered to support me (proof-reading + testing) in the creation of a CMA-ES contribution for commons.math. The CMA evolution strategy http://www.lri.fr/~hansen/cmaesintro.html is a very powerful algorithm for difficult non-linear non-convex optimization problems in continuous domain. See http://www.lri.fr/~hansen/cec2005.html for a comparison chart. If there is interest I will create a patch including the proposed Implementation for evaluation. It seems we would need an additional sub-package - org.apache.commons.math.optimization.evolutionary. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.