On the other hand, this is the message I get with pysmile:Can't start learning due to problems with data.
## Selected algorithm supports continuous or discrete columns, but they can't be used together.
CONTINUOUS:
<column_names>
DISCRETE:
<other_column_names>
According to the SMILE docs, -1 is just a "general error".PC failed: SMILE Error -1 in function PC.Learn
Is there a way to get more info about the error from pysmile?
Or is there a pre-existing function to check a dataset and its compatibility with any of the learning algorithms?
For reference, this is how I'm currently handling errors:
Code: Select all
def learn_with_pc(dataset: pysmile.learning.DataSet) -> BayesianNetwork:
pc = pysmile.learning.PC()
try:
pattern = pc.learn(dataset)
except pysmile.SMILEException as e:
logger.error(f"PC failed: {e}")
return
<...>