KTBNInference.eraseTarget
- KTBNInference.eraseTarget(base)
Remove a target; when the last one is removed, default-all-targets mode is restored.
- Parameters:
base (
str) – the base variable to un-target- Return type:
None
Example
import pyagrum as gum
import pyagrum.ktbn as ktbn
model = ktbn.KTBN.fromBN(gum.fastBN("X0->X1"))
model.cpt("X", 0).fillWith([0.5, 0.5])
model.cpt("X", 1).fillWith([0.9, 0.1, 0.2, 0.8]) # P(X[t] | X[t-1])
ie = ktbn.KTBNInference(model)
ie.addTarget("X")
ie.eraseTarget("X")
ie.isInTargetMode() # back to all targets
# False
Class