pub struct MockEstimator { /* private fields */ }Expand description
Mock estimator with configurable behavior for testing
Implementations§
Source§impl MockEstimator
impl MockEstimator
Sourcepub fn with_config(config: MockConfig) -> Self
pub fn with_config(config: MockConfig) -> Self
Create a mock estimator with custom configuration
Sourcepub fn builder() -> MockEstimatorBuilder
pub fn builder() -> MockEstimatorBuilder
Create a builder for configuring mock estimator
Sourcepub fn config(&self) -> &MockConfig
pub fn config(&self) -> &MockConfig
Get the current configuration
Sourcepub fn mock_state(&self) -> MockStateSnapshot
pub fn mock_state(&self) -> MockStateSnapshot
Get mock state information for testing
Sourcepub fn reset_state(&self)
pub fn reset_state(&self)
Reset the mock state (useful for test setup)
Sourcepub fn simulate_error(&self, error_type: MockErrorType) -> Result<()>
pub fn simulate_error(&self, error_type: MockErrorType) -> Result<()>
Simulate a specific error condition
Trait Implementations§
Source§impl Clone for MockEstimator
impl Clone for MockEstimator
Source§fn clone(&self) -> MockEstimator
fn clone(&self) -> MockEstimator
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 MockEstimator
impl Debug for MockEstimator
Source§impl Default for MockEstimator
impl Default for MockEstimator
Source§impl Estimator for MockEstimator
impl Estimator for MockEstimator
Source§type Config = MockConfig
type Config = MockConfig
Configuration type for the estimator
Source§type Error = SklearsError
type Error = SklearsError
Error type for the estimator
Source§fn validate_config(&self) -> Result<()>
fn validate_config(&self) -> Result<()>
Validate estimator configuration with detailed error context
Source§fn check_compatibility(&self, n_samples: usize, n_features: usize) -> Result<()>
fn check_compatibility(&self, n_samples: usize, n_features: usize) -> Result<()>
Check if estimator is compatible with given data dimensions
Source§fn metadata(&self) -> EstimatorMetadata
fn metadata(&self) -> EstimatorMetadata
Get estimator metadata
Source§impl<'a> Fit<ArrayBase<ViewRepr<&'a f64>, Dim<[usize; 2]>>, ArrayBase<ViewRepr<&'a f64>, Dim<[usize; 1]>>> for MockEstimator
impl<'a> Fit<ArrayBase<ViewRepr<&'a f64>, Dim<[usize; 2]>>, ArrayBase<ViewRepr<&'a f64>, Dim<[usize; 1]>>> for MockEstimator
Source§type Fitted = TrainedMockEstimator
type Fitted = TrainedMockEstimator
The fitted model type
Source§fn fit(
self,
x: &ArrayView2<'a, f64>,
y: &ArrayView1<'a, f64>,
) -> Result<Self::Fitted>
fn fit( self, x: &ArrayView2<'a, f64>, y: &ArrayView1<'a, f64>, ) -> Result<Self::Fitted>
Fit the model to the provided data with validation
Auto Trait Implementations§
impl Freeze for MockEstimator
impl RefUnwindSafe for MockEstimator
impl Send for MockEstimator
impl Sync for MockEstimator
impl Unpin for MockEstimator
impl UnwindSafe for MockEstimator
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> StableApi for Twhere
T: Estimator,
impl<T> StableApi for Twhere
T: Estimator,
Source§const STABLE_SINCE: &'static str = const STABLE_SINCE: &'static str = "0.1.0";
const STABLE_SINCE: &'static str = const STABLE_SINCE: &'static str = "0.1.0";
API version this type was stabilized in
Source§const HAS_EXPERIMENTAL_FEATURES: bool = false
const HAS_EXPERIMENTAL_FEATURES: bool = false
Whether this API has any experimental features