Skip to content

Commit

Permalink
Feature/v6l4188 (#35)
Browse files Browse the repository at this point in the history
* fixed docstrings, bumped version

* fixed bug where classes weren't using custom inputs

* fixed random_seed bug

Co-authored-by: rkobrosly <[email protected]>
  • Loading branch information
ronikobrosly and rkobrosly authored Jan 17, 2021
1 parent 0610924 commit 3807bc0
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 6 deletions.
4 changes: 3 additions & 1 deletion causal_curve/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ class Core:
"""Base class for causal_curve module"""

def __init__(self):
__version__ = "1.0.2"
pass

__version__ = "1.0.3"

def get_params(self):
"""Returns a dict of all of the object's user-facing parameters
Expand Down
3 changes: 3 additions & 0 deletions causal_curve/gps_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ def fit(self, T, X, y):
self : object
"""
self.rand_seed_wrapper(self.random_seed)

self.T = T.reset_index(drop=True, inplace=False)
self.X = X.reset_index(drop=True, inplace=False)
self.y = y.reset_index(drop=True, inplace=False)
Expand Down Expand Up @@ -481,6 +483,7 @@ def calculate_CDRC(self, ci=0.95):
self: object
"""
self.rand_seed_wrapper(self.random_seed)
self._validate_calculate_CDRC_params(ci)

self.if_verbose_print(
Expand Down
3 changes: 3 additions & 0 deletions causal_curve/mediation.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ def fit(self, T, M, y):
self : object
"""
self.rand_seed_wrapper(self.random_seed)

self.T = T.reset_index(drop=True, inplace=False)
self.M = M.reset_index(drop=True, inplace=False)
self.y = y.reset_index(drop=True, inplace=False)
Expand Down Expand Up @@ -445,6 +447,7 @@ def calculate_mediation(self, ci=0.95):
self : object
"""
self.rand_seed_wrapper(self.random_seed)

# Collect effect results in these lists
self.t_bin_means = self._collect_mean_t_levels()
Expand Down
4 changes: 4 additions & 0 deletions causal_curve/tmle_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ def fit(self, T, X, y):
self : object
"""
self.rand_seed_wrapper(self.random_seed)

self.t_data = T.reset_index(drop=True, inplace=False)
self.x_data = X.reset_index(drop=True, inplace=False)
self.y_data = y.reset_index(drop=True, inplace=False)
Expand Down Expand Up @@ -407,6 +409,8 @@ def calculate_CDRC(self, ci=0.95):
self: object
"""
self.rand_seed_wrapper(self.random_seed)

self._validate_calculate_CDRC_params(ci)

self.if_verbose_print("""
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Change Log
==========


Version 1.0.3
-------------
- Fixed bug with `random_seed` functionality in all tools

Version 1.0.2
-------------
- Updated end-to-end example notebook in `/examples` folder
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = "Roni Kobrosly"

# The full version, including alpha/beta/rc tags
release = "1.0.2"
release = "1.0.3"

# -- General configuration ---------------------------------------------------

Expand Down
7 changes: 4 additions & 3 deletions examples/NHANES_BLL_example.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="causal-curve",
version="1.0.2",
version="1.0.3",
author="Roni Kobrosly",
author_email="[email protected]",
description="A python library with tools to perform causal inference using \
Expand Down

0 comments on commit 3807bc0

Please sign in to comment.