Skip to content

fix Jacobian to return transpose #230

@bob-carpenter

Description

@bob-carpenter

Sebastian Weber on stan-users pointed out that the matrix returned by the Jacobian functional in math/rev/mat/functor/jacobian.hpp returns a tranposed result.

According to

https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant

if f: R^N -> R^M, then the Jacobian should be M x N

But it's currently N x M.

  • fix Jacobian to be in line with standard definition

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions