# Effective degrees of freedom

Can we use the trace of the hat matrix in case of kernel regression for the effective degrees of freedom? Where we obtain the hat matrix, H as:

$H = \hat{y} * y^+$ where $\hat{y}$ is the predicted response values, $y^+$ is the pseudo inverse of $y$.

If $H$ is such that $\hat y = H y$, then it would be quite standard to obtain the effective degrees of freedom from $\text{tr}(H)$.
Considerably more broadly, look at Ye (1998) "On Measuring and Correcting the Effects of Data Mining and Model Selection", JASA 93(441):120-131 where he proposes using $\sum_i \frac{\partial \hat{y}_i}{\partial y_i}$ as the degrees of freedom for a huge variety of models for which you can take a set of data $y$ and compute a $\hat{y}$. For a model which can be written in hat-matrix form $\hat y = H y$, that's the trace of $H$.