pub struct ExampleScaler {
pub config: ComponentConfig,
pub scale_factor: f64,
pub fitted: bool,
}Expand description
Example scaler component
Fields§
§config: ComponentConfig§scale_factor: f64§fitted: boolImplementations§
Source§impl ExampleScaler
impl ExampleScaler
pub fn new(config: ComponentConfig) -> Self
Trait Implementations§
Source§impl Clone for ExampleScaler
impl Clone for ExampleScaler
Source§fn clone(&self) -> ExampleScaler
fn clone(&self) -> ExampleScaler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExampleScaler
impl Debug for ExampleScaler
Source§impl PluginComponent for ExampleScaler
impl PluginComponent for ExampleScaler
Source§fn component_type(&self) -> &'static str
fn component_type(&self) -> &'static str
Get component type
Source§fn config(&self) -> &ComponentConfig
fn config(&self) -> &ComponentConfig
Get component configuration
Source§fn initialize(&mut self, _context: &ComponentContext) -> SklResult<()>
fn initialize(&mut self, _context: &ComponentContext) -> SklResult<()>
Initialize component
Source§fn clone_component(&self) -> Box<dyn PluginComponent>
fn clone_component(&self) -> Box<dyn PluginComponent>
Clone the component
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Convert to mutable Any for downcasting
Source§impl PluginTransformer for ExampleScaler
impl PluginTransformer for ExampleScaler
Source§fn fit(
&mut self,
_x: &ArrayView2<'_, Float>,
_y: Option<&ArrayView1<'_, Float>>,
) -> SklResult<()>
fn fit( &mut self, _x: &ArrayView2<'_, Float>, _y: Option<&ArrayView1<'_, Float>>, ) -> SklResult<()>
Fit the transformer
Source§fn get_feature_names_out(
&self,
input_features: Option<&[String]>,
) -> Vec<String>
fn get_feature_names_out( &self, input_features: Option<&[String]>, ) -> Vec<String>
Get feature names output
Source§fn fit_transform(
&mut self,
x: &ArrayView2<'_, Float>,
y: Option<&ArrayView1<'_, Float>>,
) -> SklResult<Array2<f64>>
fn fit_transform( &mut self, x: &ArrayView2<'_, Float>, y: Option<&ArrayView1<'_, Float>>, ) -> SklResult<Array2<f64>>
Fit and transform in one step
Auto Trait Implementations§
impl Freeze for ExampleScaler
impl RefUnwindSafe for ExampleScaler
impl Send for ExampleScaler
impl Sync for ExampleScaler
impl Unpin for ExampleScaler
impl UnsafeUnpin for ExampleScaler
impl UnwindSafe for ExampleScaler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more