[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54115] [octave-forge] optim function de_min:
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #54115] [octave-forge] optim function de_min: Missing error message for function insensitive to optimization |
Date: |
Thu, 14 Jun 2018 12:33:16 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 |
URL:
<http://savannah.gnu.org/bugs/?54115>
Summary: [octave-forge] optim function de_min: Missing error
message for function insensitive to optimization
Project: GNU Octave
Submitted by: None
Submitted on: Thu 14 Jun 2018 04:33:14 PM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Missed Error or Warning
Status: None
Assigned to: None
Originator Name: Stefan Schloegl
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 4.4.0
Operating System: Any
_______________________________________________________
Details:
Dear Package maintainer,
the function de_min from the optim package causes a cryptic error for certain
objective functions, which are insensitive to changes of input values.
Example:
function testdemin()
ctl.XVmin = -1;
ctl.XVmax = 1;
ctl.constr= 1;
ctl.const = [];
ctl.maxiter = 1000;
[x, obj_value, nfeval, convergence] = de_min (@phi, ctl)
endfunction
function obj = phi(x)
obj = sqrt(eps) .* x.^2;
endfunction
shows the following cryptic error message:
error: 'ui' undefined near line 409 column 7
error: called from
de_min at line 409 column 3
The reason is, that the conditions, which are required to entering the
optimization while loop, are not fulfilled. All objective function values of
the entire population are equal.
The variable ui remains undeclared, if the while loop is never entered.
In other words: the objective function is too flat to show any changes in
output value for the given population values (bestval equals all values).
Removing the sqrt(eps) in the given example increases sensitivity and gives
the desired results.
Proposed solution (see also the attached patch file):
checking the problematic condition in advance:
if (max (val) == bestval)
error("All objective function values for entire NP are equal.")
endif
Best,
Stefan
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 14 Jun 2018 04:33:14 PM UTC Name: de_min.patch Size: 138B By:
None
Patch
<http://savannah.gnu.org/bugs/download.php?file_id=44368>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?54115>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54115] [octave-forge] optim function de_min: Missing error message for function insensitive to optimization,
anonymous <=