Optimizing FindMinimum for speed using intermediate calculations.
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg1175] Optimizing FindMinimum for speed using intermediate calculations.
- From: Bill Harbaugh <harbaugh at students.wisc.edu>
- Date: Sat, 20 May 1995 04:23:30 -0400
- Organization: University of Wisconsin, Madison
I am trying to maximize a likelihood function, using FindMinimum. This
involves finding the parameters (x,y in my simplified example) that max
(min, in my example) the sum of the values of a function applied to some
data (ddist, in my example).
My actual problem is very long and my question is about how to optimize
my mma code for speed.
This function involves some intermediate results (x1,y1 in my example)
which vary across the x,y parameters but are constant across the d's.
(In my actual problem, these intermediate results are found using NSolve,
so I am specifying the functions using := rather than =). I am trying to
only calculate these once for each iteration on x,y, and then apply the
results to each of the d's in the list ddist. The code below shows how I
do this without trying to optimize.
This works, but it seems the following should be faster.
This also works, but timing results are inconclusive. I would appreciate
suggestions on any other approaches that might speed this up. I am also
asking mma support for help, and will forward their reply.
harbaugh at students.wisc.edu
Prev by Date:
triangular phase diagram
Next by Date:
Previous by thread:
Re: triangular phase diagram
Next by thread:
Re: Optimizing FindMinimum for speed using intermediate calculations.