moola icon indicating copy to clipboard operation
moola copied to clipboard

Function mk in TrustRegionNewtonCG method not defined?

Open warisa-r opened this issue 5 months ago • 0 comments

Here

Or to be precise, in the curvature test section of TrustRegionNewtonCG, the function self.mk is called, but as far as I see, it isn't defined anywhere:

I tried to write my own function of self.mk for the curvature test, but I'm not sure if I understand the algorithm correctly.

    def mk(self, obj, xk, p):
        fxk = obj(xk)
        gxk = obj.derivative(xk)
        Hxk_p = obj.hessian(xk)(p)
        
        model_value = fxk + gxk.apply(p) + 0.5 * Hxk_p.apply(p)
        return model_value

I'd like to then ask if this is a bug or this is a misunderstanding of the code from my side?

Thank you in advance for your answer!

warisa-r avatar Sep 01 '25 12:09 warisa-r