view rDiff/src/locfit/m/gcv.m @ 0:0f80a5141704

version 0.3 uploaded
author vipints
date Thu, 14 Feb 2013 23:38:36 -0500
parents
children
line wrap: on
line source

function g=gcv(varargin)

fit = locfit(varargin{:});
rs = rsum(fit);

df0 = rs(1);
df1 = rs(2);
llk = rs(3);
n = size(fit.data.x,1);
gc = -2*n*llk/((n-df0)^2);
g = [llk df0 df1 gc];

return;