Skip to content

Commit

Permalink
Vasilis/docs (#370)
Browse files Browse the repository at this point in the history
* restructured modules into folders. Deprecate warning for old naming conventions.

* re-structured public module in docs

* removed automl for now from docs until import is fixed

* fixed wording in hyperparm tuning

* fixed reference to hoenst forest in docs

* added verbosity to bootstrap

* mvoed bootstrap to private
  • Loading branch information
vsyrgkanis authored Jan 19, 2021
1 parent 69fadc3 commit a27fa3c
Show file tree
Hide file tree
Showing 70 changed files with 6,513 additions and 6,130 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ To install from source, see [For Developers](#for-developers) section below.
<summary>Orthogonal Random Forests (click to expand)</summary>

```Python
from econml.ortho_forest import DMLOrthoForest, DROrthoForest
from econml.orf import DMLOrthoForest, DROrthoForest
from econml.sklearn_extensions.linear_model import WeightedLasso, WeightedLassoCV
# Use defaults
est = DMLOrthoForest()
Expand Down Expand Up @@ -233,7 +233,7 @@ To install from source, see [For Developers](#for-developers) section below.
* Linear final stage

```Python
from econml.drlearner import LinearDRLearner
from econml.dr import LinearDRLearner
from sklearn.ensemble import GradientBoostingRegressor, GradientBoostingClassifier

est = LinearDRLearner(model_propensity=GradientBoostingClassifier(),
Expand All @@ -246,7 +246,7 @@ lb, ub = est.effect_interval(X_test, alpha=0.05)
* Sparse linear final stage

```Python
from econml.drlearner import SparseLinearDRLearner
from econml.dr import SparseLinearDRLearner
from sklearn.ensemble import GradientBoostingRegressor, GradientBoostingClassifier

est = SparseLinearDRLearner(model_propensity=GradientBoostingClassifier(),
Expand All @@ -259,7 +259,7 @@ lb, ub = est.effect_interval(X_test, alpha=0.05)
* Nonparametric final stage

```Python
from econml.drlearner import ForestDRLearner
from econml.dr import ForestDRLearner
from sklearn.ensemble import GradientBoostingRegressor, GradientBoostingClassifier

est = ForestDRLearner(model_propensity=GradientBoostingClassifier(),
Expand All @@ -276,7 +276,7 @@ lb, ub = est.effect_interval(X_test, alpha=0.05)
* Intent to Treat Doubly Robust Learner (discrete instrument, discrete treatment)

```Python
from econml.ortho_iv import LinearIntentToTreatDRIV
from econml.iv.dr import LinearIntentToTreatDRIV
from sklearn.ensemble import GradientBoostingRegressor, GradientBoostingClassifier
from sklearn.linear_model import LinearRegression

Expand All @@ -295,7 +295,7 @@ lb, ub = est.effect_interval(X_test, alpha=0.05) # OLS confidence intervals

```Python
import keras
from econml.deepiv import DeepIVEstimator
from econml.iv.nnet import DeepIV

treatment_model = keras.Sequential([keras.layers.Dense(128, activation='relu', input_shape=(2,)),
keras.layers.Dropout(0.17),
Expand All @@ -310,11 +310,11 @@ response_model = keras.Sequential([keras.layers.Dense(128, activation='relu', in
keras.layers.Dense(32, activation='relu'),
keras.layers.Dropout(0.17),
keras.layers.Dense(1)])
est = DeepIVEstimator(n_components=10, # Number of gaussians in the mixture density networks)
m=lambda z, x: treatment_model(keras.layers.concatenate([z, x])), # Treatment model
h=lambda t, x: response_model(keras.layers.concatenate([t, x])), # Response model
n_samples=1 # Number of samples used to estimate the response
)
est = DeepIV(n_components=10, # Number of gaussians in the mixture density networks)
m=lambda z, x: treatment_model(keras.layers.concatenate([z, x])), # Treatment model
h=lambda t, x: response_model(keras.layers.concatenate([t, x])), # Response model
n_samples=1 # Number of samples used to estimate the response
)
est.fit(Y, T, X=X, Z=Z) # Z -> instrumental variables
treatment_effects = est.effect(X_test)
```
Expand Down
3 changes: 2 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
'sklearn': ('https://scikit-learn.org/stable/', None),
'matplotlib': ('https://matplotlib.org/', None)}
'matplotlib': ('https://matplotlib.org/', None),
'shap': ('https://shap.readthedocs.io/en/stable/', None)}

# -- Options for todo extension ----------------------------------------------

Expand Down
34 changes: 17 additions & 17 deletions doc/map.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a27fa3c

Please sign in to comment.