marginalize_augmented_model

marginalize_augmented_model(augmented: NxMixedGraph, augmentation_variable: str | QVariable, marginal_parents: Collection[str | QVariable]) NxMixedGraph[source]

Marginalize out a given collection of variables from an augmented model.

Parameters:
  • augmented – NxMixedGraph of the input augmented model

  • augmentation_variable – the variable that was previously augmented into the model

  • marginal_parents – collection of parents of the augmentation variable to be marginalized out.

Returns:

NxMixedGraph of the marginalized model

Raises:
  • ValueError – augmentation_variable must be in the augmented model

  • ValueError – marginal_parents cannot be all the parents of augmentation_variable

  • ValueError – augmentation_variable must be the only child of the each marginal parent