Skip to content

Add sum_to_zero_matrix #3132

@spinkney

Description

@spinkney

Description

We can add a sum to zero constraint on a matrix where the rows and the columns both sum to zero. This is useful for random effect models where you have the random effect interaction coming from a matrix variate normal. In addition, this is useful to specify "cost" type matrices for optimal transport problems.

I've put up the constraining transform, the free version, and the derivative in c++ at https://godbolt.org/z/qnW7xTeP7.

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