bugGNU Octave - Bugs: bug #54876, [octave forge] (optim)...

 
 

bug #54876: [octave forge] (optim) lsqcurvefit: accept problem structure argument

Submitter:  John W. Eaton <jwe>
Submitted:  Mon 22 Oct 2018 07:09:58 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  jwe Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 28 Oct 2018 11:31:19 AM UTC, comment #3: 

ML website seems to have somewhat conflicting documentation, but "objective" is seemingly correct (even if a misnomer...).

I applied your original patch as it is, re-organized things a bit afterwards, and did the corresponding thing for 'lsqnonlin' also.

It's a series of patches, end versions are in

https://sourceforge.net/p/octave/optim/ci/default/tree/inst/lsqcurvefit.m

https://sourceforge.net/p/octave/optim/ci/default/tree/inst/lsqnonlin.m

https://sourceforge.net/p/octave/optim/ci/default/tree/inst/private/evaluate_problem_structure.m

https://sourceforge.net/p/octave/optim/ci/default/tree/NEWS

Closing this bug, lest I forget to close it later, but feel free to re-open it.

Olaf Till <i7tiol>
Group Member
Fri 26 Oct 2018 03:04:12 PM UTC, comment #2: 

I used the field name "objective" because that is what Matlab's lsqcurvefit function is documented to use:

https://www.mathworks.com/help/optim/ug/lsqcurvefit.html#buuhcjo-problem

John W. Eaton <jwe>
Group administrator
Fri 26 Oct 2018 11:14:45 AM UTC, comment #1: 

The attached new version of your changeset corrects field 'objective' to field 'fun' and makes the help text more compact (in the same run, formatting of a few original help text lines is corrected, sorry).

If you agree, I'll push this, and then something similar for lsqnonlin.

(file #45307)

Olaf Till <i7tiol>
Group Member
Mon 22 Oct 2018 07:09:58 PM UTC, original submission:  

It looks like Matlab optimization functions now accept a single structure argument to define the problem.  I'm attaching a patch for lsqcurvefit, similar to what I recently did for the fminsearch function that is part of Octave.

John W. Eaton <jwe>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #45307:  problem-structure-v2.cset added by i7tiol (4KiB - application/octet-stream)
file #45258:  diffs.txt added by jwe (4KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by i7tiol (Updated the item)
  • -email is unavailable- added by jwe (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-10-28 i7tiol StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2018-10-26 i7tiol Attached File- Added problem-structure-v2.cset, #45307
    2018-10-22 jwe Attached File- Added diffs.txt, #45258

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code