Skip to content

Commit

Permalink
minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
amaiya committed Jul 20, 2021
1 parent 9fb901e commit 82022cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ <h2 id="What-is-the-causal-impact-of-having-a-PhD-on-making-over-$50K?">What is

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="What-is-the-causal-impact-of-a-job-training-program-on-earnings?">What is the causal impact of a job training program on earnings?<a class="anchor-link" href="#What-is-the-causal-impact-of-a-job-training-program-on-earnings?"> </a></h2><p>This is another example of causal inference on purely tabular data (no text). Here, we will use the famous LaLonde dataset from a <a href="http://sekhon.berkeley.edu/matching/lalonde.html">job training study</a>.</p>
<h2 id="What-is-the-causal-impact-of-a-job-training-program-on-earnings?">What is the causal impact of a job training program on earnings?<a class="anchor-link" href="#What-is-the-causal-impact-of-a-job-training-program-on-earnings?"> </a></h2><p>This is another example of causal inference on purely tabular data (no text). Here, we will use the famous <a href="https://rdrr.io/cran/sbw/man/lalonde.html">LaLonde dataset</a> from a job training study.</p>

</div>
</div>
Expand Down Expand Up @@ -1205,7 +1205,7 @@ <h2 id="What-is-the-causal-impact-of-a-job-training-program-on-earnings?">What i

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Unlike other meta-learners that use LightGBM as a default, the S-Learner uses Linear Regression as the base learner for regression problems, which is a model that is often used for this dataset. The ATE estimate is $1548, which indicates that the job training program had an overall positive effect.</p>
<p>Unlike other meta-learners that use LightGBM as a default, the S-Learner uses Linear Regression as the default base learner for regression problems, which is a model that is often used for this dataset. The ATE estimate is $1548, which indicates that the job training program had an overall positive effect.</p>

</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/meta.utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ <h4 id="gini" class="doc_header"><code>gini</code><a href="https://github.com/am


<div class="output_markdown rendered_html output_subarea ">
<h4 id="regression_metrics" class="doc_header"><code>regression_metrics</code><a href="https://github.com/amaiya/causalnlp/tree/main/causalnlp/meta/utils.py#L235" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>regression_metrics</code>(<strong><code>y</code></strong>, <strong><code>p</code></strong>, <strong><code>w</code></strong>=<em><code>None</code></em>, <strong><code>metrics</code></strong>=<em><code>{'RMSE': &lt;function rmse at 0x7f1457ee4598&gt;, 'sMAPE': &lt;function smape at 0x7f1457ee4510&gt;, 'Gini': &lt;function gini at 0x7f1457ee4620&gt;}</code></em>)</p>
<h4 id="regression_metrics" class="doc_header"><code>regression_metrics</code><a href="https://github.com/amaiya/causalnlp/tree/main/causalnlp/meta/utils.py#L235" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>regression_metrics</code>(<strong><code>y</code></strong>, <strong><code>p</code></strong>, <strong><code>w</code></strong>=<em><code>None</code></em>, <strong><code>metrics</code></strong>=<em><code>{'RMSE': &lt;function rmse at 0x7f94846f2598&gt;, 'sMAPE': &lt;function smape at 0x7f94846f2510&gt;, 'Gini': &lt;function gini at 0x7f94846f2620&gt;}</code></em>)</p>
</blockquote>
<p>Log metrics for regressors.</p>
<p>Args:
Expand Down Expand Up @@ -424,7 +424,7 @@ <h4 id="logloss" class="doc_header"><code>logloss</code><a href="https://github.


<div class="output_markdown rendered_html output_subarea ">
<h4 id="classification_metrics" class="doc_header"><code>classification_metrics</code><a href="https://github.com/amaiya/causalnlp/tree/main/causalnlp/meta/utils.py#L279" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>classification_metrics</code>(<strong><code>y</code></strong>, <strong><code>p</code></strong>, <strong><code>w</code></strong>=<em><code>None</code></em>, <strong><code>metrics</code></strong>=<em><code>{'AUC': &lt;function roc_auc_score at 0x7f1476e71a60&gt;, 'Log Loss': &lt;function logloss at 0x7f1457ee4730&gt;}</code></em>)</p>
<h4 id="classification_metrics" class="doc_header"><code>classification_metrics</code><a href="https://github.com/amaiya/causalnlp/tree/main/causalnlp/meta/utils.py#L279" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>classification_metrics</code>(<strong><code>y</code></strong>, <strong><code>p</code></strong>, <strong><code>w</code></strong>=<em><code>None</code></em>, <strong><code>metrics</code></strong>=<em><code>{'AUC': &lt;function roc_auc_score at 0x7f94a3681a60&gt;, 'Log Loss': &lt;function logloss at 0x7f94846f2730&gt;}</code></em>)</p>
</blockquote>
<p>Log metrics for classifiers.</p>
<p>Args:
Expand Down Expand Up @@ -566,7 +566,7 @@ <h2 id="NearestNeighborMatch" class="doc_header"><code>class</code> <code>Neares


<div class="output_markdown rendered_html output_subarea ">
<h2 id="MatchOptimizer" class="doc_header"><code>class</code> <code>MatchOptimizer</code><a href="https://github.com/amaiya/causalnlp/tree/main/causalnlp/meta/utils.py#L501" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>MatchOptimizer</code>(<strong><code>treatment_col</code></strong>=<em><code>'is_treatment'</code></em>, <strong><code>ps_col</code></strong>=<em><code>'pihat'</code></em>, <strong><code>user_col</code></strong>=<em><code>None</code></em>, <strong><code>matching_covariates</code></strong>=<em><code>['pihat']</code></em>, <strong><code>max_smd</code></strong>=<em><code>0.1</code></em>, <strong><code>max_deviation</code></strong>=<em><code>0.1</code></em>, <strong><code>caliper_range</code></strong>=<em><code>(0.01, 0.5)</code></em>, <strong><code>max_pihat_range</code></strong>=<em><code>(0.95, 0.999)</code></em>, <strong><code>max_iter_per_param</code></strong>=<em><code>5</code></em>, <strong><code>min_users_per_group</code></strong>=<em><code>1000</code></em>, <strong><code>smd_cols</code></strong>=<em><code>['pihat']</code></em>, <strong><code>dev_cols_transformations</code></strong>=<em><code>{'pihat': &lt;function mean at 0x7f15f80dee18&gt;}</code></em>, <strong><code>dev_factor</code></strong>=<em><code>1.0</code></em>, <strong><code>verbose</code></strong>=<em><code>True</code></em>)</p>
<h2 id="MatchOptimizer" class="doc_header"><code>class</code> <code>MatchOptimizer</code><a href="https://github.com/amaiya/causalnlp/tree/main/causalnlp/meta/utils.py#L501" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>MatchOptimizer</code>(<strong><code>treatment_col</code></strong>=<em><code>'is_treatment'</code></em>, <strong><code>ps_col</code></strong>=<em><code>'pihat'</code></em>, <strong><code>user_col</code></strong>=<em><code>None</code></em>, <strong><code>matching_covariates</code></strong>=<em><code>['pihat']</code></em>, <strong><code>max_smd</code></strong>=<em><code>0.1</code></em>, <strong><code>max_deviation</code></strong>=<em><code>0.1</code></em>, <strong><code>caliper_range</code></strong>=<em><code>(0.01, 0.5)</code></em>, <strong><code>max_pihat_range</code></strong>=<em><code>(0.95, 0.999)</code></em>, <strong><code>max_iter_per_param</code></strong>=<em><code>5</code></em>, <strong><code>min_users_per_group</code></strong>=<em><code>1000</code></em>, <strong><code>smd_cols</code></strong>=<em><code>['pihat']</code></em>, <strong><code>dev_cols_transformations</code></strong>=<em><code>{'pihat': &lt;function mean at 0x7f9624110e18&gt;}</code></em>, <strong><code>dev_factor</code></strong>=<em><code>1.0</code></em>, <strong><code>verbose</code></strong>=<em><code>True</code></em>)</p>
</blockquote>

</div>
Expand Down
4 changes: 2 additions & 2 deletions nbs/99_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@
"source": [
" ## What is the causal impact of a job training program on earnings?\n",
" \n",
" This is another example of causal inference on purely tabular data (no text). Here, we will use the famous LaLonde dataset from a [job training study](http://sekhon.berkeley.edu/matching/lalonde.html)."
" This is another example of causal inference on purely tabular data (no text). Here, we will use the famous [LaLonde dataset](https://rdrr.io/cran/sbw/man/lalonde.html) from a job training study."
]
},
{
Expand Down Expand Up @@ -1136,7 +1136,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Unlike other meta-learners that use LightGBM as a default, the S-Learner uses Linear Regression as the base learner for regression problems, which is a model that is often used for this dataset. The ATE estimate is $1548, which indicates that the job training program had an overall positive effect."
"Unlike other meta-learners that use LightGBM as a default, the S-Learner uses Linear Regression as the default base learner for regression problems, which is a model that is often used for this dataset. The ATE estimate is $1548, which indicates that the job training program had an overall positive effect."
]
},
{
Expand Down

0 comments on commit 82022cf

Please sign in to comment.