8000 How to handle exception/NaN in forest_minimize · Issue #249 · scikit-optimize/scikit-optimize · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.
This repository was archived by the owner on Feb 28, 2024. It is now read-only.
How to handle exception/NaN in forest_minimize #249
@bjodah

Description

@bjodah

First off: thank you so much for skopt - I really like the API!

I was looking in the documentation for best practices advice when the user supplied callback throws an exception or returns NaN when using e.g. forest_minimize, but I couldn't find any advice. I hope it is alright that I open an issue regarding this?

Short background: I am trying to optimize parameters in a model. My callback calculates the RMSD between experimental data and model prediction. The model prediction data is calculated by integrating a system of ODEs (using e.g. scipy.integrate.ode). For a small set of parameters explored by e.g. forest_minimize the integration fails.

Currently I keep track of the biggest value seen by my callback and always return that value + some arbitrary number (e.g. 1) for sets of parameters for which my callback fails. This obviously distorts the cost-function landscape. Is there any advice to be given here? (except from making my callback robust for any input)

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

      0