pub enum Distribution {
Uniform {
low: f64,
high: f64,
},
LogUniform {
low: f64,
high: f64,
},
IntUniform {
low: i64,
high: i64,
},
Categorical {
choices: Vec<String>,
},
}Expand description
The search-space shape recorded for a single suggested parameter.
In the define-by-run model a Distribution is produced by each
trial.suggest_* call and handed to the active crate::Sampler, which
returns a matching crate::Value. The distribution is also recorded on
the crate::Trial so later phases (pruning, adaptive sampling, storage,
importance analysis) can reconstruct exactly what was searched.
Variants§
Uniform
Continuous uniform over [low, high].
LogUniform
Log-uniform over [low, high] (both must be > 0). Sampling is uniform
in log-space — appropriate for scale parameters like learning rates.
IntUniform
Integer uniform over the inclusive range [low, high].
Categorical
Categorical over a fixed set of string labels.
Implementations§
Trait Implementations§
Source§impl Clone for Distribution
impl Clone for Distribution
Source§fn clone(&self) -> Distribution
fn clone(&self) -> Distribution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Distribution
impl Debug for Distribution
Source§impl<'de> Deserialize<'de> for Distribution
impl<'de> Deserialize<'de> for Distribution
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Distribution, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Distribution, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Distribution
impl PartialEq for Distribution
Source§impl Serialize for Distribution
impl Serialize for Distribution
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Distribution
Auto Trait Implementations§
impl Freeze for Distribution
impl RefUnwindSafe for Distribution
impl Send for Distribution
impl Sync for Distribution
impl Unpin for Distribution
impl UnsafeUnpin for Distribution
impl UnwindSafe for Distribution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more