mathnet / mathnet-numerics

Math.NET Numerics
http://numerics.mathdotnet.com
MIT License
3.51k stars 898 forks source link

Modified newtons method #1068

Open strMikhailPotapenko opened 8 months ago

strMikhailPotapenko commented 8 months ago

My proposed solution which resolves #1067.

I added an option to Newton Minimizer which forces the Hessian to be positive definite by reversing negative eigenvalues. This method is described in

Philip E. Gill, Walter Murray, and Margaret H. Wright, Practical Optimization, 1981, 107–8.

I also added a unit test, FindMinimum_SixHumpCamel_IndefiniteHessian(), to demonstrate the benefit of this modification. If the optional argument is changed to HessianModifiers.None then the test fails.

Please see the issue for further illustration of the use case.

I made the optional argument an enum because this method of forcing positive definiteness can be improved upon in terms of efficiency and this gives some future developer the hooks to be able to do so.

Regards, Mikhail

strMikhailPotapenko commented 8 months ago

@cdrnet, Would it be possible to get this pull request reviewed?

strMikhailPotapenko commented 8 months ago

@jvangael, @jkalias, @JohanLarsson, I think you are also listed as member of the Math.Net team. Would any of you be willing to consider this pull request?

jkalias commented 8 months ago

@strMikhailPotapenko I would be more than happy to. The problem is that I can only merge PRs for the MathNet.Spatial project, for the Numerics only @cdrnet has the relevant rights to.

strMikhailPotapenko commented 8 months ago

@jkalias Ah I didn't know that, sorry about that and thank you for the response.

Just looking at open issues and pull requests it does seem like there isn't a lot of activity with this repo, which is too bad because I have been using this library quite often lately and have been pretty satisfied with it. Do you happen to have any information on the plans of @cdrnet as far as actively maintaining this repo or any way to request that information from him?

jkalias commented 7 months ago

@strMikhailPotapenko nothing to be sorry about :)

I have no information on whether/when @cdrnet will continue to actively maintain this repo. On the other hand, it's an open source project, so there is no obligation to do so, and rightfully so.

strMikhailPotapenko commented 7 months ago

@jkalias Very true!