Skip to content

Commit deb47c2

Browse files
committed
Remove DeepIV
Signed-off-by: Keith Battocchi <kebatt@microsoft.com>
1 parent 3dabded commit deb47c2

File tree

14 files changed

+8
-1642
lines changed

14 files changed

+8
-1642
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
kind: [except-customer-scenarios, customer-scenarios]
119119
include:
120120
- kind: "except-customer-scenarios"
121-
extras: "[tf,plt,ray]"
121+
extras: "[plt,ray]"
122122
pattern: "(?!CustomerScenarios)"
123123
install_graphviz: true
124124
version: '3.8' # no supported version of tensorflow for 3.9
@@ -226,16 +226,16 @@ jobs:
226226
extras: ""
227227
- kind: other
228228
opts: '-m "cate_api and not ray" -n auto'
229-
extras: "[tf,plt]"
229+
extras: "[plt]"
230230
- kind: dml
231231
opts: '-m "dml and not ray"'
232-
extras: "[tf,plt]"
232+
extras: "[plt]"
233233
- kind: main
234234
opts: '-m "not (notebook or automl or dml or serial or cate_api or treatment_featurization or ray)" -n 2'
235-
extras: "[tf,plt,dowhy]"
235+
extras: "[plt,dowhy]"
236236
- kind: treatment
237237
opts: '-m "treatment_featurization and not ray" -n auto'
238-
extras: "[tf,plt]"
238+
extras: "[plt]"
239239
- kind: ray
240240
opts: '-m "ray"'
241241
extras: "[ray]"
@@ -308,13 +308,13 @@ jobs:
308308
kind: [tests]
309309
os: [ubuntu-latest, windows-latest, macos-latest]
310310
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
311-
extras: ["[tf,plt,dowhy,ray]"]
311+
extras: ["[plt,dowhy,ray]"]
312312
include:
313313
# explicitly add the two notebook extras
314314
- kind: notebooks
315315
os: ubuntu-latest
316316
python-version: '3.8'
317-
extras: "[tf,plt,ray]"
317+
extras: "[plt,ray]"
318318
- kind: notebooks
319319
os: ubuntu-latest
320320
python-version: '3.9'

README.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -415,36 +415,6 @@ lb, ub = est.effect_interval(X_test, alpha=0.05) # OLS confidence intervals
415415
```
416416
</details>
417417

418-
<details>
419-
<summary>Deep Instrumental Variables (click to expand)</summary>
420-
421-
```Python
422-
import keras
423-
from econml.iv.nnet import DeepIV
424-
425-
treatment_model = keras.Sequential([keras.layers.Dense(128, activation='relu', input_shape=(2,)),
426-
keras.layers.Dropout(0.17),
427-
keras.layers.Dense(64, activation='relu'),
428-
keras.layers.Dropout(0.17),
429-
keras.layers.Dense(32, activation='relu'),
430-
keras.layers.Dropout(0.17)])
431-
response_model = keras.Sequential([keras.layers.Dense(128, activation='relu', input_shape=(2,)),
432-
keras.layers.Dropout(0.17),
433-
keras.layers.Dense(64, activation='relu'),
434-
keras.layers.Dropout(0.17),
435-
keras.layers.Dense(32, activation='relu'),
436-
keras.layers.Dropout(0.17),
437-
keras.layers.Dense(1)])
438-
est = DeepIV(n_components=10, # Number of gaussians in the mixture density networks)
439-
m=lambda z, x: treatment_model(keras.layers.concatenate([z, x])), # Treatment model
440-
h=lambda t, x: response_model(keras.layers.concatenate([t, x])), # Response model
441-
n_samples=1 # Number of samples used to estimate the response
442-
)
443-
est.fit(Y, T, X=X, Z=Z) # Z -> instrumental variables
444-
treatment_effects = est.effect(X_test)
445-
```
446-
</details>
447-
448418
See the <a href="#references">References</a> section for more details.
449419

450420
### Interpretability

doc/map.svg

Lines changed: 0 additions & 4 deletions
Loading

doc/reference.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,6 @@ Doubly Robust (DR) IV
8686
econml.iv.dr.IntentToTreatDRIV
8787
econml.iv.dr.LinearIntentToTreatDRIV
8888

89-
.. _deepiv_api:
90-
91-
DeepIV
92-
^^^^^^
93-
94-
.. autosummary::
95-
:toctree: _autosummary
96-
97-
econml.iv.nnet.DeepIV
98-
9989
.. _tsls_api:
10090

10191
Sieve Methods

doc/spec/comparison.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Detailed estimator comparison
99
+=============================================+==============+==============+==================+=============+=================+============+==============+====================+
1010
| :class:`.SieveTSLS` | Any | Yes | | Yes | Assumed | Yes | Yes | |
1111
+---------------------------------------------+--------------+--------------+------------------+-------------+-----------------+------------+--------------+--------------------+
12-
| :class:`.DeepIV` | Any | Yes | | | | Yes | Yes | |
13-
+---------------------------------------------+--------------+--------------+------------------+-------------+-----------------+------------+--------------+--------------------+
1412
| :class:`.SparseLinearDML` | Any | | Yes | Yes | Assumed | Yes | Yes | Yes |
1513
+---------------------------------------------+--------------+--------------+------------------+-------------+-----------------+------------+--------------+--------------------+
1614
| :class:`.SparseLinearDRLearner` | Categorical | | Yes | | Projected | | Yes | Yes |

doc/spec/estimation/deepiv.rst

Lines changed: 0 additions & 86 deletions
This file was deleted.

doc/spec/estimation_iv.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ of [Newey2003]_.
1414
.. toctree::
1515
:maxdepth: 2
1616

17-
estimation/deepiv.rst
1817
estimation/two_sls.rst
1918
estimation/orthoiv.rst

econml/iv/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright (c) PyWhy contributors. All rights reserved.
22
# Licensed under the MIT License.
33

4-
__all__ = ["dml", "dr", "nnet", "sieve"]
4+
__all__ = ["dml", "dr", "sieve"]

econml/iv/nnet/__init__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)