Skip to contents

Friedman-Tukey projection pursuit regression as in ESL Sec 11.2 (eqs 11.1-11.4): terms are added forward stage-wise; each alternates a cubic smoothing spline of the residual on the projection with the Gauss-Newton direction update (weighted least squares with weights g'^2, solved as the equivalent regression of g' v + r - g on g' x), halving the step if the residual sum of squares rises. The ridge functions are readjusted by backfitting after each new term; the directions are not.

Usage

morie_esl_projection_pursuit(
  X,
  y,
  M = 2,
  penalty = 1,
  max_iter = 50,
  tol = 1e-08,
  backfit = 10,
  newdata = NULL
)

Arguments

X

Numeric matrix, N by p.

y

Response vector.

M

Number of ridge terms.

penalty

Smoothing-spline penalty (> 0) on the projection scale.

max_iter, tol

Gauss-Newton controls per term.

backfit

Maximum backfitting passes after each term.

newdata

Optional matrix of points to predict.

Value

Named list: omega, fitted, residuals, rss, rss_path, intercept, terms, predicted.

References

Friedman, J. H. & Tukey, J. W. (1974). IEEE Trans. Computers C-23, 881-890.

Examples

X <- cbind((0:20) / 5 - 2, ((7 * (0:20)) %% 11) / 5 - 1)
morie_esl_projection_pursuit(X, rowSums(X)^2, M = 1, penalty = 0.01)$omega
#> [[1]]
#> [1] -0.7076162 -0.7065970
#>