phi = ccl_basis_linear ( x ) Construct linear basis function. phi(x) = [ x; 1 ] Input: x Input Output: phi basis function prediction
0001 function phi = ccl_basis_linear ( x ) 0002 % phi = ccl_basis_linear ( x ) 0003 % 0004 % Construct linear basis function. phi(x) = [ x; 1 ] 0005 % 0006 % Input: 0007 % 0008 % x Input 0009 % 0010 % Output: 0011 % 0012 % phi basis function prediction 0013 0014 0015 0016 0017 % CCL: A MATLAB library for Constraint Consistent Learning 0018 % Copyright (C) 2007 Matthew Howard 0019 % Contact: matthew.j.howard@kcl.ac.uk 0020 % 0021 % This library is free software; you can redistribute it and/or 0022 % modify it under the terms of the GNU Lesser General Public 0023 % License as published by the Free Software Foundation; either 0024 % version 2.1 of the License, or (at your option) any later version. 0025 % 0026 % This library is distributed in the hope that it will be useful, 0027 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0028 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0029 % Lesser General Public License for more details. 0030 % 0031 % You should have received a copy of the GNU Library General Public 0032 % License along with this library; if not, write to the Free 0033 % Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 0034 0035 phi = [x; ones(1,size(x,2))]; 0036