Mercurial > repos > vipints > rdiff
annotate rDiff/src/locfit/m/lcv.m @ 0:0f80a5141704
version 0.3 uploaded
author | vipints |
---|---|
date | Thu, 14 Feb 2013 23:38:36 -0500 |
parents | |
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; |