autogluon.common.space¶
Search Space¶
You can use AutoGluon search space to perform HPO. For a high-level overview, see this example:
from autogluon.common import space
categorical_space = space.Categorical('a', 'b', 'c', 'd')  # Nested search space for hyperparameters which are categorical.
real_space = space.Real(0.01, 0.1)  # Search space for numeric hyperparameter that takes continuous values
int_space = space.Int(0, 100)  # Search space for numeric hyperparameter that takes integer values
bool_space = space.Bool()  # Search space for hyperparameter that is either True or False.
For how to use the search space to perform HPO, check out Tabular Indepth Tutorial
Categorical¶
- class autogluon.common.space.Categorical(*data)[source]¶
- Nested search space for hyperparameters which are categorical. Such a hyperparameter takes one value out of the discrete set of provided options.
- The first value in the list of options will be the default value that gets tried first during HPO. 
 - Parameters:
- data (Space or python built-in objects) – the choice candidates 
 - Examples - >>> a = Categorical('a', 'b', 'c', 'd') # 'a' will be default value tried first during HPO 
Real¶
- class autogluon.common.space.Real(lower, upper, default=None, log=False)[source]¶
- Search space for numeric hyperparameter that takes continuous values. - Parameters:
- lower (float) – The lower bound of the search space (minimum possible value of hyperparameter) 
- upper (float) – The upper bound of the search space (maximum possible value of hyperparameter) 
- default (float (optional)) – Default value tried first during hyperparameter optimization 
- log ((True/False)) – Whether to search the values on a logarithmic rather than linear scale. This is useful for numeric hyperparameters (such as learning rates) whose search space spans many orders of magnitude. 
 
 - Examples - >>> learning_rate = Real(0.01, 0.1, log=True) 
Int¶
- class autogluon.common.space.Int(lower, upper, default=None)[source]¶
- Search space for numeric hyperparameter that takes integer values. - Parameters:
- lower (int) – The lower bound of the search space (minimum possible value of hyperparameter) 
- upper (int) – The upper bound of the search space (maximum possible value of hyperparameter) 
- default (int (optional)) – Default value tried first during hyperparameter optimization 
 
 - Examples - >>> range = Int(0, 100)