Home > subfunctions > ccl_basis_rbf.m

ccl_basis_rbf

PURPOSE ^

BX = ccl_basis_rbf ( X, C, s2 )

SYNOPSIS ^

function BX = ccl_basis_rbf ( X, C, s2 )

DESCRIPTION ^

 BX = ccl_basis_rbf ( X, C, s2 )

 Calculate normalised Gaussian radial basis function of input X

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function BX = ccl_basis_rbf ( X, C, s2 )
0002 % BX = ccl_basis_rbf ( X, C, s2 )
0003 %
0004 % Calculate normalised Gaussian radial basis function of input X
0005 
0006 % Input:
0007 %
0008 %   X                              Input data
0009 %   C                              Centre
0010 %   s2                             Variance
0011 %
0012 % Output:
0013 %
0014 %   BX                             Normalised gaussian radial basis function of X
0015 
0016 
0017 
0018 
0019 % CCL: A MATLAB library for Constraint Consistent Learning
0020 % Copyright (C) 2007  Matthew Howard
0021 % Contact: matthew.j.howard@kcl.ac.uk
0022 %
0023 % This library is free software; you can redistribute it and/or
0024 % modify it under the terms of the GNU Lesser General Public
0025 % License as published by the Free Software Foundation; either
0026 % version 2.1 of the License, or (at your option) any later version.
0027 %
0028 % This library is distributed in the hope that it will be useful,
0029 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0030 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0031 % Lesser General Public License for more details.
0032 %
0033 % You should have received a copy of the GNU Library General Public
0034 % License along with this library; if not, write to the Free
0035 % Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
0036 
0037 D   = ccl_math_distances(C,X) ;                              % distance between C and X
0038 BX  = exp(-0.5/s2*D) ;                              % radial basis function of X
0039 BX  = BX.*repmat(sum(BX).^(-1),size(C,2),1);  % normalise
0040 end

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