Tensor.evEq
- static Tensor.evEq(v, val)
This static method generates a Tensor representing an observation where a quasi-continuous variable (a
pyagrum.DiscretizedVariablewith many ticks) takes a specific given value.Notes
see also
BayesNet.evEq()see also
Tensor.evGt(),Tensor.evLt(),Tensor.evIn()
- Parameters:
var (
pyagrum.DiscretizedVariable) – the variable to usevalue (
float)v (
DiscreteVariable)val (
float)
- Returns:
The representation of the evidence as a
Tensor.- Return type:
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