Open mdtanker opened 1 week ago
This looks cool! I hadn’t seen Optuna before. Do you it would be possible to have something that would work with it without having to add it as a dependency?
As in a custom optimization implementation? Or just adding Optuna as an optional dependency? It could definitely be an optional dependency and would just raise a warning if users call vd.SplineOptimize()
.
Description of the desired feature:
I have a function that I frequently use and was wondering if others are interested in it being included in Verde. It is an alternative to
vd.SplineCV()
which instead of doing a grid-search of the provided damping values, it runs an optimization to find the best damping value given upper and lower limits, and a number of trials.For situations where you want to explore a large range of damping values, this optimization find the best values a lot quicker than the grid search in SplineCV. This either allows you to use the same amount of time to find a better value, or find a value which produce an equivalent score faster.
I use the Python package Optuna for this. I think could be implement similar to
SplineCV
, something like:Here is my current implementation:
And its used like this:
Then you can see the resulting scores and damping parameter values from the study object:
Are you willing to help implement and maintain this feature?
Yes if it's something people are interested in and if we're ok with adding Optuna as a dependency.