1

When generalizing from linear to cubic splines, in 3 regions with two knots, I have imagined a continuous basis such as:

$$h_1(X) =1, \quad h_2(X) =X,\quad h_3(X) =X^2,\quad h_4(X) = X^3,\\ h_5(X) = (X-\xi_0)_+,\quad h_6(X) = (X-\xi_0)^2_+,\quad h_7(X) = (X-\xi_0)_+^3\\ h_8(X) = (X-\xi_1)_+,\quad h_9(X) = (X-\xi_1)_+^2,\quad h_{10}(X) = (X-\xi_1)_+^3 $$

However, books such Elements of statistical learning reduce the basis to: $$h_1(X) =1, \quad h_2(X) =X,\quad h_3(X) =X^2,\quad h_4(X) = X^3,\\ h_7(X) = (X-\xi_0)^3_+\\ h_{10}(X) = (X-\xi_1)^3_+ $$

Is this obtained from enforcing continuity to the first and second derivatives?

EDIT

@whuber suggests in the comment such a simplification does not come from enforcing continuity of derivatives but by the fact that the terms $(X-\xi_j)^2$ and $(X-\xi_j)$ are redundant because included in $(X-\xi_0)^3$. Then I am expecting the constraint on continuity of the derivatives should simplify even more the basis, by reducing the degrees of freedom.

If for example we force continuity for the first and second derivatives at the 2 knots, we remove 4 degrees of freedom, ending up with 2 basis functions for three regions that, for me, does not make a lot of sense.

Francesco Boi
  • 541
  • 2
  • 13
  • Quadratic terms *are* present in this basis: they appear explicitly in $h_3$ and implicitly when you expand $h_7$ and $h_{10}.$ Your imagined basis therefore is redundant, as you can check by expanding out its terms, too. – whuber Oct 30 '19 at 14:17
  • That was exactly my doubt. I'll edit my question to clarify it – Francesco Boi Oct 30 '19 at 14:36
  • Could you explain what this "linearity of derivatives" constraint is? After all, the (first) derivatives of these basis functions are definitely not linear! – whuber Oct 30 '19 at 14:46
  • Sorry, I meant continuity – Francesco Boi Oct 30 '19 at 14:48
  • I suspect you haven't correctly transcribed the second basis: usually, $h_7$ and $h_{10}$ are the *positive parts* of those cubics, rather than the cubics themselves. – whuber Oct 30 '19 at 14:54

0 Answers0