21.04.2014 Views

1h6QSyH

1h6QSyH

1h6QSyH

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

280 7. Moving Beyond Linearity<br />

Smoothing Spline<br />

Wage<br />

0 50 100 200 300<br />

16 Degrees of Freedom<br />

6.8 Degrees of Freedom (LOOCV)<br />

20 30 40 50 60 70 80<br />

Age<br />

FIGURE 7.8. Smoothing spline fits to the Wage data. The red curve results<br />

from specifying 16 effective degrees of freedom. For the blue curve, λ was found<br />

automatically by leave-one-out cross-validation, which resulted in 6.8 effective<br />

degrees of freedom.<br />

Figure 7.8 shows the results from fitting a smoothing spline to the Wage<br />

data. The red curve indicates the fit obtained from pre-specifying that we<br />

would like a smoothing spline with 16 effective degrees of freedom. The blue<br />

curve is the smoothing spline obtained when λ is chosen using LOOCV; in<br />

this case, the value of λ chosen results in 6.8 effective degrees of freedom<br />

(computed using (7.13)). For this data, there is little discernible difference<br />

between the two smoothing splines, beyond the fact that the one with 16<br />

degrees of freedom seems slightly wigglier. Since there is little difference<br />

between the two fits, the smoothing spline fit with 6.8 degrees of freedom<br />

is preferable, since in general simpler models are better unless the data<br />

provides evidence in support of a more complex model.<br />

7.6 Local Regression<br />

Local regression is a different approach for fitting flexible non-linear func- local<br />

regression<br />

tions, which involves computing the fit at a target point x 0 using only the<br />

nearby training observations. Figure 7.9 illustrates the idea on some simulated<br />

data, with one target point near 0.4, and another near the boundary<br />

at 0.05. In this figure the blue line represents the function f(x) fromwhich<br />

the data were generated, and the light orange line corresponds to the local<br />

regression estimate ˆf(x). Local regression is described in Algorithm 7.1.<br />

Note that in Step 3 of Algorithm 7.1, the weights K i0 will differ for each<br />

value of x 0 . In other words, in order to obtain the local regression fit at a<br />

new point, we need to fit a new weighted least squares regression model by

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!