Skip to content

Commit

Permalink
cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
ronikobrosly committed May 18, 2020
1 parent 993efdf commit 1de6a0c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions causal_curve/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from statsmodels.genmod.generalized_linear_model import DomainWarning

from causal_curve.gps import GPS as GPS
from causal_curve.tmle import TMLE as TMLE
from causal_curve.gps import GPS
from causal_curve.tmle import TMLE


# Suppress statsmodel warning for gamma family GLM
Expand Down
10 changes: 6 additions & 4 deletions causal_curve/gps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=bad-continuation
"""
Defines the Generalized Prospensity Score (GPS) model class
"""
Expand Down Expand Up @@ -53,9 +54,9 @@ class GPS(Core):
Takes the treatment, and creates a quantile-based grid across its values.
For instance, if the number 6 is selected, this means the algorithm will only take
the 6 treatment variable values at approximately the 0, 20, 40, 60, 80, and 100th
percentiles to estimate the causal dose response curve. Higher value here means the final curve
will be more finely estimated, but also increases computation time.
Default is usually a reasonable number.
percentiles to estimate the causal dose response curve.
Higher value here means the final curve will be more finely estimated,
but also increases computation time. Default is usually a reasonable number.
lower_grid_constraint: float, optional(default = 0.01)
This adds an optional constraint of the lower side of the treatment grid.
Expand Down Expand Up @@ -360,7 +361,8 @@ def _validate_fit_data(self):
for column in self.X:
if not is_numeric_dtype(self.X[column]):
raise TypeError(
f"All covariate (X) columns must be int or float type (i.e. must be numeric)"
f"All covariate (X) columns must be int or float type \
(i.e. must be numeric)"
)

# Checks for Y column
Expand Down
1 change: 1 addition & 0 deletions causal_curve/tmle.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=bad-continuation
"""
Defines the Targetted Maximum likelihood Estimation (TMLE) model class
"""
Expand Down

0 comments on commit 1de6a0c

Please sign in to comment.