pub struct PolynomialFeatures { /* private fields */ }
Expand description
Polynomial feature transformation
Generates polynomial features up to specified degree
Implementations§
Source§impl PolynomialFeatures
impl PolynomialFeatures
Sourcepub fn new(degree: usize, interaction_only: bool, include_bias: bool) -> Self
pub fn new(degree: usize, interaction_only: bool, include_bias: bool) -> Self
Creates a new PolynomialFeatures transformer
§Arguments
degree
- The degree of the polynomial features to generateinteraction_only
- If true, only interaction features are produced (no powers)include_bias
- If true, include a bias term (constant feature equal to 1)
§Returns
- A new PolynomialFeatures instance
Sourcepub fn n_output_features(&self, n_features: usize) -> usize
pub fn n_output_features(&self, n_features: usize) -> usize
Auto Trait Implementations§
impl Freeze for PolynomialFeatures
impl RefUnwindSafe for PolynomialFeatures
impl Send for PolynomialFeatures
impl Sync for PolynomialFeatures
impl Unpin for PolynomialFeatures
impl UnwindSafe for PolynomialFeatures
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> 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