about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/BNT/inference/dynamic/@ff_inf_engine/enter_soft_evidence.m
blob: db16f39b602fea105627ce1ba25f6843908d7e89 (plain)
1
2
3
4
5
6
7
8
9
10
11
function [marginals, fwd, back, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type, filter)
% ENTER_SOFT_EVIDENCE Add the specified soft evidence to the network (ff)
% [marginals, loglik] = enter_soft_evidence(engine, CPDpot, observed, pot_type, filter)

if filter
  [fwd, loglik] = filter_evidence(engine, CPDpot, observed, pot_type);
  marginals = fwd;
  back = [];
else
  [marginals, fwd, back, loglik] = smooth_evidence(engine, CPDpot, observed, pot_type);
end