Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can NonlinearModelFit be parallelized or compiled to allow one to achieve a scalable speedup for a fitting procedure? Attempting to use this function to fit a bivariate Gaussian (with a decent guess for initial conditions) can take upwards of a second.

share|improve this question

closed as off-topic by Louis, MarcoB, m_goldberg, J. M. Jun 24 at 3:02

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – Louis, MarcoB, m_goldberg, J. M.
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Not really, no. NonLinearModelFit uses FindFit which uses FindMinimum, and this function is well optimized. If none of the FindMinimum methods gives you a solution quickly enough (by which I mean: try them all, including a reasonable selection of suboptions) then I suppose it'll be quite difficult to achieve a speed-up any other way. – Oleksandr R. Jun 26 '13 at 10:50
    
@OleksandrR. it depends. If the OP would be a little more open and post some code, there might be an issue with the optimizer for instance (catchword NIntegrate etc.) – Stefan Jun 26 '13 at 12:46
    
@Stefan Apologies, I didn't mean to be cagey about anything. My question here just has to do with a previous question of mine asking about how to best do a 2D Gaussian fit: mathematica.stackexchange.com/questions/27642/… – Bob Jun 26 '13 at 13:08
    
@Stefan yes, you're right of course. It's only because OP's questions so far have all been so vague that I thought the easiest approach was just to assume a sensible approach is being taken and say no rather than painfully try to extract more details such as, I don't know, what the function being fitted actually is. – Oleksandr R. Jun 26 '13 at 14:23

Browse other questions tagged or ask your own question.