pub struct PolynomialFeatures {
pub degree: usize,
pub interaction_only: bool,
pub include_bias: bool,
/* private fields */
}Expand description
Polynomial Feature Generator
Generates polynomial and interaction features. Example: [a, b] with degree=2 -> [1, a, b, a², ab, b²]
Fields§
§degree: usize§interaction_only: bool§include_bias: boolImplementations§
Source§impl PolynomialFeatures
impl PolynomialFeatures
pub fn new(degree: usize) -> Self
pub fn interaction_only(self, value: bool) -> Self
pub fn include_bias(self, value: bool) -> Self
pub fn fit_transform(&mut self, x: &Tensor) -> Tensor
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