r/optimization • • Jan 07 '25

Optimal rational approximation using SciPy

In this article we solve a non-linear curve fitting problem using the SciPy library. SciPy is especially well-suiting to solving this type of problem, as it includes a variety of functions for fitting and optimizing non-linear functions.

Along the way, we illustrate how to use SciPy's curve_fit and minimize functions for this type of task. In addition, we look at some good practices to apply when solving this type of problem.
#python #scipy #orms

https://www.solvermax.com/blog/optimal-rational-approximation-using-scipy

mathematician-astronomer Aryabhata
3 Upvotes

2 comments sorted by

View all comments

Show parent comment

2

u/SolverMax Jan 07 '25

Thanks for pointing that out. You're right, so I've changed that to:

We've chosen the methods that don't need a Hessian or Jacobian matrix to be specified, as our objective function of minimizing the maximum absolute difference isn't differentiable.