Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treating Ordinals as purely Categorical may make optimizers weaker than they should be #3

Open
eddiebergman opened this issue Sep 14, 2022 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@eddiebergman
Copy link
Contributor

See these lines when converting form ConfigSpace spaces to Neps space:

elif isinstance(hyperparameter, CS.CategoricalHyperparameter):
parameter = CategoricalParameter(
hyperparameter.choices,
default=hyperparameter.default_value,
)
elif isinstance(hyperparameter, CS.OrdinalHyperparameter):
parameter = CategoricalParameter(
hyperparameter.sequence,
default=hyperparameter.default_value,
)

This may be fine for small ordinals like ["small", "medium", "large"], just treating them as a categorical, but, for tabular benchmarks this may be an issue.

For example, consider a benchmark which only has tabular entries for hyperparameters x, y, i.e.

x = Ordinal([1, 1.5, 4.5, 16, 32.354, ..., 100])
y = Ordinal(["small", "medium", "large"])

An optimizer which takes into account their order should theoretically outperform one which doesn't, i.e. SMAC.

One hacky solution is to convert it to an integer representation that act as indices so order information is presevered?

@eddiebergman eddiebergman added the enhancement New feature or request label Sep 14, 2022
@eddiebergman eddiebergman added this to the Search Space milestone Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant