LBFGS for use in large maximum likelihood problem



dlakelan wrote:
> Robert Dodier wrote:
>> On 8/8/08, dlakelan <dlakelan at street-artists.org> wrote:
> ...
>> Dan, I think the problem in this case is that diff doesn't treat
>> lsum the same as sum --- specifically that diff distributes over
>> sum but not lsum.
> ....
>> Anyway hope this sheds some light on the problem.
> 
> Hi Robert,
> 
> It seems to me that it takes longer to do each step of the LBFGS when I 
> use the "sum" noun than when I construct the huge expression, although 
> the sum noun is of course much faster to construct. I didn't profile it 
> though since I was working with my main problem not the simpler example 
> one that I posted.
....

aha, I've thought of one thing that's relevant here... indexing the list 
is quadratic in the length of the list... as far as I know... so 
sum(f(data[i]),i,1,length(data)) takes O(length(data)^2)... right? is 
there a way I can formulate this to take a single pass down the data 
list, and still not construct a massive symbolic sum?