From 8e403dd677bcc662f200d3ca673522d57811571c Mon Sep 17 00:00:00 2001 From: Nicholas Parente Date: Tue, 28 Jan 2025 21:33:14 -0500 Subject: [PATCH] fix bug Signed-off-by: Nicholas Parente --- dowhy/datasets.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dowhy/datasets.py b/dowhy/datasets.py index c68558312..0e1d54c75 100755 --- a/dowhy/datasets.py +++ b/dowhy/datasets.py @@ -840,11 +840,11 @@ def dataset_from_random_graph( variable_type_dict = {} for idx, node in enumerate(all_nodes): if random_numbers_array[idx] <= prob_type_of_data[0]: - variable_type_dict[idx] = DISCRETE + variable_type_dict[node] = DISCRETE elif random_numbers_array[idx] <= prob_type_of_data[0] + prob_type_of_data[1]: - variable_type_dict[idx] = CONTINUOUS + variable_type_dict[node] = CONTINUOUS else: - variable_type_dict[idx] = BINARY + variable_type_dict[node] = BINARY return linear_dataset_from_graph( DAG, treatments, outcome, variable_type_dict=variable_type_dict, num_samples=num_samples