You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2014/10/15 22:45:34 UTC
[jira] [Comment Edited] (MATH-1144) LevenbergMarquardtOptimizer
does not allow to change current point during optimization
[ https://issues.apache.org/jira/browse/MATH-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14172900#comment-14172900 ]
Gilles edited comment on MATH-1144 at 10/15/14 8:45 PM:
--------------------------------------------------------
Thanks for the feedback.
bq. Probably we can validate currentPoint before passing it to problem.evaluate().
It seems that this would go against the latest design (and require to pass the {{ParameterValidator}} to each optimizer).
In the new version of the patch, I've added statements that update the point to be used by the optimizer (retrieving it from the current {{Evaluation}} instance).
Let me know how it goes with this one.
In the unit test I've created, it does not change anything (wrt the previous patch), unfortunately; probably it is too trivial. Could you provide a simple unit test that we can put in the CM test suite?
was (Author: erans):
Thanks for the feedback.
bq. Probably we can validate currentPoint before passing it to problem.evaluate().
It seems that this would go against the latest design (and require to pass the {{ParameterValidator}} to each optimizer).
In the new version of the patch, I've added statements that update the point to be used by the optimizer (retrieving it from the current {{Evaluation}} instance).
Let me know how it goes with this one.
In the unit test I've created, it does not change anything (wrt the previod patch), unfortunately; probably it is too trivial. Could you provide a simple unit test that we can put in the CM test suite?
> LevenbergMarquardtOptimizer does not allow to change current point during optimization
> --------------------------------------------------------------------------------------
>
> Key: MATH-1144
> URL: https://issues.apache.org/jira/browse/MATH-1144
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.3
> Reporter: Olexiy Movchan
> Labels: fitting
> Fix For: 3.4
>
> Attachments: LevenbergMarquardtOptimizer.java.patch, MATH-1144.patch, surface_fitting_tests.zip.001, surface_fitting_tests.zip.002
>
>
> It's a regression to commons-math v2.0.
> Our software uses LevenbergMarquardtOptimizer for surface fitting by sampled points. Our parameterization of the surface we are fitting may be unconstrained, for example it is enough to have only 4 variables to represent cylinder axis and origin (using euler angles and origin distance), but to simplify derivative computation we instead use 6 parameter representation (vector + point). To make sure that the we constrain our search to valid vectors and origins, we need to renormalize and update surface parameters on every step of optimization.
> Please see this article for details of 3d surface fitting and parameter normalization:
> http://nvlpubs.nist.gov/nistpubs/jres/103/6/j36sha.pdf
> Attached surface_fitting_tests.zip package with 2 unit tests that reproduce this problem.
> Contents of package:
> 1) simple - simple single file test that tests only in/out side effect of patched library
> 2) full - complex test that fits cylinder using sampled points (uses cylinder, fit, utils sources)
> 3) lib - contains commons-math3 jar libraries: v3.3 and v3.3A1 (patched). There are also library sources.
> 4) patch - contains SVN patch file
> To reproduce:
> Run SurfaceFitterFullTest.java and SurfaceFitterSimpleTest.java tests with commons-math3-3.3.jar OR commons-math3-3.3A1.jar libraries.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)