1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/REC-html40/loose.dtd">
- <html>
- <head>
- <title>Description of lcvplot</title>
- <meta name="keywords" content="lcvplot">
- <meta name="description" content="">
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="generator" content="m2html © 2005 Guillaume Flandin">
- <meta name="robots" content="index, follow">
- <link type="text/css" rel="stylesheet" href="../../../m2html.css">
- <script type="text/javascript">
- if (top.frames.length == 0) { top.location = "../../../index.html"; };
- </script>
- </head>
- <body>
- <a name="_top"></a>
- <!-- ../../menu.html chronux_2_10 --><!-- # locfit --><!-- menu.html m -->
- <h1>lcvplot
- </h1>
- <h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
- <div class="box"><strong></strong></div>
- <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
- <div class="box"><strong>function g=lcvplot(alpha,varargin) </strong></div>
- <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
- <div class="fragment"><pre class="comment">
- Computes and plots the Likelihood Cross-Validation score (LCV)
- for local fits with different smoothing parameters.
- The first argument to lcvplot(), alpha, should be a matrix with one
- or two columns (first column = nearest neighbor component, second
- column = constant component). Each row of this matrix is, in turn,
- passed as the 'alpha' argument to lcv() (and locfit()). The results
- are stored in a matrix, and LCV score ploted against the degrees of
- freedom.</pre></div>
- <!-- crossreference -->
- <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
- This function calls:
- <ul style="list-style-image:url(../../../matlabicon.gif)">
- <li><a href="lcv.html" class="code" title="function g=lcv(varargin)">lcv</a> </li></ul>
- This function is called by:
- <ul style="list-style-image:url(../../../matlabicon.gif)">
- </ul>
- <!-- crossreference -->
- <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../../up.png"></a></h2>
- <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function g=lcvplot(alpha,varargin)</a>
- 0002 <span class="comment">%</span>
- 0003 <span class="comment">% Computes and plots the Likelihood Cross-Validation score (LCV)</span>
- 0004 <span class="comment">% for local fits with different smoothing parameters.</span>
- 0005 <span class="comment">%</span>
- 0006 <span class="comment">% The first argument to lcvplot(), alpha, should be a matrix with one</span>
- 0007 <span class="comment">% or two columns (first column = nearest neighbor component, second</span>
- 0008 <span class="comment">% column = constant component). Each row of this matrix is, in turn,</span>
- 0009 <span class="comment">% passed as the 'alpha' argument to lcv() (and locfit()). The results</span>
- 0010 <span class="comment">% are stored in a matrix, and LCV score ploted against the degrees of</span>
- 0011 <span class="comment">% freedom.</span>
- 0012
- 0013 k = size(alpha,1);
- 0014 z = zeros(k,4);
- 0015
- 0016 <span class="keyword">for</span> i=1:k
- 0017 z(i,:) = <a href="lcv.html" class="code" title="function g=lcv(varargin)">lcv</a>(varargin{:},<span class="string">'alpha'</span>,alpha(i,:));
- 0018 <span class="keyword">end</span>;
- 0019
- 0020 plot(z(:,3),z(:,4));
- 0021 xlabel(<span class="string">'Fitted DF'</span>);
- 0022 ylabel(<span class="string">'LCV'</span>);
- 0023
- 0024 g = [alpha z];
- 0025 <span class="keyword">return</span>;</pre></div>
- <hr><address>Generated on Fri 12-Aug-2011 11:36:15 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> © 2005</address>
- </body>
- </html>
|