Sum-product algorithm toolbox version 1.5.2
One minor change to the previous version (1.5.0) is we make ITSBN+EM a function which can be called by any main code. This makes the code look more concise and systematical.
fn_EM_ITSBN.m
[] = fn_EM_ITSBN(L, connectivity, value, H, N,...
discrete_node_list, continuous_node_list,...
hidden_node_list, observed_node_list,...
tie_level_table, tie_parameter_table)
Input
Here are the necessary input for EM for ITSBN
- L: The number of DISCRETE-node levels of ITSBN, including only the discrete nodes because in ITSBN every discrete node has its own continuous node already, hence need not to count them.
- N: The total number of nodes (both discrete and continuous) in the network
- H: the L x 2 cell array. H{l,1} contains the level number and H{l,2} contains the list of DISCRETE node indices in the level l
- connectivity: The structure of the ITSBN is defined via this (N-1) x 2 matrix. The format of the matrix is discussed in the code documentation of the first version already.
- value: the N x 1 cell array containing the value at each observed node
- discrete_node_list
- continuous_node_list
- hidden_node_list
- observed_node_list
- tie_level_table
- tie_parameter_table
output
The function output a .mat file result_EM_ITSBN.mat which contains the following variables:
- x_best: The best structure of variable nodes x when the EM is finished
- f_best: The best structure of factor nodes f when the EM is finished
- best_ll: the best log-likelihood value through the EM process
- iteration_EM_converge: the total number of iterations before converged
- marg_post_mat_best: the N x 1 cell array storing the best posterior marginal