Skip to content

Function mk in TrustRegionNewtonCG method not defined? #19

@warisa-r

Description

@warisa-r

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions