📄 gmm_counting_algorithm.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -