您好,欢迎光临本网站![请登录][注册会员]  
文件名称: 基于核函数的特征提取
  所属分类: 其它
  开发工具:
  文件大小: 2kb
  下载次数: 0
  上传时间: 2015-04-16
  提 供 者: a75***
 详细说明: function data_out = kernelpca_tutorial(data_in,num_dim) % % This function does principal component analysis (non-linear) on the given % data set using the Kernel trick % % Data_Out = kernelpca_tutorial(Data_in,Num_Dim) % % Data_in - Input data (d (dimensions) X N (# of points) % Num_Dim - Dimensions of output data. (Num_Dim <= d) % Data_Out - Output data. (Num_Dim (dimensions) X N (# of points)) % % Ambarish Jash % ambarish.jash@colorado.edu % %% Checking to ensure output dimensions are lesser than input dimension. if num_di m > size(data_in,1) fprintf('\nDimensions of output data has to be lesser than the dimensions of input data\n'); fprintf('Closing program\n'); return end %% Using the Gaussian Kernel to construct the Kernel K % K(x,y) = -exp((x-y)^2/(sigma)^2) % K is a symmetric Kernel K = zeros(size(data_in,2),size(data_in,2)); for row = 1:size(data_in,2) for col = 1:row temp = sum(((data_in(:,row) - data_in(:,col)).^2)); K(row,col) = exp(-temp); % sigma = 1 end end K = K + K'; % Dividing the diagonal element by 2 since it has been added to itself for row = 1:size(data_in,2) K(row,row) = K(row,row)/2; end % We know that for PCA the data has to be centered. Even if the input data % set 'X' lets say in centered, there is no gurantee the data when mapped % in the feature space [phi(x)] is also centered. Since we actually never % work in the feature space we cannot center the data. To include this % correction a pseudo centering is done using the Kernel. one_mat = ones(size(K)); K_center = K - one_mat*K - K*one_mat + one_mat*K*one_mat; clear K ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: KPCA
 输入关键字,在本站1000多万海量源码库中尽情搜索: