-
Notifications
You must be signed in to change notification settings - Fork 733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial commit for aka.ms/econml doc migration #640
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
15cf483
initial commit for aka.ms/econml doc migration
fverac f47e452
fix rst error
fverac 0fa1352
update motivating examples
fverac 1cbcee7
fix links
fverac fb71447
add intro to causal inference
fverac 561b92d
formatting
fverac 7055354
update copyright
fverac 0dc5450
finishing touches
fverac e552ba6
update gitignore
fverac 17a05b1
host images locally
fverac 35c177c
avoid buggy sphinx version
fverac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ __pycache__/ | |
*.log | ||
*.out | ||
*.synctex.gz | ||
|
||
# C extensions | ||
*.so | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ jobs: | |
foreach ($file in $editedFiles) { | ||
switch -Wildcard ($file) { | ||
"README.md" { Continue } | ||
".gitignore" { Continue } | ||
"econml/_version.py" { Continue } | ||
"prototypes/*" { Continue } | ||
"images/*" { Continue } | ||
|
@@ -70,7 +71,7 @@ jobs: | |
- script: 'pip install git+https://github.com/slundberg/shap.git@d1d2700acc0259f211934373826d5ff71ad514de' | ||
displayName: 'Install specific version of shap' | ||
|
||
- script: 'pip install sphinx sphinx_rtd_theme' | ||
- script: 'pip install sphinx!=5.1.0 sphinx_rtd_theme' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ^ |
||
displayName: 'Install sphinx' | ||
|
||
- script: 'python setup.py build_sphinx -W' | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Introduction to Causal Inference | ||
================================= | ||
|
||
If you are new to causal inference, it may be helpful to walk through a quick overview of concepts and techniques that we refer to over the course of the documentation. Below we provide a high level introduction to causal inference tailored for EconML: | ||
|
||
.. raw:: html | ||
|
||
<iframe src="../Causal-Inference-User-Guide-v4-022520.pdf" width="700" height="388"> </iframe> | ||
|
||
The folks at DoWhy also have a broader introduction `here <https://causalinference.gitlab.io/kdd-tutorial/>`__. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
Frequently Asked Questions (FAQ) | ||
==================================================================== | ||
|
||
When should I use EconML? | ||
-------------------------- | ||
|
||
EconML is designed to answer causal questions: what will happen in response to some change in behavior, | ||
prices, or conditions? These questions require different methods than forecasting questions: | ||
what will happen next if everything continues as it has been? | ||
|
||
|
||
What are the advantages of EconML? | ||
----------------------------------- | ||
|
||
EconML offers the broadest range of cutting-edge AI models designed specifically to answer causal questions. | ||
The EconML models also build on familiar Python packages, allowing users to easily select the best model for their question. | ||
Finally, EconML includes custom interpreters to create presentation-ready output. | ||
|
||
|
||
How do I know if the results make sense? | ||
---------------------------------------- | ||
|
||
Try comparing the consistency of your estimates across multiple models, including some that make | ||
stronger structural assumptions like linear relationships and some that do not. Pay attention to the | ||
standard errors as well as the point estimates—imprecise estimates should be interpreted accordingly. | ||
While researchers can introduce bias by narrowly fishing for estimates that match their prior, it is also important | ||
to use your expertise to evaluate results. If you estimate that a 5% decrease in price generates | ||
an implausible 5000% increase in sales you should carefully review your code! | ||
|
||
I'm getting causal estimates that don't make sense. What next? | ||
---------------------------------------------------------------- | ||
First carefully check your code for errors and try several causal models. | ||
If your estimates are consistent, but implausible, you may have a confounding variable that hasn’t been measured in your data. | ||
Think carefully about the source of the data you are using: was there something unusual going on | ||
during the period when the data were collected (for example a holiday or an economic downturn)? | ||
Is there something unusual about your sample (for example, all men with pre-existing heart conditions)? | ||
|
||
|
||
What if I don't have a good instrument, can't run an experiment, and don't observe all confounders? | ||
------------------------------------------------------------------------------------------------------------ | ||
In this case, no statistical approach can perfectly isolate the causal effect of the treatment on the outcome. | ||
DML, OrthoForest, or MetaLearners, all including all the confounders you can observe, | ||
will deliver the best approximation of the causal effect that minimizes the bias from confounders. | ||
Be aware of some remaining bias when using these estimates. | ||
|
||
|
||
How can I test whether I'm identifying the causal effect? | ||
------------------------------------------------------------ | ||
You are identifying a valid causal effect if and only if the underlying assumptions of the causal model | ||
assumed by the estimation routine are correct. Those are often hard to test (though the `DoWhy <https://py-why.github.io/dowhy/>`__ package may help). | ||
Having made those assumptions, the EconML package allows you to fit the best causal model you can. | ||
Many models will store a final stage fit metric that can be used to validate how well the causal model predicts out of sample, | ||
which is a good diagnostic as to the quality of your model. | ||
|
||
|
||
How do I give feedback? | ||
------------------------------------ | ||
|
||
This project welcomes contributions and suggestions. Most contributions require you to agree to | ||
a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, | ||
grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. | ||
|
||
|
||
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide | ||
a CLA and decorate the PR appropriately (e.g., label, comment). | ||
Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. | ||
|
||
|
||
This project has adopted the Microsoft Open Source Code of Conduct. | ||
For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Overview | ||
========= | ||
|
||
EconML is a Python package that applies the power of machine learning techniques to estimate individualized causal responses from observational or experimental data. The suite of estimation methods provided in EconML represents the latest advances in causal machine learning. By incorporating individual machine learning steps into interpretable causal models, these methods improve the reliability of what-if predictions and make causal analysis quicker and easier for a broad set of users. | ||
|
||
EconML is open source software developed by the `ALICE <https://www.microsoft.com/en-us/research/project/alice/>`__ team at Microsoft Research. | ||
|
||
.. raw:: html | ||
|
||
<p></p> | ||
<div class="ms-grid " style = "text-align: left; box-sizing: border-box; display: block; margin-left: auto; margin-right: auto; max-width: 1600px; position: relative; padding-left: 0; padding-right: 0; width: 100%;"> | ||
<div class="ms-row" style = "text-align: left; box-sizing: border-box; -webkit-box-align: stretch; align-items: stretch; display: flex; flex-wrap: wrap; margin-left: 3px; margin-right: 3px;"> | ||
<div class="m-col-8-24 x-hidden-focus" style = "text-align: left; box-sizing: border-box; float: left; margin: 0; padding-left: 1vw; padding-right: 1vw; position: relative; width: 33.33333%;"> | ||
<p style="text-align:center;"><img loading="lazy" class="size-full wp-image-656358 aligncenter x-hidden-focus" src="../imgFlexible.png" alt="Flexible icon" width="92" height="92"></p><p style="text-align: center"><b>Flexible</b></p><p class="x-hidden-focus">Allows for flexible model forms that do not impose strong assumptions, including models of heterogenous responses to treatment.</p><p> </p></div> | ||
<div class="m-col-8-24" style = "text-align: left; box-sizing: border-box; float: left; margin: 0; padding-left: 1vw; padding-right: 1vw; position: relative; width: 33.33333%;"> | ||
<p style="text-align:center;"><img loading="lazy" class="size-full wp-image-656355 aligncenter" src="../imgUnified.png" alt="Unified icon" width="92" height="92"></p><p style="text-align: center"><b>Unified</b></p><p>Broad set of methods representing latest advances in the econometrics and machine learning literature within a unified API.</p><p> </p></div> | ||
<div class="m-col-8-24" style = "text-align: left; box-sizing: border-box; float: left; margin: 0; padding-left: 1vw; padding-right: 1vw; position: relative; width: 33.33333%;"> | ||
<p style="text-align:center;"><img loading="lazy" class="size-full wp-image-656352 aligncenter" src="../imgFamiliar.png" alt="Familiar icon" width="92" height="92"></p><p style="text-align: center"><b>Familiar Interface</b></p><p class="x-hidden-focus">Built on standard Python packages for machine learning and data analysis.</p><p> </p></div> | ||
<p></p> </div> | ||
</div> | ||
|
||
**Why causality?** | ||
|
||
Decision-makers need estimates of causal impacts to answer what-if questions about shifts in policy - such as changes in product pricing for businesses or new treatments for health professionals. | ||
|
||
**Why not just a vanilla machine learning solution?** | ||
|
||
Most current machine learning tools are designed to forecast what will happen next under the present strategy, but cannot be interpreted to predict the effects of particular changes in behavior. | ||
|
||
**Why causal machine learning/EconML?** | ||
|
||
Existing solutions to answer what-if questions are expensive. Decision-makers can engage in active experimentation like A/B testing or employ highly trained economists who use traditional statistical models to infer causal effects from previously collected data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is fine.
If you need to make any further changes to this PR, you might consider also changing azure-pipelines.yml to exempt .gitignore changes so that you don't have to run the full set of checks, since all of your other changes are in the doc subdirectory.