6

I used to use Matlab to perform nonlinear fits using the nlinfit function. This allowed me to create a fit for a vector of observed responses to two predictors. Let's for arguments sake say Cu recovery through a separation process based on the feed grade and feed rate. When using Matlabs nlinfit(), the function accepted the Rec column of data as the observed response, and then a n by 2 matrix of predictors, in this case feed rate and feed grade.

I have now switched to using Python (NumPy, SciPy and MatPlotLib) instead of Matlab and cannot make the minimize function perform the same multiple variable nonlinear regression fitting. I have managed fine with a single predictor variable with many observations, but not a multiple variable predictor set.

ali_m
  • 71,714
  • 23
  • 223
  • 298
user2568366
  • 61
  • 1
  • 3
  • 2
    could you post some code? – ali_m Sep 26 '13 at 12:42
  • 2
    Can you post what you have tried thus far? Matlab's `nlinfit` function uses the Levenberg-Marquardt algorithm so you could try `scipy.optimize.leastsq` or `scipy.optimize.curve_fit` (looks like Matlab has a "robust" option). – Joel Vroom Sep 26 '13 at 15:17

0 Answers0