pub trait Balancer:
BalancerClone
+ Send
+ Sync {
// Required methods
fn name(&self) -> &'static str;
fn fit_resample(
&self,
features: &Frame,
target: &[f64],
) -> Result<(Frame, Vec<f64>)>;
}Expand description
A train-time resampler: given features and a target, produce a rebalanced
(Frame, target). Unlike a Transformer, a balancer runs only during
fit — never at predict time — because it changes the row set (e.g. SMOTE
synthesises minority-class rows).
Required Methods§
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".