pub struct LinearRegressionConfigBuilder<S = Unvalidated> { /* private fields */ }Expand description
Builder for LinearRegressionConfig with compile-time validation
Implementations§
Source§impl LinearRegressionConfigBuilder
impl LinearRegressionConfigBuilder
pub fn new() -> LinearRegressionConfigBuilder
pub fn fit_intercept(self, fit_intercept: bool) -> LinearRegressionConfigBuilder
pub fn positive(self, positive: bool) -> LinearRegressionConfigBuilder
Sourcepub fn alpha(
self,
alpha: f64,
) -> Result<LinearRegressionConfigBuilder, SklearsError>
pub fn alpha( self, alpha: f64, ) -> Result<LinearRegressionConfigBuilder, SklearsError>
Set alpha with compile-time validation
Sourcepub fn max_iter(
self,
max_iter: i32,
) -> Result<LinearRegressionConfigBuilder, SklearsError>
pub fn max_iter( self, max_iter: i32, ) -> Result<LinearRegressionConfigBuilder, SklearsError>
Set max_iter with compile-time validation
Sourcepub fn build(
self,
) -> Result<LinearRegressionConfigBuilder<ValidatedState>, SklearsError>
pub fn build( self, ) -> Result<LinearRegressionConfigBuilder<ValidatedState>, SklearsError>
Build the validated configuration
Source§impl LinearRegressionConfigBuilder<ValidatedState>
impl LinearRegressionConfigBuilder<ValidatedState>
Sourcepub fn config(&self) -> &LinearRegressionConfig
pub fn config(&self) -> &LinearRegressionConfig
Get the validated configuration
Sourcepub fn into_config(self) -> LinearRegressionConfig
pub fn into_config(self) -> LinearRegressionConfig
Consume the builder and return the validated configuration
Trait Implementations§
Source§impl Default for LinearRegressionConfigBuilder
impl Default for LinearRegressionConfigBuilder
Source§fn default() -> LinearRegressionConfigBuilder
fn default() -> LinearRegressionConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<S> Freeze for LinearRegressionConfigBuilder<S>
impl<S> RefUnwindSafe for LinearRegressionConfigBuilder<S>where
S: RefUnwindSafe,
impl<S> Send for LinearRegressionConfigBuilder<S>where
S: Send,
impl<S> Sync for LinearRegressionConfigBuilder<S>where
S: Sync,
impl<S> Unpin for LinearRegressionConfigBuilder<S>where
S: Unpin,
impl<S> UnwindSafe for LinearRegressionConfigBuilder<S>where
S: UnwindSafe,
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