Skip to content

Avoid calling objective function's methods in Scaled if multiplier is zero #66

@santisoler

Description

@santisoler

If the Scaled.multiplier is zero, then we could avoid calling the underlying method of the objective function that might require some computational load that will be discarded as soon as we multiply it by the scalar multiplier. We could have return a null result instead:

  • ___call__: return 0.0.
  • gradient: return an array full of zeros.
  • hessian: return a sparse matrix with zeros (maybe a diagonal one...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions