pub struct HyperparameterSpace {
pub continuous: HashMap<String, (f32, f32)>,
pub discrete: HashMap<String, (i32, i32)>,
pub categorical: HashMap<String, Vec<String>>,
pub log_scale: Vec<String>,
}Expand description
Hyperparameter search space definition
Fields§
§continuous: HashMap<String, (f32, f32)>Continuous parameters with [min, max] bounds
discrete: HashMap<String, (i32, i32)>Discrete integer parameters with [min, max] bounds
categorical: HashMap<String, Vec<String>>Categorical parameters with list of choices
log_scale: Vec<String>Log-scale parameters (will be sampled in log space)
Implementations§
Source§impl HyperparameterSpace
impl HyperparameterSpace
pub fn new() -> Self
pub fn add_continuous(self, name: &str, min: f32, max: f32) -> Self
pub fn add_discrete(self, name: &str, min: i32, max: i32) -> Self
pub fn add_categorical(self, name: &str, choices: Vec<&str>) -> Self
pub fn set_log_scale(self, names: Vec<&str>) -> Self
Trait Implementations§
Source§impl Clone for HyperparameterSpace
impl Clone for HyperparameterSpace
Source§fn clone(&self) -> HyperparameterSpace
fn clone(&self) -> HyperparameterSpace
Returns a duplicate of the value. Read more
1.0.0 · 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 HyperparameterSpace
impl Debug for HyperparameterSpace
Source§impl<'de> Deserialize<'de> for HyperparameterSpace
impl<'de> Deserialize<'de> for HyperparameterSpace
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HyperparameterSpace
impl RefUnwindSafe for HyperparameterSpace
impl Send for HyperparameterSpace
impl Sync for HyperparameterSpace
impl Unpin for HyperparameterSpace
impl UnsafeUnpin for HyperparameterSpace
impl UnwindSafe for HyperparameterSpace
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more