Cider - Shop now
$37.99 with 30 percent savings
List Price: $53.99
FREE Returns
FREE delivery Thursday, May 8 to Nashville 37217
Or fastest delivery Wednesday, May 7. Order within 1 hr 44 mins
In Stock
$$37.99 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$37.99
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Ships from
Amazon.com
Amazon.com
Ships from
Amazon.com
Sold by
Amazon.com
Amazon.com
Sold by
Amazon.com
Returns
30-day refund/replacement
30-day refund/replacement
This item can be returned in its original condition for a full refund or replacement within 30 days of receipt.
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

Causal Inference and Discovery in Python: Unlock the secrets of modern causal machine learning with DoWhy, EconML, PyTorch and more

4.4 out of 5 stars 134 ratings

{"desktop_buybox_group_1":[{"displayPrice":"$37.99","priceAmount":37.99,"currencySymbol":"$","integerValue":"37","decimalSeparator":".","fractionalValue":"99","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"sytJ2Yt%2Fld6TxIqn6AkK6f2GxHq5Ny%2BSXBfsFe4VzZMP9xCwe9TpByHwdTDBpTe2iSfd5mhK%2FSgoN8BXSMMuBTlGTSgwM8yUNdCy17ldbgAfM5PoCFTArQHMcgx0OxCRzUueRVh3XbfeSWa4XEK1BA%3D%3D","locale":"en-US","buyingOptionType":"NEW","aapiBuyingOptionIndex":0}]}

Purchase options and add-ons

Demystify causal inference and casual discovery by uncovering causal principles and merging them with powerful machine learning algorithms for observational and experimental data

Purchase of the print or Kindle book includes a free PDF eBook

Key Features

  • Examine Pearlian causal concepts such as structural causal models, interventions, counterfactuals, and more
  • Discover modern causal inference techniques for average and heterogenous treatment effect estimation
  • Explore and leverage traditional and modern causal discovery methods

Book Description

Causal methods present unique challenges compared to traditional machine learning and statistics. Learning causality can be challenging, but it offers distinct advantages that elude a purely statistical mindset. Causal Inference and Discovery in Python helps you unlock the potential of causality.

You’ll start with basic motivations behind causal thinking and a comprehensive introduction to Pearlian causal concepts, such as structural causal models, interventions, counterfactuals, and more. Each concept is accompanied by a theoretical explanation and a set of practical exercises with Python code.

Next, you’ll dive into the world of causal effect estimation, consistently progressing towards modern machine learning methods. Step-by-step, you’ll discover Python causal ecosystem and harness the power of cutting-edge algorithms. You’ll further explore the mechanics of how “causes leave traces” and compare the main families of causal discovery algorithms.

The final chapter gives you a broad outlook into the future of causal AI where we examine challenges and opportunities and provide you with a comprehensive list of resources to learn more.

What you will learn

  • Master the fundamental concepts of causal inference
  • Decipher the mysteries of structural causal models
  • Unleash the power of the 4-step causal inference process in Python
  • Explore advanced uplift modeling techniques
  • Unlock the secrets of modern causal discovery using Python
  • Use causal inference for social impact and community benefit

Who this book is for

This book is for machine learning engineers, data scientists, and machine learning researchers looking to extend their data science toolkit and explore causal machine learning. It will also help developers familiar with causality who have worked in another technology and want to switch to Python, and data scientists with a history of working with traditional causality who want to learn causal machine learning. It’s also a must-read for tech-savvy entrepreneurs looking to build a competitive edge for their products and go beyond the limitations of traditional machine learning.

Table of Contents

  1. Causality – Hey, We Have Machine Learning, So Why Even Bother?
  2. Judea Pearl and the Ladder of Causation
  3. Regression, Observations, and Interventions
  4. Graphical Models
  5. Forks, Chains, and Immoralities
  6. Nodes, Edges, and Statistical (In)dependence
  7. The Four-Step Process of Causal Inference
  8. Causal Models – Assumptions and Challenges
  9. Causal Inference and Machine Learning – from Matching to Meta-Learners
  10. Causal Inference and Machine Learning – Advanced Estimators, Experiments, Evaluations, and More
  11. Causal Inference and Machine Learning – Deep Learning, NLP, and Beyond
  12. Can I Have a Causal Graph, Please?
  13. Causal Discovery and Machine Learning – from Assumptions to Applications
  14. Causal Discovery and Machine Learning – Advanced Deep Learning and Beyond
  15. Epilogue

Frequently bought together

This item: Causal Inference and Discovery in Python: Unlock the secrets of modern causal machine learning with DoWhy, EconML, PyTorch and more
$37.99
Get it as soon as Thursday, May 8
In Stock
Ships from and sold by Amazon.com.
+
$45.00
Get it as soon as Thursday, May 8
In Stock
Ships from and sold by Amazon.com.
+
$11.39
Get it as soon as Thursday, May 8
In Stock
Ships from and sold by Amazon.com.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
Choose items to buy together.

From the brand


From the Publisher

casual inference
Causal inference and discovery in python book

Why is causal inference such a key topic for data scientists to learn about?

In 2022 there were an average of 3.2 new papers on causality published on ArXiv every day, a number which has been growing exponentially over the past 3-5 years. Top researchers and organizations like Microsoft, Amazon, and DeepMind invest their resources in causal research and we are seeing more and more causal applications in industry. Companies across various business sectors implement causal methods – from gaming to manufacturing, from finance to automotive - and among them are companies like Spotify, Playtika and BMW.

This book will help you learn about causal inference by covering the basics necessary to understand this new and dynamic field, and – using a step-by-step approach – we then move towards more advanced and state-of-the-art methods, helping you to build a comprehensive, and powerful skillset.

Table of Contents

  • Causality – Hey, We Have Machine Learning, So Why Even Bother?
  • Judea Pearl and the Ladder of Causation
  • Regression, Observations, and Interventions
  • Graphical Models
  • Forks, Chains, and Immoralities
  • Nodes, Edges, and Statistical (In)dependence
  • The Four-Step Process of Causal Inference
  • ...and more!
author Aleksander Molak

What was your objective in writing this book?

When I was starting my journey with practical causality, I could not find a comprehensive book on causality in Python.

Understanding the potential of causal machine learning and knowing how much effort it took me to build my skill set, I wanted to share my journey with others, so they can enter this dynamically evolving field easier and faster and start applying causal inference and causal discovery in their own projects.

image

What is your favorite part of the book and why?

I enjoyed working on all parts of the book, but I have a special fondness for chapters 7 and 11. The former introduces the idea of the 4-step process of causal inference. This is an idea that originates from the DoWhy package created by Amit Sharma and colleagues, and I believe it’s one of the most powerful ideas to help newcomers build a clear structure around the causal inference process.

In chapter 11, we discuss the intersection of causality and natural language processing (NLP), which lays the foundation for understanding fascinating recent research on causality and generative AI. My bet is that we’ll see dynamic growth in this area in the coming years, and so this chapter can prepare the reader to more easily grasp the new ideas in the field and apply them quickly.

image2

What are the key takeaways from this book for readers?

I see three main key takeaways for the readers. The first is general in its nature and it’s about causal thinking. Causal thinking is thinking in terms of the data-generating processes rather than statistical summaries of the data. I see it as one of the most powerful data skills in the upcoming 3 to 5 years and I am confident that it can help virtually anyone become a better data scientist, analyst or researcher.

The second takeaway is that working with causal models doesn’t have to be scary or exceedingly difficult. It boils down to a set of practical and mental skills that can be learned by anyone, and my hope is that the book does a good job in helping you achieve this. The last takeaway is that by giving ourselves a space for creativity, we can face and overcome even the most difficult challenges. I see practical causality as a beautiful example of this phenomenon.

Editorial Reviews

Review

“Despite causality becoming a key topic for AI and increasingly also for generative AI, most developers are not familiar with concepts such as causal graphs and counterfactual queries. Aleksander’s book makes the journey into the world of causality easier for developers. The book spans both technical concepts and code and provides recommendations for the choice of approaches and algorithms to address specific causal scenarios. This book is comprehensive yet accessible. Machine learning engineers, data scientists, and machine learning researchers who want to extend their data science toolkit to include causal machine learning will find this book most useful. Looking to the future of AI, I find the sections on causal machine learning and LLMs especially relevant to both readers and our work.”

--

Ajit Jaokar, Visiting Fellow, Department of Engineering Science, University of Oxford, and Course Director, Artificial Intelligence: Cloud and Edge Implementations, University of Oxford



“My exploration of causal analysis began roughly 5 years ago during a stimulating conversation with Vint Cerf. When questioned about the foremost challenge for ML in physics, my immediate response was - causality. In many areas of physics and materials science, we often grapple with multiple observations, yet opportunities for experimental intervention are sparse. While we can change reagents used in synthesis of material, we cannot experiment with the nature of physical laws controlling the interactions between atoms – even though we can visualize them. While classical ML primarily focuses on correlation, genuine insights in experimental domains are anchored in grasping the causal relationships between observables and their temporal dynamics. Vint pointed me towards Judea Pearl's pioneering work. While Pearl's contributions are profoundly enlightening, their pragmatic applications, especially in materials discovery or in interpreting microscopic observations, felt elusive to me and my colleagues. With an array of methods scattered across diverse publications, books, and fragmented GitHub repositories, finding a direct, actionable solution was akin to navigating a maze. The Aleksander Molak's book on Causal Inference and Discovery in Python emerged as a beacon. Molak masterfully intertwines theory with hands-on code implementations. His work represents the comprehensive causality guide I've sought for the past half-decade – a singular resource allowing me to delve into the text and immediately apply the code to tangible challenges in materials science. For this gem, my gratitude knows no bounds.”

--

Sergei V. Kalinin, Weston Fulton professor, Department of Materials Science and Engineering



“I got my start into the world of causal modeling through System Dynamics a couple of decades ago and that led to reading Pearl’s book and papers. I have seen very slow adoption of these ideas despite their tremendous promise, and I think this book will help a great deal. The first part has a lot of introductory material that is great for beginners, but you can skip if you are familiar with Pearl’s work. The second part is really the core of the book that covers a lot of Python packages and their use to do causal analysis, including LLMs. The third part gets into causal discovery that is very critical for solving practical problems and here again a lot of ideas and packages are covered. One thing that is missing is detailed practical examples, which are still needed for mainstream adoption. I look forward to the day when the author publishes this next book of examples. Overall, a must-read book for any data scientist.”

--

Bipin Chadha, VP Data Science - CSAA Insurance Group, a AAA Insurer

About the Author

Aleksander Molak is an independent machine learning researcher and consultant. Aleksander gained experience working with Fortune 100, Fortune 500, and Inc. 5000 companies across Europe, the USA, and Israel, helping them to build and design large-scale machine learning systems. On a mission to democratize causality for businesses and machine learning practitioners, Aleksander is a prolific writer, creator, and international speaker. As a co-founder of Lespire.io, an innovative provider of AI and machine learning training for corporate teams, Aleksander is committed to empowering businesses to harness the full potential of cutting-edge technologies that allow them to stay ahead of the curve.

This book has been co-authored by many people whose ideas, love, and support left a significant trace in my life. I am deeply grateful to each one of you.

Product details

  • Publisher ‏ : ‎ Packt Publishing (May 31, 2023)
  • Language ‏ : ‎ English
  • Paperback ‏ : ‎ 456 pages
  • ISBN-10 ‏ : ‎ 1804612987
  • ISBN-13 ‏ : ‎ 978-1804612989
  • Item Weight ‏ : ‎ 1.74 pounds
  • Dimensions ‏ : ‎ 1.07 x 7.5 x 9.25 inches
  • Customer Reviews:
    4.4 out of 5 stars 134 ratings

About the author

Follow authors to get new release updates, plus improved recommendations.
Aleksander Molak
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Aleksander Molak is a Machine Learning Researcher and Consultant who gained experience working with Fortune 100, Fortune 500, and Inc. 5000 companies across Europe, the USA, and Israel, designing and building large-scale machine learning systems. On a mission to democratize causality for businesses and machine learning practitioners, Aleksander is a prolific writer, creator, and international speaker. As a co-founder of Lespire.io, an innovative provider of AI and machine learning training for corporate teams, Aleksander is committed to empowering businesses to harness the full potential of cutting-edge technologies that allow them to stay ahead of the curve.

Customer reviews

4.4 out of 5 stars
134 global ratings

Review this product

Share your thoughts with other customers

Customers say

Customers find the book to be a great resource for learning causal inference, with clear explanations and practical exercises using Python libraries. They appreciate the author's expertise, with one customer noting the strong emphasis on hands-on implementation.

AI-generated from the text of customer reviews

Select to learn more

12 customers mention "Explanations"9 positive3 negative

Customers appreciate the book's clear explanations and deep knowledge of causal inference, with one customer noting it covers advanced topics like causal discovery algorithms.

"Casual Inference and Discovery in Python is a great book - it's approachable, clear, filled with examples and code to follow through...." Read more

"This book is helping me understand the fundamental concepts of causal inference and the various application methods...." Read more

"...Its hands-on approach, coupled with clear explanations and practical examples, makes it a must-read for data scientists, researchers, and analysts..." Read more

"I love the way it explains the theory with puthon 3xamplea, then uses libraries like econml and fonally introduces advanced techniques like deep..." Read more

8 customers mention "Author's knowledge"8 positive0 negative

Customers appreciate the author's knowledge and find the book well-written, with one customer highlighting the practical exercises using Python libraries and another noting the strong emphasis on hands-on implementation.

"Casual Inference and Discovery in Python is a great book - it's approachable, clear, filled with examples and code to follow through...." Read more

"...The practical, hands-on book exercises clarified and cemented the many new (to me) concepts unique to causal modeling...." Read more

"...Its hands-on approach, coupled with clear explanations and practical examples, makes it a must-read for data scientists, researchers, and analysts..." Read more

"...advanced techniques like deep learning always with easy to understand python code. Recomended." Read more

I was skeptical, but I was wrong
5 out of 5 stars
I was skeptical, but I was wrong
I bought this book because a friend recommended it to me. According to the "badge" on the cover, the book approaches causality from a "Pearlian and Machine Learning Perspective". I was a bit skeptical at first, because I know Pearl's work and it was hard for me to imagine someone could bring much new insight here. In hindsight, I must say this book is a great read. It provides the reader with very intuitive explanations and makes the transition from theory (sometimes pretty complex) to practice seamless. The book is very well written. The author's attitude is positive but realistic. This makes reading the book not only a great educational experience, but also an intellectual adventure of sorts. Highly recommended, and thanks to Glenn for bringing this book to my attention!
Thank you for your feedback
Sorry, there was an error
Sorry we couldn't load the review

Top reviews from the United States

  • Reviewed in the United States on March 26, 2025
    Casual Inference and Discovery in Python is a great book - it's approachable, clear, filled with examples and code to follow through.
    I'm only in the first half of the book, but I feel that it's helping me with my perspective as a data scientict.

    Causation is not correlation, so this book won't make you better, but there's a good correlation between reading it and feeling like you have more tools to solve real-world problems
  • Reviewed in the United States on April 15, 2025
    This book is helping me understand the fundamental concepts of causal inference and the various application methods. My journey started with standard statistics, then to bayes, and now causal models. The practical, hands-on book exercises clarified and cemented the many new (to me) concepts unique to causal modeling. I appreciate Mr. Molak taking time to write this excellent book.
  • Reviewed in the United States on October 2, 2023
    Causal Inference and Discovery in Python is a valuable addition to the library of Data Scientists and researchers who are interested in Causal Inference. This book offers a comprehensive and practical guide to causal inference and discovery methods. The book starts with a solid foundation by explaining the fundamentals of causal inference and how it differs from Machine Learning. It takes readers through the concepts of causality, counterfactuals, direct acyclic graphs and causal discovery, making these complex ideas clear and understandable to a wide audience, from beginners to seasoned data scientists. The practical examples, along with clear explanations and code snippets, make it easy for readers to follow along and apply what they've learned.

    What sets this book apart is its strong emphasis on hands-on implementation. The author provides numerous real-world examples and practical exercises using Python libraries such as EconML, doWhy, gCastle. and Causica. These libraries enable readers to implement causal analysis techniques efficiently, which is essential for anyone looking to apply causal inference in their data projects.

    Another notable feature of the book is its attention to potential pitfalls and challenges in causal analysis. It doesn't just stop at teaching the "how" but also delves into the "why" behind certain methodologies and the limitations of causal inference techniques. This level of depth and transparency is essential for building a deep understanding of the subject matter. The book also covers advanced topics like causal discovery algorithms, providing readers with a well-rounded overview for this particular area. While this book is a valuable resource for anyone interested in causal inference, it may not be suitable for absolute beginners in Python. Some prior familiarity with Python programming and basic data science concepts is recommended to fully grasp the content.

    In summary, Causal Inference and Discovery in Python is a commendable resource for those looking to demystify the complexities of causal analysis and apply it to real-world problems. Its hands-on approach, coupled with clear explanations and practical examples, makes it a must-read for data scientists, researchers, and analysts seeking to understand and leverage causal inference in Python.
    6 people found this helpful
    Report
  • Reviewed in the United States on January 24, 2025
    I love the way it explains the theory with puthon 3xamplea, then uses libraries like econml and fonally introduces advanced techniques like deep learning always with easy to understand python code. Recomended.
    One person found this helpful
    Report
  • Reviewed in the United States on August 3, 2023
    I bought this book because a friend recommended it to me.

    According to the "badge" on the cover, the book approaches causality from a "Pearlian and Machine Learning Perspective".

    I was a bit skeptical at first, because I know Pearl's work and it was hard for me to imagine someone could bring much new insight here.

    In hindsight, I must say this book is a great read. It provides the reader with very intuitive explanations and makes the transition from theory (sometimes pretty complex) to practice seamless.

    The book is very well written. The author's attitude is positive but realistic. This makes reading the book not only a great educational experience, but also an intellectual adventure of sorts.

    Highly recommended, and thanks to Glenn for bringing this book to my attention!
    Customer image
    5.0 out of 5 stars
    I was skeptical, but I was wrong

    Reviewed in the United States on August 3, 2023
    I bought this book because a friend recommended it to me.

    According to the "badge" on the cover, the book approaches causality from a "Pearlian and Machine Learning Perspective".

    I was a bit skeptical at first, because I know Pearl's work and it was hard for me to imagine someone could bring much new insight here.

    In hindsight, I must say this book is a great read. It provides the reader with very intuitive explanations and makes the transition from theory (sometimes pretty complex) to practice seamless.

    The book is very well written. The author's attitude is positive but realistic. This makes reading the book not only a great educational experience, but also an intellectual adventure of sorts.

    Highly recommended, and thanks to Glenn for bringing this book to my attention!
    Images in this review
    Customer imageCustomer imageCustomer image
    14 people found this helpful
    Report
  • Reviewed in the United States on January 17, 2025
    Excelente libro; entrega en tiempo indicado. Bien!
    One person found this helpful
    Report
  • Reviewed in the United States on May 17, 2024
    On kindle for mac formulas are not rendering correctly i.e. no subscripts. Can you please fix it?
    3 people found this helpful
    Report
  • Reviewed in the United States on March 18, 2025
    Right out of the gate the author cites exactly the example I was looking to do... Determine the causal relationship between marketing spend and outcome! Did the author ever show how to do that? No!

    The book gets technical and very fast! I can see how one could make an entire career out of causal relationships but the necessity of graphing all of the relationships is way out of the basic use cases that I bought this book to satisfy
    One person found this helpful
    Report

Top reviews from other countries

  • Diana
    5.0 out of 5 stars Great book, looking forward to new editions
    Reviewed in Mexico on March 26, 2025
    I have a background in Biology/Genomics/Bioinformatics. The book was a great start for someone like me who is used to analyze observational data, and who is starting to work on interventions.

    I would be more keen to buy another book from the same author/series that would deep into more specialized problems. For instance, in Genomics one deals with e.g. drugs that can affect hundreds or thousands of genes, but this is hidden for us, in some cases due to technical limitations.

    Otherwise, I strongly appreciate the code resources that come with the book and the access to the Discord community. The author himself has been helpful in solving questions from the community.
  • Mehnen
    5.0 out of 5 stars good for lecture course!
    Reviewed in Germany on April 27, 2025
    Best book for Causal Inference (just behind the book of why from Judea Pearl)
  • RYAN Semillano Soriano
    5.0 out of 5 stars Great book🌟
    Reviewed in the United Kingdom on April 12, 2025
    The media could not be loaded.
    I love it🌟
    Customer image
    RYAN Semillano Soriano
    5.0 out of 5 stars
    Great book🌟

    Reviewed in the United Kingdom on April 12, 2025
    I love it🌟
    Images in this review
    Customer imageCustomer image
  • John
    5.0 out of 5 stars Comprehensive and practical
    Reviewed in Canada on June 10, 2023
    Highly recommended for beginners and those who want to start empirical analysis using DoWhy
  • Cliente Amazon
    3.0 out of 5 stars Some formulas not visible on Kindle
    Reviewed in Spain on March 25, 2024
    Formulas on Kindle are not shown, a question mark is shown instead or very poorly shown