Connecting splines, trees, and linear regression