Home > evaluation > ccl_error_ppe_alpha.m

ccl_error_ppe_alpha

PURPOSE ^

[nPPE, vPPE, uPPE] = ccl_error_ppe_alpha (N_p, X_t, Pi, NS_t)

SYNOPSIS ^

function [nPPE, vPPE, uPPE] = ccl_error_ppe_alpha (f_proj, X_t, Pi, NS_t)

DESCRIPTION ^

 [nPPE, vPPE, uPPE] = ccl_error_ppe_alpha (N_p, X_t, Pi, NS_t)

 Compute the normalised projected policy error (nPPE) with state dependant projection.
 This error measures the difference between the policy subject to the true constraints,
 and that of the policy subject to the estimated constraints.

 Input:

   f_proj                                   State dependent prediction of the projection matrix
   X_t                                      True state
   NS_t                                     True null space component
   Pi                                       True null space policy

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [nPPE, vPPE, uPPE] = ccl_error_ppe_alpha (f_proj, X_t, Pi, NS_t)
0002 % [nPPE, vPPE, uPPE] = ccl_error_ppe_alpha (N_p, X_t, Pi, NS_t)
0003 %
0004 % Compute the normalised projected policy error (nPPE) with state dependant projection.
0005 % This error measures the difference between the policy subject to the true constraints,
0006 % and that of the policy subject to the estimated constraints.
0007 %
0008 % Input:
0009 %
0010 %   f_proj                                   State dependent prediction of the projection matrix
0011 %   X_t                                      True state
0012 %   NS_t                                     True null space component
0013 %   Pi                                       True null space policy
0014 
0015 
0016 
0017 
0018 % CCL: A MATLAB library for Constraint Consistent Learning
0019 % Copyright (C) 2007  Matthew Howard
0020 % Contact: matthew.j.howard@kcl.ac.uk
0021 %
0022 % This library is free software; you can redistribute it and/or
0023 % modify it under the terms of the GNU Lesser General Public
0024 % License as published by the Free Software Foundation; either
0025 % version 2.1 of the License, or (at your option) any later version.
0026 %
0027 % This library is distributed in the hope that it will be useful,
0028 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0029 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0030 % Lesser General Public License for more details.
0031 %
0032 % You should have received a copy of the GNU Library General Public
0033 % License along with this library; if not, write to the Free
0034 % Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
0035 
0036 dim_n = size(NS_t,2) ;
0037 NS_p  = zeros(size(NS_t)) ;
0038 for n = 1:dim_n
0039     NS_p(:,n) = f_proj(X_t(:,n)) * Pi(:,n) ;
0040 end
0041 uPPE = mean( sum( (NS_t-NS_p).^2, 1) );
0042 vPPE = var(NS_t,0,2);
0043 nPPE = uPPE / sum(vPPE);
0044 end

Generated on Mon 01-Jan-2018 15:49:39 by m2html © 2005