Note that there are some explanatory texts on larger screens.

plurals
  1. POParallel many dimensional optimization
    primarykey
    data
    text
    <p>I am building a script that generates input data [parameters] for another program to calculate. I would like to optimize the resulting data. Previously I have been using the numpy powell optimization. The psuedo code looks something like this.</p> <pre><code>def value(param): run_program(param) #Parse output return value scipy.optimize.fmin_powell(value,param) </code></pre> <p>This works great; however, it is incredibly slow as each iteration of the program can take days to run. What I would like to do is coarse grain parallelize this. So instead of running a single iteration at a time it would run (number of parameters)*2 at a time. For example:</p> <pre><code>Initial guess: param=[1,2,3,4,5] #Modify guess by plus minus another matrix that is changeable at each iteration jump=[1,1,1,1,1] #Modify each variable plus/minus jump. for num,a in enumerate(param): new_param1=param[:] new_param1[num]=new_param1[num]+jump[num] run_program(new_param1) new_param2=param[:] new_param2[num]=new_param2[num]-jump[num] run_program(new_param2) #Wait until all programs are complete -&gt; Parse Output Output=[[value,param],...] #Create new guess #Repeat </code></pre> <p>Number of variable can range from 3-12 so something such as this could potentially speed up the code from taking a year down to a week. All variables are dependent on each other and I am only looking for local minima from the initial guess. I have started an implementation using hessian matrices; however, that is quite involved. Is there anything out there that either does this, is there a simpler way, or any suggestions to get started?</p> <p>So the primary question is the following: Is there an algorithm that takes a starting guess, generates multiple guesses, then uses those multiple guesses to create a new guess, and repeats until a threshold is found. Only analytic derivatives are available. What is a good way of going about this, is there something built already that does this, is there other options?</p> <p>Thank you for your time.</p> <p>As a small update I do have this working by calculating simple parabolas through the three points of each dimension and then using the minima as the next guess. This seems to work decently, but is not optimal. I am still looking for additional options.</p> <p>Current best implementation is parallelizing the inner loop of powell's method.</p> <p>Thank you everyone for your comments. Unfortunately it looks like there is simply not a concise answer to this particular problem. If I get around to implementing something that does this I will paste it here; however, as the project is not particularly important or the need of results pressing I will likely be content letting it take up a node for awhile.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload