pub struct ResourceConfiguration {
pub id: String,
pub parameters: HashMap<String, f64>,
pub evaluations: usize,
pub scores: Vec<f64>,
pub mean_score: f64,
pub variance: f64,
pub confidence_width: f64,
pub resources_allocated: f64,
pub efficiency: f64,
pub is_active: bool,
}Expand description
Configuration being evaluated with allocated resources
Fields§
§id: StringUnique identifier for this configuration
parameters: HashMap<String, f64>Parameter values for this configuration
evaluations: usizeNumber of evaluations performed
scores: Vec<f64>Performance scores from evaluations
mean_score: f64Current mean performance
variance: f64Performance variance
confidence_width: f64Confidence interval width
resources_allocated: f64Total resources allocated (e.g., training epochs, CV folds)
efficiency: f64Resource efficiency (score per unit resource)
is_active: boolWhether this configuration is still active
Implementations§
Source§impl ResourceConfiguration
impl ResourceConfiguration
Sourcepub fn new(id: String, parameters: HashMap<String, f64>) -> Self
pub fn new(id: String, parameters: HashMap<String, f64>) -> Self
Create a new resource configuration
Sourcepub fn add_evaluation(&mut self, score: f64, resources_used: f64)
pub fn add_evaluation(&mut self, score: f64, resources_used: f64)
Add a new evaluation result
Sourcepub fn update_statistics(&mut self)
pub fn update_statistics(&mut self)
Update internal statistics
Sourcepub fn upper_confidence_bound(
&self,
exploration_factor: f64,
total_evaluations: usize,
) -> f64
pub fn upper_confidence_bound( &self, exploration_factor: f64, total_evaluations: usize, ) -> f64
Calculate Upper Confidence Bound
Sourcepub fn lower_confidence_bound(
&self,
exploration_factor: f64,
total_evaluations: usize,
) -> f64
pub fn lower_confidence_bound( &self, exploration_factor: f64, total_evaluations: usize, ) -> f64
Calculate Lower Confidence Bound
Sourcepub fn should_promote(
&self,
threshold_percentile: f64,
all_scores: &[f64],
) -> bool
pub fn should_promote( &self, threshold_percentile: f64, all_scores: &[f64], ) -> bool
Check if this configuration should be promoted (continue receiving resources)
Trait Implementations§
Source§impl Clone for ResourceConfiguration
impl Clone for ResourceConfiguration
Source§fn clone(&self) -> ResourceConfiguration
fn clone(&self) -> ResourceConfiguration
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 moreAuto Trait Implementations§
impl Freeze for ResourceConfiguration
impl RefUnwindSafe for ResourceConfiguration
impl Send for ResourceConfiguration
impl Sync for ResourceConfiguration
impl Unpin for ResourceConfiguration
impl UnwindSafe for ResourceConfiguration
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