Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPNewton() sparsity support #977

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

schrimpf
Copy link

@schrimpf schrimpf commented Feb 4, 2022

This makes IPNewton() compatible with alternate types (e.g. sparse) of Hessians and Jacobians. It addresses one part of #609

This is a work in progress. Some remaining issues:

  • The passing of array type for the Jacobian of the constraints is ugly. I made it an argument to IPNewton, but it would be better as a field of TwiceDifferentiableConstraints, just like H is a field of TwiceDifferentiable. That requires changing NLSolversBase
  • Add en example of a sparse problem to the documentation
  • Ensure IPNewton() benefits from sparsity. The changes make IPNewton() work with a sparse Hessian, but I haven't examined whether its appropriately preserved and exploited throughout the algorithm. Should also bench mark the performance versus dense matrices.
  • Improve tests. The only test is a simple equality constrained problem. It is not organized the same way as tests for other aspects of the package.

@pkofod
Copy link
Member

pkofod commented Feb 8, 2022

Appreciate it! Let me know when it's ready for review.

@codecov
Copy link

codecov bot commented Feb 28, 2022

Codecov Report

Merging #977 (24a38a8) into master (cdebfca) will increase coverage by 1.31%.
The diff coverage is 88.88%.

❗ Current head 24a38a8 differs from pull request most recent head f5835da. Consider uploading reports for the commit f5835da to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #977      +/-   ##
==========================================
+ Coverage   83.92%   85.23%   +1.31%     
==========================================
  Files          42       42              
  Lines        3066     3184     +118     
==========================================
+ Hits         2573     2714     +141     
+ Misses        493      470      -23     
Impacted Files Coverage Δ
...tivariate/solvers/constrained/ipnewton/interior.jl 76.44% <0.00%> (-0.58%) ⬇️
...tivariate/solvers/constrained/ipnewton/ipnewton.jl 96.17% <87.50%> (-0.34%) ⬇️
...ariate/solvers/second_order/newton_trust_region.jl 97.07% <100.00%> (+0.66%) ⬆️
src/types.jl 84.15% <100.00%> (+36.38%) ⬆️
src/multivariate/solvers/first_order/bfgs.jl 90.66% <0.00%> (-1.12%) ⬇️
src/univariate/printing.jl 17.64% <0.00%> (-1.11%) ⬇️
src/multivariate/optimize/interface.jl 81.13% <0.00%> (-0.60%) ⬇️
...c/multivariate/solvers/zeroth_order/nelder_mead.jl 84.84% <0.00%> (-0.51%) ⬇️
src/multivariate/solvers/constrained/fminbox.jl 79.25% <0.00%> (-0.08%) ⬇️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cdebfca...f5835da. Read the comment docs.

@Vaibhavdixit02
Copy link

@schrimpf do you plan to continue this?

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.

3 participants