Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make_zn_score: Docs changes and Todos #358

Merged
merged 2 commits into from
May 23, 2022

Conversation

rsueppel
Copy link
Contributor

No description provided.

@rsueppel rsueppel requested a review from Ksteeds May 21, 2022 15:54
@@ -389,6 +410,8 @@ def make_zn_scores(df: pd.DataFrame, xcat: str, cids: List[str] = None,

if est_freq != "d":
dfw = dfw.resample(pd_freq[est_freq], axis=0, convention='end').last()
# Todo: Fatal bug. This means subsequent applications of pen_neutral etc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not the purpose ? To calculate the neutral levels and standard deviations on a lower frequency. For instance, an assert that has a low variance which will subsequently not fluctuate a considerable amount over a week.


elif sequential and iis:
iis_neutral = np.repeat(df.iloc[0:min_obs].stack().mean(),
min_obs)

os_neutral = rolling_mean_with_nan(dfw=df)
# Todo: incorrect, use pandas df.expanding.mean()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why incorrect ? I'm not sure df.expanding.mean() works when computing a rolling mean across a panel.

@Ksteeds Ksteeds merged commit 1f5a021 into feature/make_zn_scores_efficient May 23, 2022
@rsueppel rsueppel deleted the make_zn_score_rs branch July 1, 2022 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants