BayesNet.ids

BayesNet.ids(names)

List of ids for a list of names of variables in the model

Parameters:
  • lov (list of str) – List of variable names

  • names (tuple[str, ...])

Returns:

The ids for the list of names of the graph variables

Return type:

list of int

Example

import pyagrum as gum

bn = gum.fastBN("A->B->C")
bn.ids(["C", "A"])
# [2, 0]

Class

BayesNet