lib.notebook.showTensor
- pyagrum.lib.notebook.showTensor(pot, digits=None, withColors=None, varnames=None)
show a
pyagrum.Tensoras a HTML table. The first dimension is special (horizontal) due to the representation of conditional probability table- Parameters:
pot (
pyagrum.Tensor) – the tensor to showdigits (
int) – number of digits to showwithColors (
bool) – background color for proba cells or notvarnames (
list[str]) – the aliases for variables name in the table
- Return type:
None
Example
import pyagrum as gum
import pyagrum.lib.notebook as gnb
bn = gum.fastBN("A->B->C")
gnb.showTensor(bn.cpt("B"), digits=2)