Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
farismosman authored Apr 28, 2019
2 parents 85262c2 + 33a3848 commit 436c06a
Show file tree
Hide file tree
Showing 9 changed files with 2,306 additions and 2,205 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,13 @@ venv.bak/
# PyCharm
.idea/

# pipenv files
Pipfile
Pipfile.lock

# Output CSV files
examples/CATE_for_Train.csv
examples/CATE_for_Test.csv

# vscode
.vscode/
.vscode/
2 changes: 1 addition & 1 deletion causallift/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
from .estimate_propensity import estimate_propensity
from .causal_lift import CausalLift

__version__='0.0.1'
__version__='0.0.2'
2 changes: 2 additions & 0 deletions causallift/causal_lift.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
""" causal_lift.py """

from IPython.display import display

from .utils import (get_cols_features,
concat_train_test,
concat_train_test_df,
Expand Down
1 change: 1 addition & 0 deletions causallift/estimate_propensity.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
""" estimate_propensity.py """

from IPython.display import display
from .utils import (get_cols_features,
concat_train_test,
concat_train_test_df,
Expand Down
4 changes: 3 additions & 1 deletion causallift/model_for_each.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
""" model_for_each.py """
""" 2 supervised models """

from IPython.display import display

from .utils import (get_cols_features,
concat_train_test,
concat_train_test_df,
Expand Down Expand Up @@ -73,7 +75,7 @@ def __init__(self,
(1 / propensity) if treatment_val == 1.0 else (1 / (1 - propensity))
else:
# do not use sample weight
sample_weight = 1.0
sample_weight = np.ones_like(y_train, dtype=float)

if params is None:
params = {
Expand Down
Loading

0 comments on commit 436c06a

Please sign in to comment.