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.
calcTrAFast(X, w, lambda=0)
Design matrix of the covariates.
Diagonal weight matrix of the pseudo iterated least squares algorithm. See function calcWdiag
.
Regularization parameter of kernel ridge regression. Default is 0 (numeric scalar).
Effective degrees of freedom of a generalized additive model with regularization (numeric scalar).
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.
Simon N. Wood, (2006), Generalized Additive Models: An Introduction with R, Taylor \& Francis Group LLC