-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Regards,
I noticed something that I do not understand at this stage:
The DoSampler works fine when you do not add a graph to your CausalModel object, but fails when you add a graph. To elaborate:
This model object, which I will name "a" and does not have a graph. It doesn't give you problems:
# Define causes, Outcomes and Common Causes
causes = ['v']
outcomes = ['y']
common_causes = ['x1',
'x4',
'x5',
'x6']
model = CausalModel(df,
causes,
outcomes,
common_causes=common_causes)
This model object, which I will name "b", has a graph as an input. It gives you problems;
# Define causes, Outcomes and Common Causes
causes = ['v']
outcomes = ['y']
common_causes = ['x1',
'x4',
'x5',
'x6']
graph = "digraph {x1 -> y;v -> y;x6 -> y;x6 -> x5;x4 -> x5;}"
model = CausalModel(df,
causes,
outcomes,
common_causes=common_causes,
graph=graph)
To be specific the model object formulation named "b" gives you problems when you try to create the interventional dataframe as follows:
interventional_df = sampler.do_sample(None)
It gives you the following "value error":
ValueError: Found array with 0 feature(s) (shape=(46, 0)) while a minimum of 1 is required.
Why is this so?
Best
-C.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working