pub struct ScalarizationOptimizer<S = Untrained> { /* private fields */ }Expand description
Scalarization optimizer for converting multi-objective problems to single-objective
Implementations§
Source§impl ScalarizationOptimizer<Untrained>
impl ScalarizationOptimizer<Untrained>
Sourcepub fn new(method: ScalarizationMethod) -> Self
pub fn new(method: ScalarizationMethod) -> Self
Create a new scalarization optimizer
Sourcepub fn config(self, config: ScalarizationConfig) -> Self
pub fn config(self, config: ScalarizationConfig) -> Self
Set the configuration
Sourcepub fn learning_rate(self, learning_rate: Float) -> Self
pub fn learning_rate(self, learning_rate: Float) -> Self
Set learning rate
Sourcepub fn random_state(self, random_state: Option<u64>) -> Self
pub fn random_state(self, random_state: Option<u64>) -> Self
Set random state
Sourcepub fn scalarize_objectives(&self, objectives: &[Float]) -> SklResult<Float>
pub fn scalarize_objectives(&self, objectives: &[Float]) -> SklResult<Float>
Compute scalarized objective value
Sourcepub fn generate_scalarized_problems(
&self,
n_problems: usize,
n_objectives: usize,
) -> SklResult<Vec<ScalarizationMethod>>
pub fn generate_scalarized_problems( &self, n_problems: usize, n_objectives: usize, ) -> SklResult<Vec<ScalarizationMethod>>
Generate multiple scalarized problems for comprehensive optimization
Source§impl ScalarizationOptimizer<ScalarizationOptimizerTrained>
impl ScalarizationOptimizer<ScalarizationOptimizerTrained>
Sourcepub fn parameters(&self) -> &Array1<Float>
pub fn parameters(&self) -> &Array1<Float>
Get the optimized parameters
Sourcepub fn scalarized_value(&self) -> Float
pub fn scalarized_value(&self) -> Float
Get the scalarized objective value
Sourcepub fn objective_values(&self) -> &[Float] ⓘ
pub fn objective_values(&self) -> &[Float] ⓘ
Get the original objective values
Sourcepub fn convergence_history(&self) -> &[Float] ⓘ
pub fn convergence_history(&self) -> &[Float] ⓘ
Get the convergence history
Sourcepub fn method(&self) -> &ScalarizationMethod
pub fn method(&self) -> &ScalarizationMethod
Get the scalarization method used
Sourcepub fn is_feasible(&self) -> bool
pub fn is_feasible(&self) -> bool
Check if the solution is feasible (for constraint-based methods)
Trait Implementations§
Source§impl<S: Clone> Clone for ScalarizationOptimizer<S>
impl<S: Clone> Clone for ScalarizationOptimizer<S>
Source§fn clone(&self) -> ScalarizationOptimizer<S>
fn clone(&self) -> ScalarizationOptimizer<S>
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<S: Debug> Debug for ScalarizationOptimizer<S>
impl<S: Debug> Debug for ScalarizationOptimizer<S>
Source§impl Estimator for ScalarizationOptimizer<Untrained>
impl Estimator for ScalarizationOptimizer<Untrained>
Source§type Config = ScalarizationConfig
type Config = ScalarizationConfig
Configuration type for the estimator
Source§type Error = SklearsError
type Error = SklearsError
Error type for the estimator
Source§fn validate_config(&self) -> Result<(), SklearsError>
fn validate_config(&self) -> Result<(), SklearsError>
Validate estimator configuration with detailed error context
Source§fn check_compatibility(
&self,
n_samples: usize,
n_features: usize,
) -> Result<(), SklearsError>
fn check_compatibility( &self, n_samples: usize, n_features: usize, ) -> Result<(), SklearsError>
Check if estimator is compatible with given data dimensions
Source§fn metadata(&self) -> EstimatorMetadata
fn metadata(&self) -> EstimatorMetadata
Get estimator metadata
Source§impl Estimator for ScalarizationOptimizer<ScalarizationOptimizerTrained>
impl Estimator for ScalarizationOptimizer<ScalarizationOptimizerTrained>
Source§type Config = ScalarizationConfig
type Config = ScalarizationConfig
Configuration type for the estimator
Source§type Error = SklearsError
type Error = SklearsError
Error type for the estimator
Source§fn validate_config(&self) -> Result<(), SklearsError>
fn validate_config(&self) -> Result<(), SklearsError>
Validate estimator configuration with detailed error context
Source§fn check_compatibility(
&self,
n_samples: usize,
n_features: usize,
) -> Result<(), SklearsError>
fn check_compatibility( &self, n_samples: usize, n_features: usize, ) -> Result<(), SklearsError>
Check if estimator is compatible with given data dimensions
Source§fn metadata(&self) -> EstimatorMetadata
fn metadata(&self) -> EstimatorMetadata
Get estimator metadata
Source§impl Fit<ArrayBase<ViewRepr<&f64>, Dim<[usize; 2]>>, ArrayBase<ViewRepr<&f64>, Dim<[usize; 2]>>> for ScalarizationOptimizer<Untrained>
impl Fit<ArrayBase<ViewRepr<&f64>, Dim<[usize; 2]>>, ArrayBase<ViewRepr<&f64>, Dim<[usize; 2]>>> for ScalarizationOptimizer<Untrained>
Source§type Fitted = ScalarizationOptimizer<ScalarizationOptimizerTrained>
type Fitted = ScalarizationOptimizer<ScalarizationOptimizerTrained>
The fitted model type
Source§fn fit(
self,
X: &ArrayView2<'_, Float>,
y: &ArrayView2<'_, Float>,
) -> SklResult<Self::Fitted>
fn fit( self, X: &ArrayView2<'_, Float>, y: &ArrayView2<'_, Float>, ) -> SklResult<Self::Fitted>
Fit the model to the provided data with validation
Source§fn fit_with_validation(
self,
x: &X,
y: &Y,
_x_val: Option<&X>,
_y_val: Option<&Y>,
) -> Result<(Self::Fitted, FitMetrics), SklearsError>where
Self: Sized,
fn fit_with_validation(
self,
x: &X,
y: &Y,
_x_val: Option<&X>,
_y_val: Option<&Y>,
) -> Result<(Self::Fitted, FitMetrics), SklearsError>where
Self: Sized,
Fit with custom validation and early stopping
Auto Trait Implementations§
impl<S> Freeze for ScalarizationOptimizer<S>where
S: Freeze,
impl<S> RefUnwindSafe for ScalarizationOptimizer<S>where
S: RefUnwindSafe,
impl<S> Send for ScalarizationOptimizer<S>where
S: Send,
impl<S> Sync for ScalarizationOptimizer<S>where
S: Sync,
impl<S> Unpin for ScalarizationOptimizer<S>where
S: Unpin,
impl<S> UnwindSafe for ScalarizationOptimizer<S>where
S: UnwindSafe,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> StableApi for Twhere
T: Estimator,
impl<T> StableApi for Twhere
T: Estimator,
Source§const STABLE_SINCE: &'static str = "0.1.0"
const STABLE_SINCE: &'static str = "0.1.0"
API version this type was stabilized in
Source§const HAS_EXPERIMENTAL_FEATURES: bool = false
const HAS_EXPERIMENTAL_FEATURES: bool = false
Whether this API has any experimental features