Mercurial > repos > vipints > rdiff
annotate 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 |
rev | line source |
---|---|
0 | 1 function g=lcv(varargin) |
2 % | |
3 % likelihood cross-validation. | |
4 % | |
5 % returned vector consists of log-likelihood, trace(H), trace(H'H) | |
6 % and cross-validated deviance (-2 * cross-validated log-likelihood). | |
7 % | |
8 % Author: Catherine Loader. | |
9 | |
10 fit = locfit(varargin{:},'ev','cros'); | |
11 rs = rsum(fit); | |
12 | |
13 df0 = rs(1); | |
14 df1 = rs(2); | |
15 llk = rs(3); | |
16 | |
17 g = [llk df0 df1 -2*llk]; | |
18 | |
19 return; |