pub trait ParallelTrainable<X, Y> {
type Output;
// Required methods
fn train_single(
&self,
x: &X,
y: &Y,
worker_id: usize,
) -> Result<Self::Output>;
fn combine_results(results: Vec<Self::Output>) -> Result<Self::Output>;
fn estimate_memory_usage(&self, data_size: usize) -> usize;
}Expand description
Trait for parallel trainable estimators
Required Associated Types§
Required Methods§
Sourcefn train_single(&self, x: &X, y: &Y, worker_id: usize) -> Result<Self::Output>
fn train_single(&self, x: &X, y: &Y, worker_id: usize) -> Result<Self::Output>
Train a single estimator on a data subset
Sourcefn combine_results(results: Vec<Self::Output>) -> Result<Self::Output>
fn combine_results(results: Vec<Self::Output>) -> Result<Self::Output>
Combine results from multiple workers
Sourcefn estimate_memory_usage(&self, data_size: usize) -> usize
fn estimate_memory_usage(&self, data_size: usize) -> usize
Estimate memory usage for given data size
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.