Fitting one data pattern to another in Python
What you are trying to achieve has a name. It is a regression problem. You want to find a relation between data points and how they are linked.
Having said that, you can look into LinearRegression() from sci-kit learn. It would be useful for your case.
Note: It might be possible that maybe linear regression can't capture whatever relation your data holds then try other models like SVM with a non linear kernel or maybe NN. (duh).
Let there be an pattern that is known at certain points, but has an unknown functional form. Let there also be a data set. Both, as far as the computer can be concerned, are just a set of (x,y) values.
However, I still want to fit my pattern to the data with a simple relation, a*P+b, and I want to find the best values for the parameters a,b with an actual fitting routine. How can I do this with something akin to optimize.curve_fit(), or do I have to invent my own method?