image thumbnail

Hierarchical Kalman Filter for clinical time series prediction

by

 

It is an implementation of hierarchical (a.k.a. multi-scale) Kalman filter using belief propagation.

updateMSGInLevel2(msg, varNode, factorNode, i, Lv1, Lv2, ts_data)
function msg = updateMSGInLevel2(msg, varNode, factorNode, i, Lv1, Lv2, ts_data)
        % update factor node in level 2
        for j = varNode.x{Lv1}{i}.lowerNeighborFactorNodeIDs
            msg{factorNode.x{Lv2}{j}.lowerNeighborMsgID}.toVarNode.mu...
                = ts_data.A{Lv2} * msg{factorNode.x{Lv2}{j}.upperNeighborMsgID}.toFactorNode.mu;
            msg{factorNode.x{Lv2}{j}.lowerNeighborMsgID}.toVarNode.V...
                = ts_data.V_Q{Lv2} + ts_data.A{Lv2} * msg{factorNode.x{Lv2}{j}.upperNeighborMsgID}.toFactorNode.V * (ts_data.A{Lv2}');
        end
end

Contact us