Skip to content

[wip] hessian, jacobian and their vector products - #57

Open
CarloLucibello wants to merge 3 commits into
denizyuret:masterfrom
CarloLucibello:hessian
Open

[wip] hessian, jacobian and their vector products#57
CarloLucibello wants to merge 3 commits into
denizyuret:masterfrom
CarloLucibello:hessian

Conversation

@CarloLucibello

Copy link
Copy Markdown
Collaborator

fixes #54

@CarloLucibello CarloLucibello changed the title heassian, jacobian and their vector products [wip] hessian, jacobian and their vector products Mar 2, 2018
@kirnap

kirnap commented Mar 4, 2018

Copy link
Copy Markdown

@CarloLucibello, Since it says [WIP], let's review and merge this pr after you've done?

@CarloLucibello

Copy link
Copy Markdown
Collaborator Author

it is a WIP because it's not clear to me how the output should look when the input as a complicated structure, e.g. a vector of matrices

@kirnap

kirnap commented Mar 4, 2018

Copy link
Copy Markdown

@denizyuret

@jsams

jsams commented May 7, 2018

Copy link
Copy Markdown

I've got a multi-argument function and was trying to add the argnum argument to hessian (and therefore jacobian), but am failing. Can you, @CarloLucibello, provide some guidance on how to do that? I've got a function from Rn -> R and just want the hessian as an nxn matrix.

If it makes it easier in the short term, I only need argnum = 1.

@CarloLucibello

Copy link
Copy Markdown
Collaborator Author

If I understand correctly, you have a mutli-argument function, e.g. f(x,y), and want to compute the hessian just with respect to x. In this case you can try to use the methods in this PR as follow

x0 = ...
y0 = ....
hessian(x->f(x, y0))(x0)

@jsams

jsams commented May 7, 2018

Copy link
Copy Markdown

that creates a closure over y0, right? My second argument is changing during my iterations, so I need to input it on each call.

@CarloLucibello

CarloLucibello commented May 7, 2018

Copy link
Copy Markdown
Collaborator Author

you should be fine, the closure is created anew each time hessian(x->f(x, y0))(x0) is executed

@denizyuret

Copy link
Copy Markdown
Owner

@CarloLucibello what is the latest state of this PR? Is it ready to merge?

@denizyuret denizyuret mentioned this pull request Aug 22, 2018
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

missing Jacobian and Hessian methods

4 participants