causalnex
latest

Introduction

  • Introduction
    • Main features of CausalNex
    • Learning About CausalNex
    • Assumptions

Getting Started

  • Installation prerequisites
    • macOS / Linux
    • Windows
    • Python virtual environments
      • Using conda
        • Create an environment with conda
        • Activate an environment with conda
        • Other conda commands
      • Alternatives to conda
  • Installation guide

Tutorial

  • A first CausalNex tutorial
    • Structure Learning
      • Structure from Domain Knowledge
      • Visualising the Structure
      • Learning the Structure
      • Preparing the Data for Structure Learning
      • Modifying the Structure
      • Exporting the Structure
    • Fitting the Conditional Distribution of the Bayesian Network
      • Preparing the Discretised Data
      • Cardinality of Categorical Features
      • Discretising Numeric Features
      • Create Labels for Numeric Features
      • Train / Test Split
    • Model Probability
      • Fit Conditional Probability Distributions
      • Predict the State given the Input Data
    • Model Quality
      • Classification Report
      • ROC / AUC
    • Querying Marginals
      • Baseline Marginals
      • Marginals after Observations
    • Do Calculus
      • Updating a Node Distribution
      • Resetting a Node Distribution
      • Effect of Do on Marginals
  • Distribution Schema Tutorial
    • Developer Guide
      • Single Parameter Distribution
      • Multi Parameter Distributions
  • Get the most out of CausalNex plotting
    • Explore customisations available in CausalNex
      • Adjusting node and edge attributes
        • Nodes
        • Edges
      • Choosing a look for your plot
      • Parameters that cannot be changed through set_options
      • How to customise your layout
        • Main Network Attributes
        • Main Node Attributes
        • Main Edge Attributes
        • Example of changing parameters
        • Optimising the network design
    • Alternative solutions
      • Plotting with networkx
      • Manual adjustment
    • References
  • Scikit-learn Interface Tutorial
    • How it fits into the bigger causalnex picture
    • DAGRegressor
      • The Diabetes dataset
      • Dataset bias evaluation
      • Linear DAGRegressor
      • Nonlinear DAGRegressor
        • Dependent Target
        • Interpreting the nonlinear DAG
    • DAGClassifier
      • Binary Classifier
        • The Breast Cancer dataset
        • Dataset bias evaluation
      • Categorical Classifier
        • The Iris dataset
        • Dataset bias evaluation
  • Latent Variable Tutorial
    • Adding a latent variable
      • Overview of steps
      • Expectation-Maximization
        • Guarantees and limitations
        • Our implementation
        • Constraints
      • Case study: Student performance data
        • Building a network with no LV and train it on complete data
        • Identifying an LV and how it interacts with the model
        • Adding the LV to the network
        • Establishing constraints to the parameters related to the LV
        • Fitting the parameters of the LV and its children
    • Identifying candidate locations for latent variable
      • Overview of steps
      • Location identification strategy
      • Case study: Student performance data
        • Model initialisation
        • Establishing baseline performance
        • Identifying highly correlated nodes
        • Comparison with baseline performance
    • Appendix
      • How to choose where to add an LV?
      • An interesting property of EM for Bayesian networks
      • What structures allow EM to correctly recover parameters?
      • Definitions
    • References

User guide

  • Causal Inference with Bayesian Networks. Main Concepts and Methods
    • 1. Causality
      • 1.1 Why is causality important?
      • 1.2 Structural Causal Models (SCMs)
    • 2. Bayesian Networks (BNs)
      • 2.1 Directed Acyclic Graph (DAG)
      • 2.2 What Bayesian Networks are and are not
        • Steps for working with a Bayesian Network
        • What can we use Bayesian Networks for?
      • 2.3 Advantages and Drawbacks of Bayesian Networks
        • Advantages
        • Drawbacks
    • 3. The BayesianNetwork Class
      • 3.1 Defining the DAG with StructureModel
      • 3.2 Likelihood Estimation and Predictions with BayesianNetwork
    • 4. Querying model and making interventions with InferenceEngine
      • 4.1 Querying marginals with InferenceEngine.query
      • 4.2 Making interventions (Do-calculus) with InferenceEngine.do_intervention

Resources

  • Frequently asked questions
    • What is CausalNex?
    • What are the benefits of using CausalNex?
    • When should you consider using CausalNex?
    • Why NOTEARS algorithm over other structure learning methods?
    • What is the recommended type of dataset to be used in NOTEARS?
    • What is the recommended number of samples for satisfactory performance?
    • Why can my StructureModel be cyclic, but not my BayesianNetwork?
    • Why a separate data pre-processing process for probability fitting than structure learning? / Why discretise data in probability fitting?
    • Why call fit_node_states before fit_cpds?
    • What is Do-intervention and when to use it?
    • How can I make inference faster?
    • How does CausalNex compare to other projects, e.g. CausalML, DoWhy?
    • What version of Python does CausalNex use?
    • How do I upgrade CausalNex?
    • How can I find out more CausalNex?
    • Where can I learn more about Bayesian Networks?

API Docs

  • causalnex
    • causalnex.structure
      • causalnex.structure.DAGClassifier
      • causalnex.structure.DAGRegressor
      • causalnex.structure.StructureModel
    • causalnex.plots
      • causalnex.plots.display_plot_ipython
      • causalnex.plots.plot_structure
    • causalnex.discretiser
      • causalnex.discretiser.DecisionTreeSupervisedDiscretiserMethod
      • causalnex.discretiser.Discretiser
      • causalnex.discretiser.MDLPSupervisedDiscretiserMethod
    • causalnex.estimator
      • causalnex.estimator.EMSingleLatentVariable
    • causalnex.network
      • causalnex.network.BayesianNetwork
    • causalnex.evaluation
      • causalnex.evaluation.classification_report
      • causalnex.evaluation.roc_auc
    • causalnex.inference
      • causalnex.inference.InferenceEngine
causalnex
  • Docs »
  • Overview: module code

All modules for which code is available

  • builtins
  • causalnex.discretiser.discretiser
  • causalnex.discretiser.discretiser_strategy
  • causalnex.estimator.em
  • causalnex.evaluation.evaluation
  • causalnex.inference.inference
  • causalnex.network.network
  • causalnex.plots.display
  • causalnex.plots.plots
  • causalnex.structure.pytorch.sklearn.clf
  • causalnex.structure.pytorch.sklearn.reg
  • causalnex.structure.structuremodel

© Copyright 2020, QuantumBlack Revision 04caf1b9.

Built with Sphinx using a theme provided by Read the Docs.