BayesNetFragment.setProperty

BayesNetFragment.setProperty(name, value)

Create or change the couple (name,value) in the properties.

Properties are a way to keep some information (name,value) together with de model.

Parameters:
  • name (str) – the name of the property

  • value (str) – the value of the property.

Return type:

None

Example

import pyagrum as gum

bn = gum.fastBN("A->B->C<-D;C->E")
fragment = gum.BayesNetFragment(bn)
fragment.installAscendants("C")  # A, B, C, D
fragment.setProperty("author", "me")
fragment.property("author")
# 'me'

Class

BayesNetFragment