📄 kernelmatrix.m
字号:
%=====================================================================
%
% KernelMatrix % ------------
%% Parameters: % Samples - Matrix, holds the data points.
% q - The width of the Gaussian kernel.
% % Return Value:
% K - The inner product of all samples' images pairs.
%
% The inner products of the points images
% represented by an appropriate Mercer Kernel:
% we use the Gaussian Kernel.
%%=====================================================================
function [K] = KernelMatrix(Samples,q)[attr,N] = size(Samples);% initialization - N*N matrixK = zeros(N);for i = 1:N for j = 1:N % Calculate the Gaussian Kernel for each data points' pair. K(i,j) = GaussianKernel(Samples(:,i),Samples(:,j),q); endend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -