8000 Counterfactual Samples giving invalid values of effect in dowhy gcm · Issue #1241 · py-why/dowhy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 8000 /div>
Counterfactual Samples giving invalid values of effect in dowhy gcm #1241
Open
@PMK1991

Description

@PMK1991

I am working on a heart disease dataset which has continuous variable as a treatment (thalach) and outcome categorical(target).There is another variable that the treatment affects (exang) which is categorical too. They have an inverse relation i.e. when thalach is increased, exang should come down. However, it is giving invalid values (-1) of exang (0,1) when intervened on thalach, using counterfactual_samples.

image

samples = gcm.counterfactual_samples(causal_model, {'thalach': lambda thalach:thalach * 1.1}, observed_data=df_risk).

Before and after intervention:

image

Although, I have a hack by clipping values. I would like to know if there is something built in to constrain the effect of intervention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0