Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions claims_hosp/delphi_claims_hosp/weekday.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Weekday:

@staticmethod
def get_params(data):
"""Correct a signal estimated as numerator/denominator for weekday effects.
r"""Correct a signal estimated as numerator/denominator for weekday effects.

The ordinary estimate would be numerator_t/denominator_t for each time point
t. Instead, model
Expand Down Expand Up @@ -63,7 +63,7 @@ def get_params(data):

# Construct design matrix to have weekday indicator columns and then day
# indicators.
X = np.zeros((nums.shape[0], 6 + nums.shape[0]))
X = np.zeros((nums.shape[0], 6 + nums.shape[0])) # pylint: disable=invalid-name
not_sunday = np.where(nums.index.dayofweek != 6)[0]
X[not_sunday, np.array(nums.index.dayofweek)[not_sunday]] = 1
X[np.where(nums.index.dayofweek == 6)[0], :6] = -1
Expand Down