treverhines / RBF

Python package containing the tools necessary for radial basis function (RBF) applications
MIT License
215 stars 50 forks source link

LOO cross validation implementation #37

Closed sfladi closed 3 months ago

sfladi commented 3 months ago

The documentation talks about automatic estimation of the smoothing parameter sigma and/or kernel scale parameter epsilon for the RBFInterpolatant, using leave-one-out cross validation (LOOCV).

After reading through the implementation, it looks to me like it is performing just a single pass optimization over the whole dataset (instead of looping over cross-validation subsamples).

Could you point me to where the cross validation is happening?

sfladi commented 3 months ago

I was unaware, that the leave on out cross validation error can actually be computed in a single pass as implemented in rbf.interpolate._loocv(d, K, P).

I still have to read up on the algrebraic tricks that lead to this solution. But that is not an issue with this package.