pub struct PolynomialFeatures {
pub degree: usize,
pub interaction_only: bool,
pub include_bias: bool,
/* private fields */
}Expand description
Polynomial Features - generate polynomial and interaction features
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, io: bool) -> Self
pub fn include_bias(self, ib: bool) -> Self
pub fn fit(&mut self, x: &Tensor)
pub fn transform(&self, x: &Tensor) -> Tensor
pub fn fit_transform(&mut self, x: &Tensor) -> Tensor
pub fn get_feature_names( &self, input_features: Option<&[String]>, ) -> Vec<String>
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