From a8c0ffa87d184a066a63e4fdcc3b7c0daa0c1925 Mon Sep 17 00:00:00 2001 From: Yangliu-SY <144334404+Yangliu-SY@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:46:12 +0200 Subject: [PATCH] Fix issue #1254: pass the variable 'categorical' instead of the method 'is_categorical' Based on the context of the codes, the variable 'categorical' should be passed in the function call of '_estimate_conditional_expectations' instead of the method 'is_categorical' Signed-off-by: Yangliu-SY <144334404+Yangliu-SY@users.noreply.github.com> --- dowhy/gcm/model_evaluation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dowhy/gcm/model_evaluation.py b/dowhy/gcm/model_evaluation.py index 41ae15dbd..cbfbf1970 100644 --- a/dowhy/gcm/model_evaluation.py +++ b/dowhy/gcm/model_evaluation.py @@ -454,7 +454,7 @@ def evaluate_node(node_name, random_seed): ) conditional_expectations = _estimate_conditional_expectations( - tmp_causal_mechanism, parent_data[test_indices], is_categorical, 50 + tmp_causal_mechanism, parent_data[test_indices], categorical, 50 ) if categorical: metric_evaluations["F1"].append(