Skip to content

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

@dhimmel

Description

@dhimmel

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions