⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linearkernel.m.svn-base

📁 a function inside machine learning
💻 SVN-BASE
字号:
function kernelMatrix = linearKernel(X1, X2, kernelParams)
%A function to compute the linear kernel matrix entries between X1 and X2.
%These matrices must have the same number of colums 

useSparse = issparse(X1); 
numX1Examples = size(X1, 1); 
numX2Examples = size(X2, 1); 

if useSparse 
    kernelMatrix = sparse(numX1Examples, numX2Examples); 
else 
    kernelMatrix = zeros(numX1Examples, numX2Examples); 
end
    
kernelMatrix = X1*X2'; 

⌨️ 快捷键说明

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