There is no module. Your general problem is "what simple function best fits this data?" There is no general solution, as "simple" requires proper definition and restriction to yield a meaningful answer.
A basic theorem of algebra shows that a data set on N
points can be fitted by a polynomial of degree no more than N-1
. Restricting more than this requires that you define search space and explore within that definition.
Yes, there exist methods to set a maximum degree and work within that; you can write a loop to increase that degree until you find an exact solution.
I suggest that you look at the curve-fitting methods of Scikit
and employ those in a solution of your own devising. You may need to work through all combinations of your chosen degree, adding new terms each time you increase the degree. You may also need to write the exploration to consider those terms in the order of your defined complexity.
Response to OP comment:
I see; you're somewhat following in the footsteps of FiveThirtyEight.com, best known for accuracy with baseball and elections in the USA. Depending on the accuracy you want, this problem gets nasty very quickly. You get terms such as ((MY_OFF-OPP_DEF) ^ 1.28 + 2.1 - sqrt(OPP_GK)) / BLAH
.
In any case, you're likely into a deep learning regression application, somewhat more complex than a "simple" sum-of-products scenario. You might get acceptable results with "mere" machine learning, but be prepared for disappointment in even the simpler task of predicting the winner.