pub struct TypeSafeModelBuilder<ProblemType, const N_FEATURES: usize> { /* private fields */ }Expand description
Builder pattern with compile-time validation
Implementations§
Source§impl<const N_FEATURES: usize> TypeSafeModelBuilder<Regression, N_FEATURES>
impl<const N_FEATURES: usize> TypeSafeModelBuilder<Regression, N_FEATURES>
Sourcepub fn new_regression() -> Self
pub fn new_regression() -> Self
Create a new builder for regression
Sourcepub fn with_l2_regularization(self, alpha: Float) -> Self
pub fn with_l2_regularization(self, alpha: Float) -> Self
Set regularization strength with compile-time validation
Sourcepub fn build(self) -> TypeSafeLinearModel<Untrained, Regression, N_FEATURES>
pub fn build(self) -> TypeSafeLinearModel<Untrained, Regression, N_FEATURES>
Build the model
Trait Implementations§
Auto Trait Implementations§
impl<ProblemType, const N_FEATURES: usize> Freeze for TypeSafeModelBuilder<ProblemType, N_FEATURES>
impl<ProblemType, const N_FEATURES: usize> RefUnwindSafe for TypeSafeModelBuilder<ProblemType, N_FEATURES>where
ProblemType: RefUnwindSafe,
impl<ProblemType, const N_FEATURES: usize> Send for TypeSafeModelBuilder<ProblemType, N_FEATURES>where
ProblemType: Send,
impl<ProblemType, const N_FEATURES: usize> Sync for TypeSafeModelBuilder<ProblemType, N_FEATURES>where
ProblemType: Sync,
impl<ProblemType, const N_FEATURES: usize> Unpin for TypeSafeModelBuilder<ProblemType, N_FEATURES>where
ProblemType: Unpin,
impl<ProblemType, const N_FEATURES: usize> UnwindSafe for TypeSafeModelBuilder<ProblemType, N_FEATURES>where
ProblemType: 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