pub struct OptimizationHistory { /* private fields */ }Expand description
Optimization history store
Implementations§
Source§impl OptimizationHistory
impl OptimizationHistory
pub fn new(config: WarmStartConfig) -> Self
Sourcepub fn add_record(&mut self, record: EvaluationRecord)
pub fn add_record(&mut self, record: EvaluationRecord)
Add a new evaluation record
Sourcepub fn get_top_k(&self, k: usize) -> Vec<&EvaluationRecord>
pub fn get_top_k(&self, k: usize) -> Vec<&EvaluationRecord>
Get top-k best configurations
Sourcepub fn get_weighted_data(&self) -> Vec<(ParameterValue, f64, f64)>
pub fn get_weighted_data(&self) -> Vec<(ParameterValue, f64, f64)>
Get weighted historical data
Sourcepub fn get_similar_configs(
&self,
target_params: &ParameterValue,
similarity_threshold: f64,
max_count: usize,
) -> Vec<&EvaluationRecord>
pub fn get_similar_configs( &self, target_params: &ParameterValue, similarity_threshold: f64, max_count: usize, ) -> Vec<&EvaluationRecord>
Get similar configurations based on parameter distance
Sourcepub fn analyze_parameter_ranges(&self) -> HashMap<String, (f64, f64, f64)>
pub fn analyze_parameter_ranges(&self) -> HashMap<String, (f64, f64, f64)>
Analyze parameter ranges from history
Sourcepub fn get_statistics(&self) -> OptimizationStatistics
pub fn get_statistics(&self) -> OptimizationStatistics
Get evaluation statistics
Sourcepub fn set_problem_signature(&mut self, signature: String)
pub fn set_problem_signature(&mut self, signature: String)
Set problem signature for transfer learning
Sourcepub fn problem_signature(&self) -> Option<&str>
pub fn problem_signature(&self) -> Option<&str>
Get problem signature
Sourcepub fn export_to_json(&self) -> Result<String>
pub fn export_to_json(&self) -> Result<String>
Export history to JSON
Sourcepub fn import_from_json(&mut self, json_data: &str) -> Result<()>
pub fn import_from_json(&mut self, json_data: &str) -> Result<()>
Import history from JSON
Trait Implementations§
Source§impl Clone for OptimizationHistory
impl Clone for OptimizationHistory
Source§fn clone(&self) -> OptimizationHistory
fn clone(&self) -> OptimizationHistory
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 OptimizationHistory
impl RefUnwindSafe for OptimizationHistory
impl Send for OptimizationHistory
impl Sync for OptimizationHistory
impl Unpin for OptimizationHistory
impl UnwindSafe for OptimizationHistory
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