view rDiff/src/locfit/m/lcv.m @ 2:233c30f91d66

updated python based GFF parsing module which will handle GTF/GFF/GFF3 file types
author vipints <vipin@cbio.mskcc.org>
date Tue, 08 Oct 2013 07:15:44 -0400
parents 0f80a5141704
children
line wrap: on
line source

function g=lcv(varargin)
%
% likelihood cross-validation.
%
% returned vector consists of log-likelihood, trace(H), trace(H'H)
% and cross-validated deviance (-2 * cross-validated log-likelihood).
%
% Author: Catherine Loader.

fit = locfit(varargin{:},'ev','cros');
rs = rsum(fit);

df0 = rs(1);
df1 = rs(2);
llk = rs(3);

g = [llk df0 df1 -2*llk];

return;