Open artemgur opened 1 year ago
Hi @artemgur, I cannot replicate this error. In your error message, line 145 only raises errors when dataset.columns
is empty, i.e., there are no categorical or numerical columns in the input dataset.
--> 145 root_attribute = random.choice(dataset.columns)
Please double-check if this is the case.
DataSynthesizer is just updated to 0.1.12. Please feel free to test it out.
Description
In Python 3.11, describe_dataset_in_correlated_attribute_mode raises ValueError. And in Python 3.10, the same code with the same versions of dependencies works correctly.
At the same time, describe_dataset_in_independent_attribute_mode and describe_dataset_in_random_mode work correctly in Python 3.11.
Pandas version is 1.5.3, and not the latest 2.0.3, as describe_dataset_in_correlated_attribute_mode additionally doesn't work with Pandas 2.0.3 (I will write a separate issue on that later).
What I Did
When the code is ran, following happens: 1) "================ Constructing Bayesian Network (BN) ================" is printed (at least in Jupyter Notebook) 2) Following exception is raised: "ValueError: The truth value of a Index is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()."
Traceback: