Giter Club home page Giter Club logo

Comments (2)

AlxndrMlk avatar AlxndrMlk commented on July 23, 2024 1

Hi @Lyutenant - thank you for raising this up.

You are correct, there were some changes in the DoWhy's API since version 0.9+ and .causal_estimator object has been removed from the CausalModel class.

There are two ways of generating predictions on new data using the new API (examples follow the Chapter 09 notebook, S-Learner section):

  1. Accessing the fitted estimator from the estimate object:
estimate._estimator_object.effect(earnings_interaction_test.drop(['true_effect', 'took_a_course'], axis=1))
  1. Passing new data to the target_units parameter while setting fit_estimator to False:
model.estimate_effect(
    identified_estimand=estimand,
    method_name='backdoor.econml.metalearners.SLearner',
    fit_estimator=False,
    target_units=earnings_interaction_test.drop(['true_effect', 'took_a_course'], axis=1),
).cate_estimates

I personally find the second way somehow less intuitive and less clear than the first one.

I also want to share with you that I encountered some unexpected behaviors in version 0.10.1 when using these methods. I raised an issue with the DoWhy team here: py-why/dowhy#1038

If you asked my opinion, I'd recommend that you stick with DoWhy 0.8 at least for now.

I hope this reply will be helpful to you.

Wish you a joyful journey with the book and happy causal learning!

from causal-inference-and-discovery-in-python.

Lyutenant avatar Lyutenant commented on July 23, 2024

Hi @AlxndrMlk , thanks for your prompt reply.
I switched back to dowhy 0.8 and the issue is gone. I am taking your advice to stick to 0.8 for now, at least until the issue you have raised with the DoWhy team is solved.

p.s. I do enjoy your book a lot!

from causal-inference-and-discovery-in-python.

Related Issues (8)

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.