question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support `botorch_modular.BoTorchModel.feature_importances`

See original GitHub issue

Hello, thanks for the previous help. Now I face a new problem. I am trying to use a new generation strategy. However, the feature importance plot can not be drawn. The following is the code of the generation strategy.

gs = GenerationStrategy(
    steps=[
        # Quasi-random initialization step
        GenerationStep(
            model=Models.SOBOL,
            num_trials=5,  # How many trials should be produced from this generation step
        ),
        # Bayesian optimization step using the custom acquisition function
        GenerationStep(
            model=Models.BOTORCH_MODULAR,
            num_trials=-1,  # No limitation on how many trials should be produced from this step
            # For `BOTORCH_MODULAR`, we pass in kwargs to specify what surrogate or acquisition function to use.
            model_kwargs={
                "surrogate": Surrogate(SingleTaskGP),
                "botorch_acqf_class": qNoisyExpectedImprovement
            },
        ),
    ]
)

The following figure is the error: image Here, the singleTaskGp is used as the surrogate model, is it not a Gaussian process?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Balandatcommented, Mar 15, 2022

Could you trigger the “Show CI” selector on the plot as well? It would be good to also understand how well calibrated these models are.

1reaction
yuanquan010commented, Mar 15, 2022

Actually, I used 100 trials. The following figure shows the code. image Based on the Cross-validation plot, it looks okay. image

Another thing worth mentioning is that when I come back to use models.GPEI in the generation strategy, as shown in the following figure. image

I can get the feature importance, but the GP model can not fit well. image image In the above two experiments, only the generation strategy is changed. Is there some internal connection in these errors?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setup and Usage of BoTorch Models in Ax
Utilizing BoTorchModel in generation strategies (abstraction that allows to chain models together and use them in Ax Service API etc.) Specifying ...
Read more >
Modular BoTorchModel : combining BoTorch components like ...
Trying to evaluate the ACF for certain parametrizations, I have to read through multiple abtraction layers of your library, trying to understand ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found