pub struct MockTransformer { /* private fields */ }Expand description
Mock transformer for demonstration
Implementations§
Source§impl MockTransformer
impl MockTransformer
Sourcepub fn with_scale(scale_factor: f64) -> Self
pub fn with_scale(scale_factor: f64) -> Self
Create with custom scale factor
Source§impl MockTransformer
Simple fit method for MockTransformer
impl MockTransformer
Simple fit method for MockTransformer
Sourcepub fn fit(
&mut self,
_x: &ArrayView2<'_, Float>,
_y: Option<&ArrayView1<'_, Float>>,
) -> SklResult<()>
pub fn fit( &mut self, _x: &ArrayView2<'_, Float>, _y: Option<&ArrayView1<'_, Float>>, ) -> SklResult<()>
Fit the transformer (basic implementation)
Trait Implementations§
Source§impl Clone for MockTransformer
impl Clone for MockTransformer
Source§fn clone(&self) -> MockTransformer
fn clone(&self) -> MockTransformer
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 MockTransformer
impl Debug for MockTransformer
Source§impl Default for MockTransformer
impl Default for MockTransformer
Source§impl PipelineStep for MockTransformer
impl PipelineStep for MockTransformer
Source§fn transform(&self, x: &ArrayView2<'_, Float>) -> SklResult<Array2<f64>>
fn transform(&self, x: &ArrayView2<'_, Float>) -> SklResult<Array2<f64>>
Transform the input data
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 step to data (if applicable)
Source§fn clone_step(&self) -> Box<dyn PipelineStep>
fn clone_step(&self) -> Box<dyn PipelineStep>
Clone the step
Auto Trait Implementations§
impl Freeze for MockTransformer
impl RefUnwindSafe for MockTransformer
impl Send for MockTransformer
impl Sync for MockTransformer
impl Unpin for MockTransformer
impl UnwindSafe for MockTransformer
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