pub trait ReductionImpl:
Send
+ Serialize
+ Deserialize {
// Required methods
fn predict(
&self,
features: &mut Features<'_>,
depth_info: &mut DepthInfo,
model_offset: ModelIndex,
) -> Prediction;
fn learn(
&mut self,
features: &mut Features<'_>,
label: &Label,
depth_info: &mut DepthInfo,
model_offset: ModelIndex,
);
fn children(&self) -> Vec<&ReductionWrapper>;
// Provided methods
fn predict_then_learn(
&mut self,
features: &mut Features<'_>,
label: &Label,
depth_info: &mut DepthInfo,
model_offset: ModelIndex,
) -> Prediction { ... }
fn sensitivity(
&self,
features: &Features<'_>,
label: f32,
prediction: f32,
weight: f32,
depth_info: DepthInfo,
) -> f32 { ... }
}Required Methods§
fn predict( &self, features: &mut Features<'_>, depth_info: &mut DepthInfo, model_offset: ModelIndex, ) -> Prediction
fn learn( &mut self, features: &mut Features<'_>, label: &Label, depth_info: &mut DepthInfo, model_offset: ModelIndex, )
fn children(&self) -> Vec<&ReductionWrapper>
Provided Methods§
fn predict_then_learn( &mut self, features: &mut Features<'_>, label: &Label, depth_info: &mut DepthInfo, model_offset: ModelIndex, ) -> Prediction
fn sensitivity( &self, features: &Features<'_>, label: f32, prediction: f32, weight: f32, depth_info: DepthInfo, ) -> f32
Trait Implementations§
Source§impl<'typetag> Serialize for dyn ReductionImpl + 'typetag
impl<'typetag> Serialize for dyn ReductionImpl + 'typetag
Source§impl<'typetag> Serialize for dyn ReductionImpl + Send + 'typetag
impl<'typetag> Serialize for dyn ReductionImpl + Send + 'typetag
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".