Skip to content

Support matrix-valued dual numbers #1

@queelius

Description

@queelius

Currently dualr stores scalar values and derivatives. For applications in multivariate statistics (e.g., matrix normal likelihoods, covariance estimation), it would be useful to support matrix-valued duals where both value and deriv slots hold matrices.

This would enable automatic differentiation through matrix operations like solve(), det(), chol(), and %*%.

Considerations:

  • The ANY slot typing already permits this in principle, but none of the arithmetic or math methods handle matrix operands
  • Would need matrix chain rule implementations
  • May require a separate dual_matrix class for clean dispatch

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions