choose_int#
- skrub.choose_int(low, high, *, log=False, n_steps=None, name=None, default=None)[source]#
A choice of integers from a numeric range.
When a learner is fitted without hyperparameter tuning, the outcome of this choice is the middle of the range (possibly on a
logscale). Pass an int as thedefaultargument to set the default outcome.- Parameters:
- low
int The start of the range.
- high
int Then end of the range. It is included in the possible outcomes.
- log
bool, optional (default=False) Whether sampling should be done on a logarithmic scale.
- n_steps
int, optional (default=None) If not
None, a grid ofn_stepsvalues across the range is defined and sampling is done on that grid. This can be useful to limit the number of unique values that get sampled, for example to improve the effectiveness of caching. However, it means a much more restricted space of possible values gets explored.- name
str, optional (default=None) If not
None,nameis used when displaying search results and can also be used to override the choice’s value by setting it in the environment containing a learner’s inputs.- default
int, optional (default=None) If provided, override the choice’s default value when hyperparameter search is not used. Otherwise the default value is the integer closest to the middle of the range (either on a linear or logarithmic scale depending on the value of
log).
- low
- Returns:
- numeric choice
An object representing this choice, which can be used in a skrub learner.
See also
choose_boolConstruct a choice between False and True.
choose_floatConstruct a choice of floating-point numbers from a numeric range.
choose_fromConstruct a choice among several possible outcomes.
Gallery examples#
Multiples tables: building machine learning pipelines with DataOps