Tensor.evEq

static Tensor.evEq(v, val)

This static method generates a Tensor representing an observation where a quasi-continuous variable (a pyagrum.DiscretizedVariable with many ticks) takes a specific given value.

Notes

Parameters:
Returns:

The representation of the evidence as a Tensor.

Return type:

pyagrum.Tensor

Example

import pyagrum as gum

x = gum.fastVariable("x[0:10:5]")
gum.Tensor.evEq(x, 5).tolist()
# [0.0, 0.0, 1.0, 0.0, 0.0]

Class

Tensor