Skip to content

A potentially missing feature if we want to cache the coupling coefficients #65

@zhanglw0521

Description

@zhanglw0521

The current coupling_coeffs relies on the input ll and nn. Ideally, they can be cached to avoid repeated calculations when constructing a linear model (or more generally, an NN). However, when doing the caching, some of the ll and nn's will return exactly the same results, as such, not all of them need to be computed.

One illustrative example:

For ll_1 = [1,1,1,2,2], nn_1 = [1,1,2,2,3] and ll_2 = [1,1,1,2,2], nn_2 = [3,3,4,5,6], the output coupling_coeffs(ll_i,nn_i,K) should be exactly the same, for arbitrary K.

Actually, the coupling_coeff only needs to know the ll blocks, [ [1,1], [1], [2], [2] ]. If the two sets of ll and nn's give the same ll blocks, the code should be able to refer to the already cached value to avoid duplication.

Given that the computation of the coupling coefficients in this package is now reasonably fast, this can be well redundant. But if we go to a higher correlation order at some point, this may be something worth considering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions