pub struct RandomFourierGenerator {
pub n_components: usize,
pub gamma: f64,
pub random_state: Option<u64>,
/* private fields */
}Expand description
Random Fourier feature generator
Fields§
§n_components: usizeNumber of components
gamma: f64Gamma parameter
random_state: Option<u64>Random seed
Implementations§
Trait Implementations§
Source§impl Clone for RandomFourierGenerator
impl Clone for RandomFourierGenerator
Source§fn clone(&self) -> RandomFourierGenerator
fn clone(&self) -> RandomFourierGenerator
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 RandomFourierGenerator
impl Debug for RandomFourierGenerator
Source§impl FeatureGenerator for RandomFourierGenerator
impl FeatureGenerator for RandomFourierGenerator
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 RandomFourierGenerator
impl RefUnwindSafe for RandomFourierGenerator
impl Send for RandomFourierGenerator
impl Sync for RandomFourierGenerator
impl Unpin for RandomFourierGenerator
impl UnwindSafe for RandomFourierGenerator
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