Skip to content

Request/Proposal: Greatly improve scipy.interpolate.Rbf #9904

@Jwink3101

Description

@Jwink3101

Request (Issues with rbf)

The scipy.interpolate.Rbf has a lot of issues and can stand some real improvement.

First it is really an outlier from the rest of the scattered data interpolation methods for its call signature. It would be much better to take an (N,ndim) array of points and a (N,) array of values like the rest of them.

Second, it is technically missing some major features. The most glaring is the lack of a augmenting polynomial to be solved along side the RBF weights. If this is included, you also introduce the ability to make it a polyharmonic spline (using r**k * (log(r) if np.mod(k,2) else 1) (that's more pseudo-code than real code. In reality, you would use xlogy).

Implementing that isn't too hard though it would require a multi-dimensional Vandermond builder.

Proposal

I have working code based roughly on the existing that adds a lot of this. It allows for arbitrary polynomial degree and also can accept integer basis functions representing the splines. Of course, it also can use the positive definite kernels.

Mine also does some additional things like implement an analytical leave-one-out error estimator and a brute-force optimizer to find the ideal shape parameter. I think those are outside the scope for scipy.

So my proposal is to improve the RBF function. Since the call signature will change (for the better), I think it should have a new name and the old one should be deprecated.

However, I would need some help with working it into SciPy including adding appropriate tests.

Is there interest? Any volunteers?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions