[SciPy-user] local nonparametric regression, gauss process

Stéfan van der Walt stefan@sun.ac...
Tue Feb 24 00:01:23 CST 2009

Hey Josef

2009/2/24  <josef.pktd@gmail.com>:
> Last weekend, I was trying out spatial and sparse. I wrote some
> functions for kernel ridge regression, however I still have
> parameterization problems with the sparse version. But here is the
> dense version, which I tried out with 1000 training points and 2000
> points in total.
> It's not finished but produces some nice graphs to show the local
> regression. If there is interest, I can add this to scipy.

Really nice graphs! This would be very useful for class!

Some trivial comments about spacing in the code:

- Use spaces:

    return ssp.minkowski_distance(x[:,np.newaxis,:],y[np.newaxis,:,:],p)


    return ssp.minkowski_distance(x[:,np.newaxis,:], y[np.newaxis,:,:], p)

According to the Python PEP I think there should be spaces inside the
indexing brackets too, but that doesn't enhance readability much in
this case.

- Keywords do not take spaces

                 scale=0.5, ridgecoeff = 1e-10, **kwds ):

should be

                 scale=0.5, ridgecoeff=1e-10, **kwds):

Thanks again,


More information about the SciPy-user mailing list