BNLearner.EMMaxTime
- BNLearner.EMMaxTime()
Returns a float indicating EM’s time limit when the max time stopping criterion is used by the EM parameter learning algorithm.
- Returns:
the max time EM is allowed to execute its expectation/maximization iterations
- Return type:
float
Example
import pyagrum as gum
with open("data.csv", "w") as f: # "?" is a missing value
f.write("A,B\n" + "0,0\n0,1\n1,1\n1,1\n?,0\n1,?\n" * 20)
learner = gum.BNLearner("data.csv")
learner.useEM(1e-4).EMsetMaxTime(500.0)
learner.EMMaxTime()
# 500.0
Class