LoopyWeightedSampling.isTarget

LoopyWeightedSampling.isTarget(*args)
Parameters:
  • variable (int) – a node Id

  • nodeName (str) – a node name

Returns:

True if variable is a (marginal) target

Return type:

bool

Raises:

Example

import pyagrum as gum

bn = gum.fastBN("A->B<-C")
ie = gum.LoopyWeightedSampling(bn)
ie.isTarget("A")
# True
ie.eraseTarget("A")
ie.isTarget("A")
# False

Class

LoopyWeightedSampling