pub trait ResamplingStrategy: Send + Sync {
type Input;
type Output;
type Config;
// Required method
fn resample(
&self,
x: ArrayBase<ViewRepr<&f64>, Dim<[usize; 2]>>,
y: ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>,
config: &Self::Config,
) -> Result<(ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<i32>, Dim<[usize; 1]>>), ResamplingError>;
// Provided method
fn performance_hints(&self) -> PerformanceHints { ... }
}
Expand description
Zero-cost abstraction for resampling strategies
Required Associated Types§
Required Methods§
Sourcefn resample(
&self,
x: ArrayBase<ViewRepr<&f64>, Dim<[usize; 2]>>,
y: ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>,
config: &Self::Config,
) -> Result<(ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<i32>, Dim<[usize; 1]>>), ResamplingError>
fn resample( &self, x: ArrayBase<ViewRepr<&f64>, Dim<[usize; 2]>>, y: ArrayBase<ViewRepr<&i32>, Dim<[usize; 1]>>, config: &Self::Config, ) -> Result<(ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<i32>, Dim<[usize; 1]>>), ResamplingError>
Resample the input data to balance class distribution
Provided Methods§
Sourcefn performance_hints(&self) -> PerformanceHints
fn performance_hints(&self) -> PerformanceHints
Consciousness-aligned performance hints