hetmatpy icon indicating copy to clipboard operation
hetmatpy copied to clipboard

Transforming DWPCs: scale by nonzero mean rather than mean

Open dhimmel opened this issue 6 years ago • 0 comments

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:

https://github.com/hetio/hetmatpy/blob/4911389a0fde8ef9939a5d11152e57659073310f/hetmatpy/degree_group.py#L89

https://github.com/hetio/hetmatpy/blob/4911389a0fde8ef9939a5d11152e57659073310f/hetmatpy/degree_group.py#L57-L58

dhimmel avatar Mar 04 '19 16:03 dhimmel