📄 kernel_divide.m
字号:
function gr = kernel_divide(g1,g2)
%
% gr = g1/g2
%
if length(g2.w) == 1
gr = kernel_divide_gauss_denominator(g1, g2);
else
gr = kernel_divide_kernel_denominator(g1, g2);
end
%
%
function gr = kernel_divide_gauss_denominator(g1, g2)
D = size(g1.x, 1);
M = size(g1.x, 2);
gr.w = zeros(1,M);
gr.x = zeros(D,M);
for i=1:M
[gr.x(:,i), gr.P, w] = gauss_divide(g1.x(:,i), g1.P(:,:,i), g2.x, g2.P);
gr.w(i) = g1.w * w;
end
%
%
function gr = kernel_divide_kernel_denominator(g1, g2)
warning('Approximate solution');
% Matt Ridley's division approximation for kernels.
% See Section 7.5 of his thesis.
%
% TODO, look at:
% - (approximately) factoring gaussian mixtures
% - the Fast Gauss Transform, does it offer insights?
% - automatic factoring of polynomials, is this a similar problem?
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -