Learn R Programming

kernDeepStackNet (version 2.0.2)

calcTrAFast: Calculates the trace of the hat matrix as C version

Description

The trace of the hat matrix corresponds to the effective degrees of freedom (edf) of a generalized additive model. The edf is an internal measure of model complexity.

Usage

calcTrAFast(X, w, lambda=0)

Arguments

X

Design matrix of the covariates.

w

Diagonal weight matrix of the pseudo iterated least squares algorithm. See function calcWdiag.

lambda

Regularization parameter of kernel ridge regression. Default is 0 (numeric scalar).

Value

Effective degrees of freedom of a generalized additive model with regularization (numeric scalar).

Details

This function is a more computational efficient version of calcTrA. The general algorithm is simplified, requires less memory and is faster. Therefore it is better suited for data sets above 1000 observations.

References

Simon N. Wood, (2006), Generalized Additive Models: An Introduction with R, Taylor \& Francis Group LLC

See Also

varMu, gDerivMu