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.
nlinfit
function uses the Levenberg-Marquardt algorithm so you could tryscipy.optimize.leastsq
orscipy.optimize.curve_fit
(looks like Matlab has a "robust" option). – Guelph