Python Forum

Full Version: Least-squares fit multiple data sets
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Let's say I have 3 sets of data (data_1, data_2, data_3).

I am trying to perform a least squares fit to this data with three corresponding nonlinear functions (func_1, func_2, func_3). However, these functions are coupled in the sense that func_1 is a function of variables a and c, func_2 is a function of variables a and b, and func_3 is a function of variables b and c.

So I am essentially solving for a, b, and c that simultaneously least-squares fit the three data sets. What is the syntax to perform this in python?
If you're looking for one set of coefficients to fit all three datasets, I would think that you'd have to overlay all three into one combined dataset and fit to that.