diff --git a/pygem/rbf_factory.py b/pygem/rbf_factory.py index cb08590..fe058e3 100644 --- a/pygem/rbf_factory.py +++ b/pygem/rbf_factory.py @@ -77,7 +77,7 @@ def inv_multi_quadratic_biharmonic_spline(X, r=1): return result @staticmethod - def thin_plate_spline(X, r=1): + def thin_plate_spline(X, r=1, k=2): """ It implements the following formula: @@ -93,7 +93,7 @@ def thin_plate_spline(X, r=1): :rtype: float """ arg = X / r - result = arg * arg + result = np.power(arg,k) result = np.where(arg > 0, result * np.log(arg), result) return result