Skip to content
Back to formatted view

Raw Message

Message-ID: <CCF7999E-4AB8-46B2-BAE4-809DE26F59E6@xs4all.nl>
Date: 2009-03-18T19:43:07Z
From: Berend Hasselman
Subject: Non-Linear Optimization - Query
In-Reply-To: <003901c9a7f0$23506230$7c94100a@win.ad.jhu.edu>

On 18-03-2009, at 18:36, Ravi Varadhan wrote:
>>
>> system.time(ans.nl <- nleqslv(x=p0, fn=broydt))[1]
> user.self
>     8.17

On my Imac 2.16Ghz and R 2.8.1 and Mac OS X 10.5.6
this took approximately 5 seconds.

Interesting is this experiment.
I set the jacobian for a starting point with all x-values equal to -1  
to a diagonal matrix with 7 on the diagonal
(not a bad approximation).

Solving the 1000 equation system now takes 1.4 seconds on my computer  
with Broyden and double dogleg in 26 iterations
(only 1 jacobian is needed in the first iteration).
So the overhead of calculating  the initial jacobian appears to be a  
bottleneck.

Berend