gmm_counting_algorithm.m
来自「高斯滤波器 matlab toolbox For GMMs and Gauss」· M 代码 · 共 26 行
M
26 行
function w = gmm_counting_algorithm(g, prob, N)
%function w = gmm_counting_algorithm(g, prob, N)
%
% INPUTS:
% g - Gaussian mixture
% prob - probability mass to enclose [0, 1]
% N - number of samples to count
%
% OUTPUT:
% w - the (approximate) weight of g that marks the level-set enclosing
% mass, prob.
%
% Tim Bailey 2006.
if prob<=0 | prob>=1
error('Probability must be in range (0,1)')
end
s = gmm_samples(g, N);
w = gmm_evaluate(g, s);
[ws, i] = sort(w);
M = N - ceil(prob*N);
M(M==0) = 1;
w = ws(M);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?