Skip to content

Enforcing bounds #16

@antoinecollet5

Description

@antoinecollet5

Hi @keurfonluu, thanks for this great library!

If I look at the code, I understand that the bounds parameter is only used to initialize the population of parameters vectors.

Would it be possible to actually enforce the bounds during optimization to limit the search space? I know I can artificially enforce it in the cost function, but it means that the cost function does not really corresponds to the parameters values sent by the optimizer.
It is also doable thanks to a variable change but it also means that lower and upper bounds are not reachable (asymptotic behaviour at the bounds)
Do you have an opinion about that ?

If you think this could be interesting, I guess a simple Boolean such as is_enforce_bounds and a bit of clipping in the code would be enough.

Best
Antoine

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