WeightedSampling.setMaxTime

WeightedSampling.setMaxTime(timeout)
Parameters:

timeout (float) – stopping criterion on timeout (in seconds)

Raises:

pyagrum.OutOfBounds – If timeout<=0.0

Return type:

None

Example

import pyagrum as gum

bn = gum.fastBN("A->B<-C")
ie = gum.WeightedSampling(bn)
ie.setMaxTime(0.5)  # in seconds
ie.maxTime()
# 0.5

Class

WeightedSampling

Overridden in

LoopyWeightedSampling.setMaxTime