function [K] = TrainKernelMatrix(KernelName,para,X)
%   generate a training kernel matrix K: K(i,j) = kernel(X(i,:),X(j,:))
%   kernelName: kernel name, such as 'lin','poly','gaussian',and 'laplacian'.
%   para: kernel argument

switch lower(KernelName)
    case 'poly'
     
        K = PolyKernel(X,X,para);
           
	 case 'lin'
       
        K = LinKernel(X);
        
    case 'gaussian'
            
        K = GaussianKernel(para,X);
           
	case 'laplacian'
    
        K = LaplacianKernel(para,X);
end
           

    
 
