pub struct ModelBuilderData<'a, M, Y, F>where
M: Glm,
Y: Yval<M>,
F: 'static + Float,{ /* private fields */ }Expand description
Holds the data and all the specifications for the model and provides functions to adjust the settings.
Implementations§
Source§impl<'a, M, Y, F> ModelBuilderData<'a, M, Y, F>
A builder to generate a Model object
impl<'a, M, Y, F> ModelBuilderData<'a, M, Y, F>
A builder to generate a Model object
Sourcepub fn linear_offset(self, linear_offset: Array1<F>) -> Self
pub fn linear_offset(self, linear_offset: Array1<F>) -> Self
Represents an offset added to the linear predictor for each data point. This can be used to control for fixed effects or in multi-level models.
Sourcepub fn freq_weights(self, freqs: Array1<usize>) -> Self
pub fn freq_weights(self, freqs: Array1<usize>) -> Self
Frequency weights (a.k.a. counts) for each observation. Traditionally these are positive integers representing the number of times each observation appears identically.
Sourcepub fn var_weights(self, weights: Array1<F>) -> Self
pub fn var_weights(self, weights: Array1<F>) -> Self
Variance weights (a.k.a. analytic weights) of each observation. These could represent the inverse square of the uncertainties of each measurement.
Sourcepub fn no_constant(self) -> Self
pub fn no_constant(self) -> Self
Do not add a constant intercept term of 1s to the design matrix. This is rarely
recommended, so you probably don’t want to use this option unless you have a very clear
sense of why. Note that you can supply uniform or per-observation constant terms using
ModelBuilderData::linear_offset.
Sourcepub fn no_standardize(self) -> Self
pub fn no_standardize(self) -> Self
Don’t perform standarization (i.e. scale to 0-mean and 1-variance) of the design matrix. Note that the standardization is handled internally, so the reported result coefficients should be compatible with the input data directly, meaning the user shouldn’t have to interact with them.
pub fn build(self) -> RegressionResult<Model<M, F>, F>where
M: Glm,
F: Float,
Auto Trait Implementations§
impl<'a, M, Y, F> Freeze for ModelBuilderData<'a, M, Y, F>
impl<'a, M, Y, F> RefUnwindSafe for ModelBuilderData<'a, M, Y, F>
impl<'a, M, Y, F> Send for ModelBuilderData<'a, M, Y, F>
impl<'a, M, Y, F> Sync for ModelBuilderData<'a, M, Y, F>
impl<'a, M, Y, F> Unpin for ModelBuilderData<'a, M, Y, F>
impl<'a, M, Y, F> UnsafeUnpin for ModelBuilderData<'a, M, Y, F>
impl<'a, M, Y, F> UnwindSafe for ModelBuilderData<'a, M, Y, F>
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
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>
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>
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.