Giter VIP home page Giter VIP logo

Comments (4)

amit-sharma avatar amit-sharma commented on July 3, 2024

Can you post a minimum working example so we can reproduce the bug?

from dowhy.

ianisadreamer avatar ianisadreamer commented on July 3, 2024

Thank you! Do you think this is enough?

`from sklearn import preprocessing
#create instance of label encoder
lab = preprocessing.LabelEncoder()

#perform label encoding
tmp_clean['is_matched'] = lab.fit_transform(tmp_clean['is_matched'])
tmp_clean['work_type'] = lab.fit_transform(tmp_clean['work_type'])
tmp_clean['report_violation_type']= lab.fit_transform(tmp_clean['report_violation_type'])
tmp_clean['market_reporting'] = lab.fit_transform(tmp_clean['market_reporting'])
tmp_clean['detection_type'] = lab.fit_transform(tmp_clean['detection_type'])
tmp_clean['big_mac_segments'] = lab.fit_transform(tmp_clean['big_mac_segments'])
tmp_clean['is_admitted'] = lab.fit_transform(tmp_clean['is_admitted'])

from dowhy import CausalModel

model=CausalModel(
data = tmp_clean,
treatment='is_matched',
outcome='decision_handle_time',
common_causes= ['work_type', 'market_reporting', 'report_violation_type', 'detection_type', 'big_mac_segments', 'is_admitted']
)
model.view_model()

estimands = model.identify_effect()
print(estimands)

estimate = model.estimate_effect(estimands,method_name="backdoor.linear_regression",
test_significance=True)
print(estimate)

estimate.test_stat_significance()`

from dowhy.

ianisadreamer avatar ianisadreamer commented on July 3, 2024

@amit-sharma It constantly returns {'p_value': array([0.])} to me.
I actually found when I manually built another causal graph and send it to the CausalModel(), it will return the normal P_value. I'm wondering if it's related to the common_causes used in the CausalModel or the graph itself.

from dowhy.

amit-sharma avatar amit-sharma commented on July 3, 2024

I see, it may be due to the dataset too. To reproduce the error, I will need the data too. Can you share the tmp_clean dataframe? If that is not possible, please share a simulated dataset that reproduces the problem.

from dowhy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.