gcv.m 191 B

12345678910111213
  1. function g=gcv(varargin)
  2. fit = locfit(varargin{:});
  3. rs = rsum(fit);
  4. df0 = rs(1);
  5. df1 = rs(2);
  6. llk = rs(3);
  7. n = size(fit.data.x,1);
  8. gc = -2*n*llk/((n-df0)^2);
  9. g = [llk df0 df1 gc];
  10. return;