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.

Throw more informative error message if CmaEsSampler is used with categorical variables

See original GitHub issue

Currently, if CmaEsSampler is used with categorical variables, it throws this error

The parameter 'x' in trial#1 is sampled independently by using `RandomSampler` instead of `CmaEsSampler` (optimization performance may be degraded). You can suppress this warning by setting `warn_independent_sampling` to `False` in the constructor of `CmaEsSampler`, if this independent sampling is intended behavior.

As somebody who isn’t familiar with the details of CmaEsSampler, I was not aware that it didn’t work with categorical variables, and thought it was an issue with how I was setting the parameter ranges

If the CmaEsSampler is called with categorical variables, it should probably throw an error/warning upfront explaining the issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
c-batacommented, Nov 17, 2020

Resolved at #2019. @norihitoishida Thank you for your contribution 👍

1reaction
norihitoishidacommented, Oct 15, 2020

I’ll work on this

Read more comments on GitHub >

github_iconTop Results From Across the Web

optuna/optuna - Gitter
That's because CmaEsSampler does not support categorical hyperparamters. ... Would be nice to throw a more informative error message I think.
Read more >
How to Deal With Categorical Variable in Predictive Modeling
Here are simple methods to treat categorical variables in a data set and their various levels using label encoding, dummy, one hot encoding....
Read more >
Error in PCA when dealing with multi categorical variables
Could you elaborate on what you hope it will achieve? The error message seems unambiguous you have missing or infinite values in your...
Read more >
7 Exploratory Data Analysis | R for Data Science
1 Visualising distributions. How you visualise the distribution of a variable will depend on whether the variable is categorical or continuous. A variable...
Read more >
Handling Categorical Features - With Examples - Wandb
You will get an error if you try to plug these variables into most machine ... well if the categorical variable takes on...
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