pub struct PolynomialGenerator {
pub degree: usize,
pub include_bias: bool,
pub interaction_only: bool,
}Expand description
Polynomial feature generator
Fields§
§degree: usizePolynomial degree
include_bias: boolInclude bias term
interaction_only: boolInteraction only (no powers)
Implementations§
Trait Implementations§
Source§impl Clone for PolynomialGenerator
impl Clone for PolynomialGenerator
Source§fn clone(&self) -> PolynomialGenerator
fn clone(&self) -> PolynomialGenerator
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 PolynomialGenerator
impl Debug for PolynomialGenerator
Source§impl FeatureGenerator for PolynomialGenerator
impl FeatureGenerator for PolynomialGenerator
Source§fn generate(&self, data: &Array2<f64>) -> Result<Array2<f64>, SklearsError>
fn generate(&self, data: &Array2<f64>) -> Result<Array2<f64>, SklearsError>
Generate features from input data
Source§fn output_dim(&self) -> usize
fn output_dim(&self) -> usize
Get the output dimension
Source§fn is_stateful(&self) -> bool
fn is_stateful(&self) -> bool
Check if generator is stateful (needs fitting)
Source§fn fit_generator(&mut self, _data: &Array2<f64>) -> Result<(), SklearsError>
fn fit_generator(&mut self, _data: &Array2<f64>) -> Result<(), SklearsError>
Fit the generator if stateful
Auto Trait Implementations§
impl Freeze for PolynomialGenerator
impl RefUnwindSafe for PolynomialGenerator
impl Send for PolynomialGenerator
impl Sync for PolynomialGenerator
impl Unpin for PolynomialGenerator
impl UnwindSafe for PolynomialGenerator
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