pub struct PropertyTestGenerator { /* private fields */ }Expand description
Property-based test generator for pipeline data
Implementations§
Source§impl PropertyTestGenerator
impl PropertyTestGenerator
Sourcepub fn sample_range(self, min: usize, max: usize) -> Self
pub fn sample_range(self, min: usize, max: usize) -> Self
Set sample size range
Sourcepub fn feature_range(self, min: usize, max: usize) -> Self
pub fn feature_range(self, min: usize, max: usize) -> Self
Set feature count range
Sourcepub fn value_range(self, range: (f64, f64)) -> Self
pub fn value_range(self, range: (f64, f64)) -> Self
Set value range for generated features
Sourcepub fn generate_matrix(
&self,
n_samples: usize,
n_features: usize,
) -> Array2<f64>
pub fn generate_matrix( &self, n_samples: usize, n_features: usize, ) -> Array2<f64>
Generate random matrix for testing
Sourcepub fn generate_targets(&self, n_samples: usize) -> Array1<f64>
pub fn generate_targets(&self, n_samples: usize) -> Array1<f64>
Generate random target vector for testing
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PropertyTestGenerator
impl RefUnwindSafe for PropertyTestGenerator
impl Send for PropertyTestGenerator
impl Sync for PropertyTestGenerator
impl Unpin for PropertyTestGenerator
impl UnwindSafe for PropertyTestGenerator
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