BNLearner.hasMissingValues

BNLearner.hasMissingValues()

Indicates whether there are missing values in the database.

Returns:

True if there are some missing values in the database.

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.hasMissingValues()
# True

Class

BNLearner