pub struct AdditiveMultiTaskConfig {
pub weights: (f32, f32),
pub normalization: Normalization,
pub top_k: Option<usize>,
}Expand description
Configuration for additive multi-task fusion.
Fields§
§weights: (f32, f32)Weights for each task: (weight_a, weight_b).
normalization: NormalizationNormalization method (default: ZScore for robustness).
top_k: Option<usize>Maximum results to return (None = all).
Implementations§
Source§impl AdditiveMultiTaskConfig
impl AdditiveMultiTaskConfig
Sourcepub const fn new(weights: (f32, f32)) -> Self
pub const fn new(weights: (f32, f32)) -> Self
Create new config with custom weights.
ResFlow’s optimal formula for e-commerce: CTR + CTCVR × 20.
This would be AdditiveMultiTaskConfig::new((1.0, 20.0)).
Sourcepub const fn with_normalization(self, normalization: Normalization) -> Self
pub const fn with_normalization(self, normalization: Normalization) -> Self
Set normalization method.
Sourcepub const fn with_top_k(self, top_k: usize) -> Self
pub const fn with_top_k(self, top_k: usize) -> Self
Limit output to top_k results.
Trait Implementations§
Source§impl Clone for AdditiveMultiTaskConfig
impl Clone for AdditiveMultiTaskConfig
Source§fn clone(&self) -> AdditiveMultiTaskConfig
fn clone(&self) -> AdditiveMultiTaskConfig
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 AdditiveMultiTaskConfig
impl Debug for AdditiveMultiTaskConfig
Source§impl Default for AdditiveMultiTaskConfig
impl Default for AdditiveMultiTaskConfig
Source§impl PartialEq for AdditiveMultiTaskConfig
impl PartialEq for AdditiveMultiTaskConfig
impl Copy for AdditiveMultiTaskConfig
impl StructuralPartialEq for AdditiveMultiTaskConfig
Auto Trait Implementations§
impl Freeze for AdditiveMultiTaskConfig
impl RefUnwindSafe for AdditiveMultiTaskConfig
impl Send for AdditiveMultiTaskConfig
impl Sync for AdditiveMultiTaskConfig
impl Unpin for AdditiveMultiTaskConfig
impl UnsafeUnpin for AdditiveMultiTaskConfig
impl UnwindSafe for AdditiveMultiTaskConfig
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