f0uriest / interpax

Interpolation and function approximation with JAX
MIT License
137 stars 11 forks source link

Add RBF interpolation for unstructured data #4

Open f0uriest opened 1 year ago

leonard-gleyzer commented 3 months ago

Hello! Fantastic library. Are there any updates on this? Would be incredibly useful for me to be able to interpolate unstructured/point cloud data.

f0uriest commented 3 months ago

I've been looking through the scipy version and I think it wouldn't be too difficult to port to JAX. The main thing is the neighbors argument might cause trouble since JAX doesn't have any sort of efficient KD-Tree. The simplest option would be to just always use the full dataset which is ok for small number of points. Otherwise I think the best we could do is a brute force nearest neighbor search (which if you break up the query points into small batches might not be too bad).

If someone wants to take a stab at porting scipy.interpolate.RBFInterpolator I'd welcome the PR, otherwise I can probably get around to it in a few weeks.