Skip to content

Commit 6219695

Browse files
authored
typo fixes (#864)
Signed-off-by: Alex Malins <[email protected]>
1 parent 6cc5b23 commit 6219695

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

doc/spec/comparison.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Detailed estimator comparison
44

55

66
+---------------------------------------------+--------------+--------------+------------------+-------------+-----------------+------------+--------------+--------------------+
7-
| Estimator | | Treatment | | Requires | | Delivers Conf. | | Linear | | Linear | | Mulitple | | Multiple | | High-Dimensional |
7+
| Estimator | | Treatment | | Requires | | Delivers Conf. | | Linear | | Linear | | Multiple | | Multiple | | High-Dimensional |
88
| | | Type | | Instrument | | Intervals | | Treatment | | Heterogeneity | | Outcomes | | Treatments | | Features |
99
+=============================================+==============+==============+==================+=============+=================+============+==============+====================+
1010
| :class:`.SieveTSLS` | Any | Yes | | Yes | Assumed | Yes | Yes | |

doc/spec/estimation/dml.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Most of the methods provided make a parametric form assumption on the heterogene
7272
linear on some pre-defined; potentially high-dimensional; featurization). These methods include:
7373
:class:`.DML`, :class:`.LinearDML`,
7474
:class:`.SparseLinearDML`, :class:`.KernelDML`.
75-
For fullly non-parametric heterogeneous treatment effect models, check out the :class:`.NonParamDML`
75+
For fully non-parametric heterogeneous treatment effect models, check out the :class:`.NonParamDML`
7676
and the :class:`.CausalForestDML`.
7777
For more options of non-parametric CATE estimators,
7878
check out the :ref:`Forest Estimators User Guide <orthoforestuserguide>`
@@ -165,7 +165,7 @@ structure of the implemented CATE estimators is as follows.
165165
Below we give a brief description of each of these classes:
166166

167167
* **DML.** The class :class:`.DML` assumes that the effect model for each outcome :math:`i` and treatment :math:`j` is linear, i.e. takes the form :math:`\theta_{ij}(X)=\langle \theta_{ij}, \phi(X)\rangle`, and allows for any arbitrary scikit-learn linear estimator to be defined as the final stage (e.g.
168-
:class:`~sklearn.linear_model.ElasticNet`, :class:`~sklearn.linear_model.Lasso`, :class:`~sklearn.linear_model.LinearRegression` and their multi-task variations in the case where we have mulitple outcomes, i.e. :math:`Y` is a vector). The final linear model will be fitted on features that are derived by the Kronecker-product
168+
:class:`~sklearn.linear_model.ElasticNet`, :class:`~sklearn.linear_model.Lasso`, :class:`~sklearn.linear_model.LinearRegression` and their multi-task variations in the case where we have multiple outcomes, i.e. :math:`Y` is a vector). The final linear model will be fitted on features that are derived by the Kronecker-product
169169
of the vectors :math:`T` and :math:`\phi(X)`, i.e. :math:`\tilde{T}\otimes \phi(X) = \mathtt{vec}(\tilde{T}\cdot \phi(X)^T)`. This regression will estimate the coefficients :math:`\theta_{ijk}`
170170
for each outcome :math:`i`, treatment :math:`j` and feature :math:`k`. The final model is minimizing a regularized empirical square loss of the form:
171171

@@ -239,7 +239,7 @@ Below we give a brief description of each of these classes:
239239
[Nie2017]_. It approximates any function in the RKHS by creating random Fourier features. Then runs a ElasticNet
240240
regularized final model. Thus it approximately implements the results of [Nie2017], via the random fourier feature
241241
approximate representation of functions in the RKHS. Moreover, given that we use Random Fourier Features this class
242-
asssumes an RBF kernel.
242+
assumes an RBF kernel.
243243

244244
* **NonParamDML.** The class :class:`.NonParamDML` makes no assumption on the effect model for each outcome :math:`i`.
245245
However, it applies only when the treatment is either binary or single-dimensional continuous. It uses the observation that for a single
@@ -350,7 +350,7 @@ Usage FAQs
350350
it does so in a manner that is robust to the estimation mistakes that these ML algorithms
351351
might be making.
352352

353-
Moreover, one may typically want to estimate treatment effect hetergoeneity,
353+
Moreover, one may typically want to estimate treatment effect heterogeneity,
354354
which the above OLS approach wouldn't provide. One potential way of providing such heterogeneity
355355
is to include product features of the form :math:`X\cdot T` in the OLS model. However, then
356356
one faces again the same problems as above:
@@ -564,7 +564,7 @@ Usage FAQs
564564
- **How can I assess the performance of the CATE model?**
565565

566566
Each of the DML classes have an attribute `score_` after they are fitted. So one can access that
567-
attribute and compare the performance accross different modeling parameters (lower score is better):
567+
attribute and compare the performance across different modeling parameters (lower score is better):
568568

569569
.. testcode::
570570

doc/spec/estimation/dr.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ Usage FAQs
472472
- **How can I assess the performance of the CATE model?**
473473

474474
Each of the DRLearner classes have an attribute `score_` after they are fitted. So one can access that
475-
attribute and compare the performance accross different modeling parameters (lower score is better):
475+
attribute and compare the performance across different modeling parameters (lower score is better):
476476

477477
.. testcode::
478478

doc/spec/estimation/forest.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ Then the criterion implicit in the reduction is the weighted mean squared error,
257257
where :math:`Var_n`, denotes the empirical variance. Essentially, this criterion tries to maximize heterogeneity
258258
(as captured by maximizing the sum of squares of the two estimates), while penalizing splits that create nodes
259259
with small variation in the treatment. On the contrary the criterion proposed in [Athey2019]_ ignores the within
260-
child variation of the treatment and solely maximizes the hetergoeneity, i.e.
260+
child variation of the treatment and solely maximizes the heterogeneity, i.e.
261261

262262
.. math::
263263

doc/spec/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ How do I give feedback?
5757
------------------------------------
5858

5959
This project welcomes contributions and suggestions. We use the `DCO bot <https://github.com/apps/dco>`_ to enforce a
60-
`Developer Certificate of Origin <https://developercertificate.org/>` which requires users to sign-off on their commits.
60+
`Developer Certificate of Origin <https://developercertificate.org/>`_ which requires users to sign-off on their commits.
6161
This is a simple way to certify that you wrote or otherwise have the right to submit the code you are contributing to
6262
the project. Git provides a :code:`-s` command line option to include this automatically when you commit via :code:`git commit`.
6363

doc/spec/interpretability.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ models using the Shapley values methodology (see e.g. [Lundberg2017]_).
7373
Similar to how black-box predictive machine learning models can be explained with SHAP, we can also explain black-box effect
7474
heterogeneity models. This approach provides an explanation as to why a heterogeneous causal effect model produced larger or
7575
smaller effect values for particular segments of the population. Which were the features that lead to such differentiation?
76-
This question is easy to address when the model is succinctly described, such as the case of linear heterogneity models,
76+
This question is easy to address when the model is succinctly described, such as the case of linear heterogeneity models,
7777
where one can simply investigate the coefficients of the model. However, it becomes hard when one starts using more expressive
78-
models, such as Random Forests and Causal Forests to model effect hetergoeneity. SHAP values can be of immense help to
79-
understand the leading factors of effect hetergoeneity that the model picked up from the training data.
78+
models, such as Random Forests and Causal Forests to model effect heterogeneity. SHAP values can be of immense help to
79+
understand the leading factors of effect heterogeneity that the model picked up from the training data.
8080

8181
Our package offers seamless integration with the SHAP library. Every CATE estimator has a method `shap_values`, which returns the
8282
SHAP value explanation of the estimators output for every treatment and outcome pair. These values can then be visualized with
@@ -92,8 +92,8 @@ For instance:
9292
est = LinearDML()
9393
est.fit(y, t, X=X, W=W)
9494
shap_values = est.shap_values(X)
95-
# local view: explain hetergoeneity for a given observation
95+
# local view: explain heterogeneity for a given observation
9696
ind=0
9797
shap.plots.force(shap_values["Y0"]["T0"][ind], matplotlib=True)
98-
# global view: explain hetergoeneity for a sample of dataset
98+
# global view: explain heterogeneity for a sample of dataset
9999
shap.summary_plot(shap_values['Y0']['T0'])

econml/solutions/causal_analysis/_causal_analysis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ def plot_heterogeneity_tree(self, Xtest, feature_index, *,
15461546
include_model_uncertainty=False,
15471547
alpha=0.05):
15481548
"""
1549-
Plot an effect hetergoeneity tree using matplotlib.
1549+
Plot an effect heterogeneity tree using matplotlib.
15501550
15511551
Parameters
15521552
----------

notebooks/Double Machine Learning Examples.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@
927927
"source": [
928928
"### 2.4 Interpretability with SHAP Values\n",
929929
"\n",
930-
"Explain the hetergoeneity model for the constant marginal effect of the treatment using <a href=\"https://shap.readthedocs.io/en/latest/\">SHAP values</a>."
930+
"Explain the heterogeneity model for the constant marginal effect of the treatment using <a href=\"https://shap.readthedocs.io/en/latest/\">SHAP values</a>."
931931
]
932932
},
933933
{

notebooks/Interpretability with SHAP.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"\n",
2424
"[SHAP](https://shap.readthedocs.io/en/latest/) is a popular open source library for interpreting black-box machine learning models using the [Shapley values methodology](https://proceedings.neurips.cc/paper/2017/hash/8a20a8621978632d76c43dfd28b67767-Abstract.html).\n",
2525
"\n",
26-
"Similar to how black-box predictive machine learning models can be explained with SHAP, we can also explain black-box effect heterogeneity models. This approach provides an explanation as to why a heterogeneous causal effect model produced larger or smaller effect values for particular segments of the population. Which were the features that lead to such differentiation? This question is easy to address when the model is succinctly described, such as the case of linear heterogneity models, where one can simply investigate the coefficients of the model. However, it becomes hard when one starts using more expressive models, such as Random Forests and Causal Forests to model effect hetergoeneity. SHAP values can be of immense help to understand the leading factors of effect hetergoeneity that the model picked up from the training data.\n",
26+
"Similar to how black-box predictive machine learning models can be explained with SHAP, we can also explain black-box effect heterogeneity models. This approach provides an explanation as to why a heterogeneous causal effect model produced larger or smaller effect values for particular segments of the population. Which were the features that lead to such differentiation? This question is easy to address when the model is succinctly described, such as the case of linear heterogeneity models, where one can simply investigate the coefficients of the model. However, it becomes hard when one starts using more expressive models, such as Random Forests and Causal Forests to model effect heterogeneity. SHAP values can be of immense help to understand the leading factors of effect heterogeneity that the model picked up from the training data.\n",
2727
"\n",
2828
"Our package offers seamless integration with the SHAP library. Every `CateEstimator` has a method `shap_values`, which returns the SHAP value explanation of the estimators output for every treatment and outcome pair. These values can then be visualized with the plethora of visualizations that the SHAP library offers. Moreover, whenever possible our library invokes fast specialized algorithms from the SHAP library, for each type of final model, which can greatly reduce computation times.\n",
2929
"\n",

0 commit comments

Comments
 (0)