JuliaDiff / JuliaDiff/ForwardDiff.jl

Efficient partial Hessian calculation

Open
#339 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
1k
Forks
160
PR merge metrics
No merged PRs in 30d

Description

Suppose I have a function F(x,y) of two variables x and y where dim(x) << dim(y). What is the most efficient way to calculate both ForwardDiff.jacobian(w1 -> ForwardDiff.gradient(w2 -> F(w2, y), w1), x) and
ForwardDiff.jacobian(z -> ForwardDiff.gradient(w -> F(w, z), x),y)? These work, but I'm wondering if there's something faster. I think ForwardDiff.hessian would be way to expensive since I have no need for the second derivative w.r.t. y. I just need the partials \nabla_xxF and \nabla_xyF. Thanks!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is identified. Start by reviewing the Julia ForwardDiff.jacobian, gradient, and hessian APIs used in the report, then determine whether the requested partial Hessian calculation fits an existing entry point. Done means an agreed efficient approach is implemented or documented and its behavior is covered by relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.