pub struct Log {}Expand description
The log link $g(\mu) = \log(\mu)$ avoids linear predictors that give negative
expectations.
Trait Implementations§
Source§impl Link<Gamma<Log>> for Log
impl Link<Gamma<Log>> for Log
Source§impl Transform for Log
impl Transform for Log
Source§fn nat_param<F: Float>(lin_pred: Array1<F>) -> Array1<F>
fn nat_param<F: Float>(lin_pred: Array1<F>) -> Array1<F>
The natural parameter of the response distribution as a function
of the linear predictor: $
\eta(\omega) = g_0(g^{-1}(\omega))$ where $g_0$ is the
canonical link. For canonical links this is the identity.Source§fn d_nat_param<F: Float>(lin_pred: &Array1<F>) -> Array1<F>
fn d_nat_param<F: Float>(lin_pred: &Array1<F>) -> Array1<F>
The derivative $
\eta'(\omega)$ of the transformation to the natural parameter.
If it is zero in a region that the IRLS is in, the algorithm may have difficulty
converging.
It is given in terms of the link and variance functions as $\eta'(\omega_i) = \frac{1}{g'(\mu_i) V(\mu_i)}$.Source§fn adjust_errors<F: Float>(errors: Array1<F>, lin_pred: &Array1<F>) -> Array1<F>
fn adjust_errors<F: Float>(errors: Array1<F>, lin_pred: &Array1<F>) -> Array1<F>
Adjust the error/residual terms of the likelihood function based on the first derivative of
the transformation. The linear predictor must be un-transformed, i.e. it must be X*beta
without the transformation applied.
Source§fn adjust_variance<F: Float>(
variance: Array1<F>,
lin_pred: &Array1<F>,
) -> Array1<F>
fn adjust_variance<F: Float>( variance: Array1<F>, lin_pred: &Array1<F>, ) -> Array1<F>
Adjust the variance terms of the likelihood function based on the first and second
derivatives of the transformation. The linear predictor must be un-transformed, i.e. it
must be X*beta without the transformation applied.
Source§fn adjust_errors_variance<F: Float>(
errors: Array1<F>,
variance: Array1<F>,
lin_pred: &Array1<F>,
) -> (Array1<F>, Array1<F>)
fn adjust_errors_variance<F: Float>( errors: Array1<F>, variance: Array1<F>, lin_pred: &Array1<F>, ) -> (Array1<F>, Array1<F>)
Adjust the error and variance terms of the likelihood function based on
the first and second derivatives of the transformation. The adjustment
is performed simultaneously. The linear predictor must be
un-transformed, i.e. it must be X*beta without the transformation
applied.
Auto Trait Implementations§
impl Freeze for Log
impl RefUnwindSafe for Log
impl Send for Log
impl Sync for Log
impl Unpin for Log
impl UnsafeUnpin for Log
impl UnwindSafe for Log
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 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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.