Your description suggests that x is 1D. In this case B-Splines are a 
canonical choice, and should "stable". But depending on the quality of your 
data, interpolation may be the wrong approach. If B-splines give you poor 
derivatives (can you quantify that?) then this seems to be indeed the case. 
Is the data noisy? Then you can try techniques like regression, Baysian 
inference, etc, but without knowing your data well, it is hard to say what 
is the right approach. I don't know what the Julia packages are that would 
do this, but you could start looking at MachineLearning.jl or JuliaStats. 
If you just don't have enough data, then I am not too sure there is 
anything that can help, but you could try to increase the degree of the 
B-splines.

Christoph




On Tuesday, 25 August 2015 02:03:15 UTC+1, Spencer Lyon wrote:
>
> Probably the wrong place to post this, but I couldn't find a julia-diff 
> list :)
>
> I'm having stability issues computing the derivative of functions I only 
> know on (non-uniform) grids. For example, I have a grid of x (I can't 
> choose this) and the associated values of y = f(x). I've tried a few 
> different things:
>
> - using different kinds of finite difference schemes
> - Fitting the data with many types of approximating functions 
> (interpolating cubic B-splines, chebyshev polynomials, smoothing cubic 
> splines, shape preserving quadratic hermite polynomial splines, ect.)
>
> For one of the functions I have this (x, y) data for, I also happen to 
> have data on the first derivative of y. All the methods I've tried do 
> terribly at approximating this derivative. I'm looking for a more reliable 
> alternative, even if it is expensive to compute. 
>
> Do any of the differentiation experts here have any suggestions or good 
> references I can look to for how I might achieve better stability in this 
> situation? I'm happy to code up a new algorithm we haven't implemented yet 
> if someone knows about one.
>
> Thanks!
>
> On Thursday, June 26, 2014 at 12:26:52 AM UTC-4, Miles Lubin wrote:
>>
>> This is still a work in progress, but ahead of JuliaCon I'd like to 
>> announce JuliaDiff, a github organization and website (
>> http://www.juliadiff.org/) for packages related to computing 
>> derivatives. This includes packages based on automatic differentiation. If 
>> you've never heard of AD, check out the intro paragraph on the website. 
>> This is a field where I believe the technical features of Julia really make 
>> it easier than ever before to implement advanced techniques efficiently and 
>> (mostly) transparently to the user, see, for example, the autodiff keyword 
>> in Optim which enables computation of exact gradients of user-provided 
>> "black box" functions. I'm looking forward to continued development, 
>> collaboration, and contributions to JuliaDiff. Thanks to Theodore 
>> Papamarkou for the impetus in creating this organization.
>>
>> Miles
>>
>> P.S. We're accepting logo submissions.
>>
>

Reply via email to