I have multiple sets of data to which I am fitting a Univariate Spline in Scipy:
spl = UnivariateSpline(x, y)
domain = np.linspace(min(x), max(x)), 10000)
plt.scatter(x, y, c='r', marker='x')
plt.plot(domain, spl(domain), 'b-')
This is a "noisy" example set for which the trend in y MUST increase with x, but is not what the spline is returning (see below).
Is there a way to evaluate this spline in such a way that its gradient is ALWAYS POSITIVE? This would be very helpful.
UnivariateSpline
? Looks more like a logarithmic to me. – DrBwts