pub struct HyperparameterSpace<T: Float> { /* private fields */ }Expand description
Hyperparameter search space definition
Implementations§
Source§impl<T: Float> HyperparameterSpace<T>
impl<T: Float> HyperparameterSpace<T>
Sourcepub fn parameter_ranges(&self) -> &HashMap<String, ParameterRange<T>>
pub fn parameter_ranges(&self) -> &HashMap<String, ParameterRange<T>>
Continuous parameter ranges, keyed by name.
Sourcepub fn categorical_options(&self) -> &HashMap<String, Vec<String>>
pub fn categorical_options(&self) -> &HashMap<String, Vec<String>>
Categorical parameter option lists, keyed by name.
Sourcepub fn dependencies(&self) -> &[ParameterDependency]
pub fn dependencies(&self) -> &[ParameterDependency]
Declared parameter dependencies.
Sourcepub fn constraints(&self) -> &[HyperparameterConstraint<T>]
pub fn constraints(&self) -> &[HyperparameterConstraint<T>]
Declared cross-parameter constraints.
Sourcepub fn add_parameter(&mut self, name: String, range: ParameterRange<T>)
pub fn add_parameter(&mut self, name: String, range: ParameterRange<T>)
Add a continuous parameter to the search space
Sourcepub fn add_categorical_parameter(
&mut self,
name: String,
categories: Vec<String>,
)
pub fn add_categorical_parameter( &mut self, name: String, categories: Vec<String>, )
Add a categorical parameter to the search space
Sourcepub fn add_dependency(&mut self, dependency: ParameterDependency)
pub fn add_dependency(&mut self, dependency: ParameterDependency)
Add a dependency between parameters
Sourcepub fn add_constraint(&mut self, constraint: HyperparameterConstraint<T>)
pub fn add_constraint(&mut self, constraint: HyperparameterConstraint<T>)
Add a constraint on parameter combinations
Sourcepub fn validate_configuration(
&self,
config: &HyperparameterConfiguration<T>,
) -> bool
pub fn validate_configuration( &self, config: &HyperparameterConfiguration<T>, ) -> bool
Validate a configuration against the search space
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for HyperparameterSpace<T>
impl<T> RefUnwindSafe for HyperparameterSpace<T>where
HashMap<String, ParameterRange<T>>: RefUnwindSafe,
Vec<HyperparameterConstraint<T>>: RefUnwindSafe,
impl<T> Send for HyperparameterSpace<T>
impl<T> Sync for HyperparameterSpace<T>
impl<T> Unpin for HyperparameterSpace<T>
impl<T> UnsafeUnpin for HyperparameterSpace<T>where
HashMap<String, ParameterRange<T>>: UnsafeUnpin,
Vec<HyperparameterConstraint<T>>: UnsafeUnpin,
impl<T> UnwindSafe for HyperparameterSpace<T>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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