skopt.space.space.Real¶
-
class
skopt.space.space.Real(low, high, prior='uniform', base=10, transform=None, name=None, dtype=<class 'float'>)[source][source]¶ Search space dimension that can take on any real value.
- Parameters
- lowfloat
Lower bound (inclusive).
- highfloat
Upper bound (inclusive).
- prior“uniform” or “log-uniform”, default=”uniform”
Distribution to use when sampling random points for this dimension. - If
"uniform", points are sampled uniformly between the lowerand upper bounds.
If
"log-uniform", points are sampled uniformly betweenlog(lower, base)andlog(upper, base)where log has basebase.
- baseint
The logarithmic base to use for a log-uniform prior. - Default 10, otherwise commonly 2.
- transform“identity”, “normalize”, optional
The following transformations are supported.
“identity”, (default) the transformed space is the same as the original space.
“normalize”, the transformed space is scaled to be between 0 and 1.
- namestr or None
Name associated with the dimension, e.g., “learning rate”.
- dtypestr or dtype, default=np.float
float type which will be used in inverse_transform, can be float.
- Attributes
- bounds
- name
- prior
- size
- transformed_bounds
- transformed_size
Methods
distance(self, a, b)Compute distance between point
aandb.inverse_transform(self, Xt)Inverse transform samples from the warped space back into the original space.
rvs(self[, n_samples, random_state])Draw random samples.
transform(self, X)Transform samples form the original space to a warped space.
-
__init__(self, low, high, prior='uniform', base=10, transform=None, name=None, dtype=<class 'float'>)[source][source]¶ Initialize self. See help(type(self)) for accurate signature.
-
distance(self, a, b)[source][source]¶ Compute distance between point
aandb.- Parameters
- afloat
First point.
- bfloat
Second point.
-
inverse_transform(self, Xt)[source][source]¶ Inverse transform samples from the warped space back into the original space.