BNLearner.EMVerbosity
- BNLearner.EMVerbosity()
Returns a Boolean indicating whether the EM parameter learning algorithm is in a verbose mode.
Note that EM verbosity is necessary for recording the history of the log-likelihoods computed at each expectation/maximization step.
- Returns:
indicates whether EM’s verbose mode is active or not
- Return type:
bool
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.EMVerbosity()
# False
learner.EMsetVerbosity(True)
learner.EMVerbosity()
# True
Class