B-splines are mathematical curves with convenient properties. The B in B-spline means basis. A curve y(t) is defined in terms of weights w and knots k, such that . Each basis function is a piecewise polynomial with compact support determined by the position of the knots. The order of the polynomial is determined by the difference between the number of knots and weights. If the number of knots is 2 more than the number of weights, you get a piecewise linear basis function which looks like a little tent. For 4 extra knots, you get a “hump” defined by a cubic, which looks like a Gaussian but has compact support (it is exactly zero outside its interval). Chapter 5 of The Elements of Statistical Learning offers an excellent introduction to splines.
One example use of B-splines I discussed recently is BARS, or Bayesian adaptive regression splines. Here a PSTH is approximated with a smooth curve, and the knots are positioned adaptively. Generalized additive models also frequently use B-splines as smoothers. In general, B-splines (especially the cubic variety) excel as non-parametric smoothers. Linear splines have been used to infer input nonlinearities in reverse correlation-type experiments.
Here is a lightweight Matlab class that implements B-Splines. It allows one to fit, evaluate and differentiate B-Splines, and is well documented.
Update (08 Sep. 2011): I’ve now included C code in the Matlab package to evaluate B-splines much more rapidly (by a factor ranging from 5x to 50x). This now makes the code appropriate for implementing large-scale GAMs.