choose_float#
- skrub.choose_float(low, high, *, log=False, n_steps=None, name=None, default=None)[source]#
A choice of floating-point numbers 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 a float as thedefaultargument to set the default outcome.- Parameters:
- low
float The start of the range.
- high
float Then end of the range.
- 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
float, optional (default=None) If provided, override the choice’s default value when hyperparameter search is not used. Otherwise the default value is 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_intConstruct a choice of integers from a numeric range.
choose_fromConstruct a choice among several possible outcomes.
Gallery examples#
Multiples tables: building machine learning pipelines with DataOps