rbf.m.svn-base
来自「a function inside machine learning」· SVN-BASE 代码 · 共 27 行
SVN-BASE
27 行
function K = rbf(coord,sig)%function K = rbf(coord,sig)%% Computes an rbf kernel matrix from the input coordinates%%INPUTS% coord = a matrix containing all samples as rows% sig = sigma, the kernel width; squared distances are divided by% squared sig in the exponent%%OUTPUTS% K = the rbf kernel matrix ( = exp(-1/(2*sigma^2)*(coord*coord')^2) )%%% For more info, see www.kernel-methods.net%%Author: Tijl De Bie, february 2003. Adapted: october 2004 (for speedup).n=size(coord,1);K=coord*coord'/sig^2;d=diag(K);K=K-ones(n,1)*d'/2;K=K-d*ones(1,n)/2;K=exp(K);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?