pub struct FittedColumnTransformer { /* private fields */ }Expand description
A fitted column transformer holding fitted sub-transformers and metadata.
Created by calling Fit::fit on a ColumnTransformer.
Implements Transform<Array2<f64>> to apply the fitted transformers and
concatenate their outputs, as well as FittedPipelineTransformer for use
inside a ferrolearn_core::pipeline::Pipeline.
Implementations§
Source§impl FittedColumnTransformer
impl FittedColumnTransformer
Sourcepub fn n_features_in(&self) -> usize
pub fn n_features_in(&self) -> usize
Return the number of input features seen during fitting.
Sourcepub fn transformer_names(&self) -> Vec<&str>
pub fn transformer_names(&self) -> Vec<&str>
Return the names of all registered transformer steps.
Sourcepub fn remainder_indices(&self) -> &[usize]
pub fn remainder_indices(&self) -> &[usize]
Return the remainder column indices (columns not selected by any transformer).
Trait Implementations§
Source§impl FittedPipelineTransformer<f64> for FittedColumnTransformer
impl FittedPipelineTransformer<f64> for FittedColumnTransformer
Source§fn transform_pipeline(&self, x: &Array2<f64>) -> Result<Array2<f64>, FerroError>
fn transform_pipeline(&self, x: &Array2<f64>) -> Result<Array2<f64>, FerroError>
Source§impl Transform<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>> for FittedColumnTransformer
impl Transform<ArrayBase<OwnedRepr<f64>, Dim<[usize; 2]>>> for FittedColumnTransformer
Source§fn transform(&self, x: &Array2<f64>) -> Result<Array2<f64>, FerroError>
fn transform(&self, x: &Array2<f64>) -> Result<Array2<f64>, FerroError>
Transform data by applying each fitted transformer to its column subset, then horizontally concatenating all outputs.
When remainder = Passthrough, the unselected columns are appended
after all transformer outputs. When remainder = Drop, they are
discarded.
§Errors
FerroError::ShapeMismatchif the input does not haven_features_incolumns.- Propagates any error from individual transformer
transform_pipelinecalls.
Source§type Error = FerroError
type Error = FerroError
transform.Auto Trait Implementations§
impl Freeze for FittedColumnTransformer
impl !RefUnwindSafe for FittedColumnTransformer
impl Send for FittedColumnTransformer
impl Sync for FittedColumnTransformer
impl Unpin for FittedColumnTransformer
impl UnsafeUnpin for FittedColumnTransformer
impl !UnwindSafe for FittedColumnTransformer
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
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.