Skip to content

Commit 5aa51fa

Browse files
committed
Updated documentation
1 parent 8ce7208 commit 5aa51fa

File tree

2 files changed

+86
-60
lines changed

2 files changed

+86
-60
lines changed

README.md

+40-33
Original file line numberDiff line numberDiff line change
@@ -50,34 +50,38 @@ code.
5050

5151
<h2>Extreme Learning Machines and Causal Inference</h2>
5252
<p>
53-
In some cases we would like to know the causal effect of some intervention but we do not
54-
have the counterfactual, making conventional methods of statistical analysis infeasible.
55-
However, it may still be possible to get an unbiased estimate of the causal effect (ATE,
56-
ATE, or ITT) by predicting the counterfactual and comparing it to the observed outcomes if
57-
we are able to observe all potential confounders. This is the approach CausalELM takes to
58-
conduct interrupted time series analysis, G-Computation, double machine learning, and
59-
metalearning via S-Learners, T-Learners, X-Learners, R-learners, and doubly robust
60-
estimation. In interrupted time series analysis, we want to estimate the effect of some
61-
intervention on the outcome of a single unit that we observe during multiple time periods.
62-
For example, we might want to know how the announcement of a merger affected the price of
63-
Stock A. To do this, we need to know what the price of stock A would have been if the merger
64-
had not been announced, which we can predict with machine learning methods. Then, we can
65-
compare this predicted counterfactual to the observed price data to estimate the effect of
66-
the merger announcement. In another case, we might want to know the effect of medicine X on
67-
disease Y but the administration of X was not random and it might have also been
68-
administered at mulitiple time periods, which would produce biased estimates. To overcome
69-
this, G-computation models the observed data, uses the model to predict the outcomes if all
70-
patients recieved the treatment, and compares it to the predictions of the outcomes if none
71-
of the patients recieved the treatment. Double machine learning (DML) takes a similar
72-
approach but also models the treatment mechanism and uses it to adjust the initial estimates.
73-
This approach has three advantages. First, it is more efficient with high dimensional data
74-
than conventional methods. Metalearners take a similar approach to estimate the CATE. While
75-
all of these models are different, they have one thing in common: how well they perform
76-
depends on the underlying model they fit to the data. To that end, CausalELMs use bagged
77-
ensembles of extreme learning machines because they are simple yet flexible enough to be
78-
universal function approximators with lower varaince than single extreme learning machines.
53+
CausalELM provides easy-to-use implementations of modern causal inference methods. While
54+
CausalELM implements a variety of estimators, they all have one thing in common—the use of
55+
machine learning models to flexibly estimate causal effects. This is where the ELM in
56+
CausalELM comes from—the machine learning model underlying all the estimators is an extreme
57+
learning machine (ELM). ELMs are a simple neural network that use randomized weights and
58+
offer a good tradeoff between learning non-linear dependencies and simplicity. Furthermore,
59+
CausalELM implements bagged ensembles of ELMs to reduce the variance resulting from
60+
randomized weights.
7961
</p>
8062

63+
<h2>Estimators</h2>
64+
<p>
65+
CausalELM implements estimators for aggreate e.g. average treatment effect (ATE) and
66+
individualized e.g. conditional average treatment effect (CATE) quantities of interest.
67+
</p>
68+
69+
<h3>Estimators for Aggregate Effects</h3>
70+
<ul>
71+
<li>Interrupted Time Series Estimator</li>
72+
<li>G-computation</li>
73+
<li>Double machine Learning</li>
74+
</ul>
75+
76+
<h3>Individualized Treatment Effect (CATE) Estimators</h3>
77+
<ul>
78+
<li>S-learner</li>
79+
<li>T-learner</li>
80+
<li>X-learner</li>
81+
<li>R-learner</li>
82+
<li>Doubly Robust Estimator</li>
83+
</ul>
84+
8185
<h2>CausalELM Features</h2>
8286
<ul>
8387
<li>Estimate a causal effect, get a summary, and validate assumptions in just four lines of code</li>
@@ -87,25 +91,28 @@ universal function approximators with lower varaince than single extreme learnin
8791
<li>Most inference and validation tests do not assume functional or distributional forms</li>
8892
<li>Implements the latest techniques form statistics, econometrics, and biostatistics</li>
8993
<li>Works out of the box with arrays or any data structure that implements the Tables.jl interface</li>
94+
<li>Works out of the box with AbstractArrays or any data structure that implements the Tables.jl interface</li>
95+
<li>Works with CuArrays, ROCArrays, and any other GPU-specific arrays that are AbstractArrays</li>
96+
<li>CausalELM is lightweight—its only dependency is Tables.jl</li>
9097
<li>Codebase is high-quality, well tested, and regularly updated</li>
9198
</ul>
9299

93100
<h2>What's New?</h2>
94101
<ul>
95102
<li>See the JuliaCon 2024 CausalELM demonstration <a href="https://www.youtube.com/watch?v=hh_cyj8feu8&t=26s">here.
96-
<li>Model summaries include confidence intervals and marginal effects<li>
97-
<li>Now includes doubly robust estimator for CATE estimation</li>
98-
<li>All estimators now implement bagging to reduce predictive performance and reduce variance</li>
99-
<li>Counterfactual consistency validation simulates more realistic violations of the counterfactual consistency assumption</li>
103+
<li>Includes support for GPU-specific arrays and data structures that implement the Tables.jl API<li>
104+
<li>Only performs randomization inference when the inference argument is set to true in summarize methods</li>
105+
<li>Summaries support calculating marginal effects and confidence intervals</li>
106+
<li>Randomization inference now uses multithreading</li>
107+
<li>Refactored code to be easier to extend and understand</li>
100108
<li>Uses a simple heuristic to choose the number of neurons, which reduces training time and still works well in practice</li>
101109
<li>Probability clipping for classifier predictions and residuals is no longer necessary due to the bagging procedure</li>
102110
</ul>
103111

104112
<h2>What's Next?</h2>
105113
<p>
106-
Newer versions of CausalELM will hopefully support using GPUs and provide interpretations of
107-
the results of calling validate on a model that has been estimated. We may also add some other
108-
features depending on demand and feedback.
114+
Efforts for the next version of CausalELM will focus on providing interpreteations for the results of callin validate as well
115+
as fixing any bugs and eliciting feedback.
109116
</p>
110117

111118
<h2>Disclaimer</h2>

docs/src/index.md

+46-27
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,51 @@ CurrentModule = CausalELM
1313

1414
# Overview
1515

16-
CausalELM leverages new techniques in machine learning and statistics to estimate individual
17-
and aggregate treatment effects in situations where traditional methods are unsatisfactory
18-
or infeasible. To enable this, CausalELM provides a simple API to initialize a model,
19-
estimate a causal effect, get a summary of the model, and test its robustness. CausalELM
20-
includes estimators for interupted time series analysis, G-Computation, double machine
21-
learning, S-Learning, T-Learning, X-Learning, R-learning, and doubly robust estimation.
22-
Underlying all these estimators are bagged extreme learning machines. Extreme learning
23-
machines are a single layer feedfoward neural network that relies on randomized weights and
24-
least squares optimization, making them expressive, simple, and computationally
25-
efficient. Combining them with bagging reduces the variance caused by the randomization of
26-
weights and provides a form of regularization that does not have to be tuned through cross
27-
validation. These attributes make CausalELM a very simple and powerful package for
28-
estimating treatment effects.
16+
CausalELM provides easy-to-use implementations of modern causal inference methods. While
17+
CausalELM implements a variety of estimators, they all have one thing in common—the use of
18+
machine learning models to flexibly estimate causal effects. This is where the ELM in
19+
CausalELM comes from—the machine learning model underlying all the estimators is an extreme
20+
learning machine (ELM). ELMs are a simple neural network that use randomized weights and
21+
offer a good tradeoff between learning non-linear dependencies and simplicity. Furthermore,
22+
CausalELM implements bagged ensembles of ELMs to reduce the variance resulting from
23+
randomized weights.
2924

30-
For a more interactive overview, see our JuliaCon 2024 talk[here](https://www.youtube.com/watch?v=hh_cyj8feu8&t=26s)
25+
## Estimators
26+
CausalELM implements estimators for aggreate e.g. average treatment effect (ATE) and
27+
individualized e.g. conditional average treatment effect (CATE) quantities of interest.
28+
29+
### Estimators for Aggregate Effects
30+
* Interrupted Time Series Estimator
31+
* G-computation
32+
* Double machine Learning
3133

32-
### Features
34+
### Individualized Treatment Effect (CATE) Estimators
35+
* S-learner
36+
* T-learner
37+
* X-learner
38+
* R-learner
39+
* Doubly Robust Estimator
40+
41+
## Features
3342
* Estimate a causal effect, get a summary, and validate assumptions in just four lines of code
34-
* Bagging improves performance and reduces variance without the need to tune a regularization parameter
3543
* Enables using the same structs for regression and classification
3644
* Includes 13 activation functions and allows user-defined activation functions
3745
* Most inference and validation tests do not assume functional or distributional forms
3846
* Implements the latest techniques from statistics, econometrics, and biostatistics
39-
* Works out of the box with arrays or any data structure that implements the Tables.jl interface
47+
* Works out of the box with AbstractArrays or any data structure that implements the Tables.jl interface
48+
* Works with CuArrays, ROCArrays, and any other GPU-specific arrays that are AbstractArrays
49+
* CausalELM is lightweight—its only dependency is Tables.jl
4050
* Codebase is high-quality, well tested, and regularly updated
4151

42-
### What's New?
43-
* Model summaries contain confidence intervals and marginal effects
44-
* Now includes doubly robust estimator for CATE estimation
45-
* All estimators now implement bagging to reduce predictive performance and reduce variance
46-
* Counterfactual consistency validation simulates more realistic violations of the counterfactual consistency assumption
47-
* Uses a simple heuristic to choose the number of neurons, which reduces training time and still works well in practice
48-
* Probability clipping for classifier predictions and residuals is no longer necessary due to the bagging procedure
52+
## What's New?
53+
* Includes support for GPU-specific arrays and data structures that implement the Tables.jl API
54+
* Only performs randomization inference when the inference argument is set to true in summarize methods
55+
* Summaries support calculating marginal effects and confidence intervals
56+
* Randomization inference now uses multithreading
57+
* CausalELM was presented at JuliaCon 2024 in Eindhoven
58+
* Refactored code to be easier to extend and understand
4959

50-
### What makes CausalELM different?
60+
## What makes CausalELM different?
5161
Other packages, mainly EconML, DoWhy, CausalAI, and CausalML, have similar funcitonality.
5262
Beides being written in Julia rather than Python, the main differences between CausalELM and
5363
these libraries are:
@@ -69,15 +79,24 @@ these libraries are:
6979
estimators provide p-values and standard errors generated via approximate randomization
7080
inference.
7181
* CausalELM strives to be lightweight while still being powerful and therefore does not
72-
have external dependencies: all the functions it uses are in the Julia standard library.
82+
have external dependencies: all the functions it uses are in the Julia standard library
83+
with the exception of model constructors, which use Tables.matrix to ensure integration
84+
with a wide variety of data structures.
7385
* The other packages and many others mostly use techniques from one field. Instead,
7486
CausalELM incorporates a hodgepodge of ideas from statistics, machine learning,
7587
econometrics, and biostatistics.
88+
* CausalELM doesn't use any unnecessary abstractions. The only structs are the actual
89+
models. Estimated effects are returned as arrays, summaries are returned in a dictionary,
90+
and the results of validating an estimator are returned as tuples. This is in contrast
91+
to other packages that utilize separate structs (classes) for summaries and inference
92+
results.
7693

77-
### Installation
94+
## Installation
7895
CausalELM requires Julia version 1.8 or greater and can be installed from the REPL as shown
7996
below.
8097
```julia
8198
using Pkg
8299
Pkg.add("CausalELM")
83100
```
101+
## More Information
102+
For a more interactive overview, see our JuliaCon 2024 talk[here](https://www.youtube.com/watch?v=hh_cyj8feu8&t=26s)

0 commit comments

Comments
 (0)