Skip to content

dscolby/CausalELM.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Code Coverage License Documentation Develmopmental Documentation Aqua QA Code Style: Blue

CausalELM provides easy-to-use implementations of modern causal inference methods in a lightweight package. While CausalELM implements a variety of estimators, they all have one thing in common—the use of machine learning models to flexibly estimate causal effects. This is where the ELM in CausalELM comes from—the machine learning model underlying all the estimators is an extreme learning machine (ELM). ELMs are a simple neural network that use randomized weights and offer a good tradeoff between learning non-linear dependencies and simplicity. Furthermore, CausalELM implements bagged ensembles of ELMs to reduce the variance resulting from randomized weights.

Estimators

CausalELM implements estimators for aggreate e.g. average treatment effect (ATE) and individualized e.g. conditional average treatment effect (CATE) quantities of interest.

Estimators for Aggregate Effects

  • Interrupted Time Series Estimator
  • G-computation
  • Double machine Learning

Individualized Treatment Effect (CATE) Estimators

  • S-learner
  • T-learner
  • X-learner
  • R-learner
  • Doubly Robust Estimator

Features

  • Estimate a causal effect, get a summary, and validate assumptions in just four lines of code
  • Bagging improves performance and reduces variance without the need to tune a regularization parameter
  • Enables using the same structs for regression and classification
  • Includes 13 activation functions and allows user-defined activation functions
  • Most inference and validation tests do not assume functional or distributional forms
  • Implements the latest techniques form statistics, econometrics, and biostatistics
  • Works out of the box with arrays or any data structure that implements the Tables.jl interface
  • Works out of the box with AbstractArrays or any data structure that implements the Tables.jl interface
  • Works with CuArrays, ROCArrays, and any other GPU-specific arrays that are AbstractArrays
  • CausalELM is lightweight—its only dependency is Tables.jl
  • Codebase is high-quality, well tested, and regularly updated

What's New?

  • See the JuliaCon 2024 CausalELM demonstration here.
  • Includes support for GPU-specific arrays and data structures that implement the Tables.jl API
  • Only performs randomization inference when the inference argument is set to true in summarize methods
  • Summaries support calculating marginal effects and confidence intervals
  • Randomization inference now uses multithreading
  • Refactored code to be easier to extend and understand
  • Uses a simple heuristic to choose the number of neurons, which reduces training time and still works well in practice
  • Probability clipping for classifier predictions and residuals is no longer necessary due to the bagging procedure

What's Next?

Efforts for the next version of CausalELM will focus on providing interpreteations for the results of callin validate as well as fixing any bugs and eliciting feedback.

Disclaimer

CausalELM is extensively tested and almost every function or method has multiple tests. That being said, CausalELM is still in the early/ish stages of development and may have some bugs. Also, expect breaking releases for now.

Contributing

All contributions are welcome. Before submitting a pull request please read the contribution guidlines.