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

Transforming DWPCs: scale by nonzero mean rather than mean #11

Open
dhimmel opened this issue Mar 4, 2019 · 0 comments
Open

Transforming DWPCs: scale by nonzero mean rather than mean #11

dhimmel opened this issue Mar 4, 2019 · 0 comments

Comments

@dhimmel
Copy link
Member

dhimmel commented Mar 4, 2019

In this discussion, we settled the current method of transforming DPWCs. The method we selected was:

asinh(dwpc_matrix / mean(dwpc_matrix))

However, now I realize it probably makes more sense to scale by the mean of nonzero DPWCs rather than the overall mean. This approach would be more aligned with our current understanding of DWPCs, namely the gamma-hurdle model. Specifically, the percent nonzero is a separate parameter than the mean of nonzero DWPCs.

Implementing this change would be highly disruptive and would break backwards compatibility with Rephetio transformed DWPCs. Furthermore, it would require regenerating the degree-grouped permuted DWPC statistics for hetmech. Because this change would be highly disruptive, I'm not necessarily suggesting we implement it unless we see that the current transformation is deficient in practice.

Here are some lines in the current hetmatpy codebase that deal with transforming DWPCs:

dwpc_matrix = numpy.arcsinh(dwpc_matrix / dwpc_matrix.mean())

if scale:
values = numpy.arcsinh(values / scaler)

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

No branches or pull requests

1 participant