marginal_nodes.m

来自「Bayes网络工具箱」· M 代码 · 共 22 行

M
22
字号
function marginal = marginal_nodes(engine, nodes, t)% MARGINAL_NODES Compute the marginal on the specified query nodes (hmm)% marginal = marginal_nodes(engine, nodes, t)%% 'nodes' must be a singleton.%% 't' specifies the time slice of the earliest node in 'nodes'.% Example: Consider a DBN with 2 nodes per slice.% Then t=2, nodes=[1 3] refers to node 1 in slice 2 and node 1 in slice 3,% i.e., nodes 3 and 5 in the unrolled network,assert(length(nodes)==1);ss = length(engine.bnet.intra);i = nodes(1);if ~myismember(i, engine.onodes)  marginal = pot_to_marginal(marginalize_pot(engine.gamma_pot{t}, i));else  marginal.T = 1;endmarginal.domain = i + (t-1)*ss;

⌨️ 快捷键说明

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