Re: [R] Bad optimization solution

2007-05-08 Thread Paul Smith
/agingandhealth/People/Faculty/Varadhan.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Smith Sent: Monday, May 07, 2007 6:26 PM To: R-help Subject: Re: [R] Bad

Re: [R] Bad optimization solution

2007-05-08 Thread Jasjeet Singh Sekhon
] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Smith Sent: Monday, May 07, 2007 6:26 PM To: R-help Subject: Re: [R] Bad optimization solution On 5/7/07, Paul Smith [EMAIL PROTECTED] wrote: I think the problem is the starting point. I do not remember the details of the BFGS

Re: [R] Bad optimization solution

2007-05-08 Thread RAVI VARADHAN
analytic powers! Ravi. - Original Message - From: Paul Smith [EMAIL PROTECTED] Date: Tuesday, May 8, 2007 4:33 am Subject: Re: [R] Bad optimization solution To: R-help r-help@stat.math.ethz.ch It seems that there is here a problem of reliability, as one never knows whether the solution

Re: [R] Bad optimization solution

2007-05-08 Thread S Ellison
Paul, You have picked a function that is not smoothly differentiable and also started at one of many 'stationary' points in a system with multiple solutions. In practice, I think it'll get a zero gradient as the algorithm does things numerically and you have a symmetric function. It probably

Re: [R] Bad optimization solution

2007-05-08 Thread Paul Smith
for your function is singular, it has eigenvalues of 0 and 2. In short, there is no substitute to using your analytic powers! Ravi. - Original Message - From: Paul Smith [EMAIL PROTECTED] Date: Tuesday, May 8, 2007 4:33 am Subject: Re: [R] Bad optimization solution To: R-help r-help

Re: [R] Bad optimization solution

2007-05-07 Thread apjaworski
Paul, I think the problem is the starting point. I do not remember the details of the BFGS method, but I am almost sure the (.5, .5) starting point is suspect, since the abs function is not differentiable at 0. If you perturb the starting point even slightly you will have no problem. Andy

Re: [R] Bad optimization solution

2007-05-07 Thread Paul Smith
On 5/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I think the problem is the starting point. I do not remember the details of the BFGS method, but I am almost sure the (.5, .5) starting point is suspect, since the abs function is not differentiable at 0. If you perturb the starting point

Re: [R] Bad optimization solution

2007-05-07 Thread Paul Smith
On 5/7/07, Paul Smith [EMAIL PROTECTED] wrote: I think the problem is the starting point. I do not remember the details of the BFGS method, but I am almost sure the (.5, .5) starting point is suspect, since the abs function is not differentiable at 0. If you perturb the starting point

Re: [R] Bad optimization solution

2007-05-07 Thread Sundar Dorai-Raj
Paul Smith said the following on 5/7/2007 3:25 PM: On 5/7/07, Paul Smith [EMAIL PROTECTED] wrote: I think the problem is the starting point. I do not remember the details of the BFGS method, but I am almost sure the (.5, .5) starting point is suspect, since the abs function is not

Re: [R] Bad optimization solution

2007-05-07 Thread Ravi Varadhan
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Smith Sent: Monday, May 07, 2007 6:26 PM To: R-help Subject: Re: [R] Bad optimization solution On 5/7/07, Paul Smith [EMAIL PROTECTED] wrote: I think the problem is the starting point. I do

Re: [R] Bad optimization solution

2007-05-07 Thread Berwin A Turlach
G'day Paul, On Mon, 7 May 2007 22:30:32 +0100 Paul Smith [EMAIL PROTECTED] wrote: I am trying to perform the below optimization problem, but getting (0.5,0.5) as optimal solution, which is wrong; Why? As far as I can tell you are trying to minimize |x1-x2| where x1 and x2 are between 0 and

Re: [R] Bad optimization solution

2007-05-07 Thread Berwin A Turlach
G'day Paul, On Mon, 7 May 2007 23:25:52 +0100 Paul Smith [EMAIL PROTECTED] wrote: [...] Furthermore, X^2 is everywhere differentiable and notwithstanding the reported problem occurs with myfunc - function(x) { x1 - x[1] x2 - x[2] (x1-x2)^2 } Same argument as with abs(x1-x2)

Re: [R] Bad optimization solution

2007-05-07 Thread Berwin A Turlach
G'day all, On Tue, 8 May 2007 12:10:25 +0800 Berwin A Turlach [EMAIL PROTECTED] wrote: I am trying to perform the below optimization problem, but getting (0.5,0.5) as optimal solution, which is wrong; Why? As far as I can tell you are trying to minimize |x1-x2| It was pointed out to