bugGNU Octave - Bugs: bug #53483, sqp fails to find the minimum

 
 

bug #53483: sqp fails to find the minimum

Submitter:  None
Submitted:  Mon 26 Mar 2018 11:04:28 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Ben Schwab Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.2
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Tue 27 Mar 2018 06:31:03 PM UTC, comment #3: 

It isn't a big deal, do ot worry.
As far as I can tell, your problem would be solvable if you state it in the -log scale.

I recommend you to write to the help mailing list with all the information necessary to reproduce your result. Help GNU Octave <help-octave@gnu.org>



Juan Pablo Carbajal <juanpi>
Group Member
Tue 27 Mar 2018 06:12:58 PM UTC, comment #2: 

I must apologize.  The instructions for the mailing list were to not to submit bugs to the mailing list.  Not sure whether I should submit this as a bug or as a question, I asked on the IRC channel.  The advice I got was to post it as a bug.  I must not have described my issue correctly.

I didn't mean to disregard procedure and I think you for your patience with me.

Benjamin A Schwab <benschwab>
Mon 26 Mar 2018 11:59:06 PM UTC, comment #1: 

Hi,

Your function is below tolerances. It seems like a likelihood, try to use the -log of that phi for optimization.

For this kind of questions use the mailing list, you will get better answers.

I am closing this bug, because it isn't one.

Juan Pablo Carbajal <juanpi>
Group Member
Mon 26 Mar 2018 11:04:28 PM UTC, original submission:  

I am running 64 bit Octave version 4.2.2 for Windows 10 Home Version 1511 OS Build 10586.589

I am attempting to use "sqp" to solve an optimization problem.  "sqp" is returning my guess even when there are other inputs of the function with lower outputs.  Full code used is bellow.  I emphasize that phi([70,40])=-2.9010e-035 but phi([77,47])=-1.1955e-034 which is smaller but sqp returns [70;40] as the minimum when I use that as a guess.


>> ttt = @(x) x(1)^2+x(2)^2
ttt =

@(x) x (1) ^ 2 + x (2) ^ 2

>> sqp([70,40],ttt,[],[],[-500,-500],[500,500],1e100,1e-40)
ans =

   0
   0

>> phi=@(x) -factorial(27)*prod(1/sqrt(2*pi*x(2)^2).*exp(-([1,2,3,7,20,26,35,52,58,60,64,69,72,77,84,90,90,101,104,111,121,121,132,139,141,155,159].-x(1)).^2./(2*x(2)^2)))
phi =

@(x) -factorial (27) * prod (1 / sqrt (2 * pi * x (2) ^ 2) .* exp (-([1, 2, 3, 7, 20, 26, 35, 52, 58, 60, 64, 69, 72, 77, 84, 90, 90, 101, 104, 111, 121, 121, 132, 139, 141, 155, 159] - x (1)) .^ 2 ./ (2 * x (2) ^ 2)))

>> phi([70,40])
ans =  -2.9010e-035
>> phi([77,47])
ans =  -1.1955e-034
>> phi([77.543,47.707])
ans =  -1.2047e-034
>> sqp([70,40],phi,[],[],[-500,0],[500,500],1e100,1e-40)
ans =

   70
   40

>> sqp([70,40],phi,[],[],[-500,0],[500,500],1e100,1e-100)
ans =

   70
   40

>> sqp([70,40],phi,[],[],[0,0],[100,100],1e100,1e-100)
ans =

   70
   40

>> sqp([70,40],phi,[],[],[0,0],[100,100],1e100,1e-36)
ans =

   70
   40

>>


Anonymous

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by benschwab (Posted a comment)
  • -email is unavailable- added by juanpi (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Votes

    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.

     

    History

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-26 juanpi StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.16-11ef.
    Corresponding source code