Package src :: Package stats306b :: Package lecture4 :: Module fit
[hide private]
[frames] | no frames]

Module fit

source code

Least-squares polynomial fitting

Functions [hide private]
 
pfit(x, y, order=1)
Fit a polynomial to the scatter plot (x,y), returning yhat and fitted polynomial.
source code
 
kfit(x, y, kernel, l=1.0, **kargs)
Use the kernel trick to fit a non-parametric estimator.
source code
 
penfit(x, y, kernel, knots, l=1, **kargs)
Use a kernel and a kernel penalty, but don't use all the x's as knots.
source code
Function Details [hide private]

kfit(x, y, kernel, l=1.0, **kargs)

source code 

Use the kernel trick to fit a non-parametric estimator.

kargs: keyword arguments passed to kernel

penfit(x, y, kernel, knots, l=1, **kargs)

source code 

Use a kernel and a kernel penalty, but don't use all the x's as knots.

When the kernel corresponds to cubic splines, this technique is sometimes called (penalized) regression splines.