pub trait SamplingStrategy:
Send
+ Sync
+ Debug {
// Required methods
fn sample(
&self,
data: &Array2<f64>,
n_samples: usize,
) -> Result<Vec<usize>, SklearsError>;
fn name(&self) -> &str;
// Provided methods
fn requires_fitting(&self) -> bool { ... }
fn fit(&mut self, _data: &Array2<f64>) -> Result<(), SklearsError> { ... }
fn weights(&self) -> Option<Array1<f64>> { ... }
}Expand description
Sampling strategy for selecting landmarks/components
Required Methods§
Provided Methods§
Sourcefn requires_fitting(&self) -> bool
fn requires_fitting(&self) -> bool
Check if this strategy requires fitting