BayesNetFragment.spaceCplxToString

static BayesNetFragment.spaceCplxToString(dSize, dim, usedMem)

Return a human-readable string summarising the space complexity of a graphical model.

Parameters:
  • dSize (float) – log10 of the joint domain size

  • dim (int) – number of independent parameters

  • usedMem (int) – memory footprint in bytes

Returns:

a string of the form 'domainSize: X, dim: Y, mem: Z'

Return type:

str

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
s = fragment.spaceCplxToString(fragment.log10DomainSize(), fragment.dim(), fragment.memoryFootprint())
s.startswith("domainSize: 16, dim: 8")
# True

Class

BayesNetFragment