gaussiankernel.m

来自「这个是支持向量聚类机用matlab编译的主程序和部分子程序」· M 代码 · 共 24 行

M
24
字号
%=====================================================================
%
%	GaussianKernel %  --------------%%	Parameters:   %		x,y     - 2 data points. %		q		- The width of the gaussian kernel.%                   %	Return Value:%		k	    - The inner product of the pair of data points images.
%%		Computes the Gaussian Kernel:
%		The inner product of the images of a given data points' pair.
%   %   	k = K(x,y) = exp( -q * ||x - y||^2 ) %%=====================================================================
function k = GaussianKernel(x,y,q)k = exp(-q * (x-y)' * (x-y));

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?