Sum-product algorithm toolbox version 1.5.0

In this version of the toolbox, there are some changes worth mentioned:

  1. 'posterior' has been added in the struct field of variable node to facilitate EM algorithm. The changes are reflected in the table in the next section.
  2. The function fn_cal_marg(f,x,i) is added in order to calculate the posterior marginal of a single node x(i)
  3. The function [x, marg_posterior, ll_max] = fn_cal_marg_whole(f,x) is added to calculate the posterior marginal of every hidden node x(i) in the entire network, and return the struct x with 'posterior'-field filled up with the marginal. Also the function provides the 'representative' log-likelihood value of the network.
  4. Some examples of using EM-algorithm with the toolbox are added. This will be discussed in more detail subsequently.

Some examples in this version

The structure of variable nodes and factor nodes

Variable nodes and factor nodes are implemented using struct as x and f respectively. The fields of each type are described in detail below:

field of variable node x

field of variable node f