pub struct NegRec {}Expand description
The canonical link function for exponential regression is the negative reciprocal
$\eta = -1/mu$. This fails to prevent negative predicted y-values.
Trait Implementations§
Source§impl Link<Exponential> for NegRec
impl Link<Exponential> for NegRec
impl Canonical for NegRec
Auto Trait Implementations§
impl Freeze for NegRec
impl RefUnwindSafe for NegRec
impl Send for NegRec
impl Sync for NegRec
impl Unpin for NegRec
impl UnsafeUnpin for NegRec
impl UnwindSafe for NegRec
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.Source§impl<T> Transform for Twhere
T: Canonical,
impl<T> Transform for Twhere
T: Canonical,
Source§fn nat_param<F>(
lin_pred: ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
) -> ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>where
F: Float,
fn nat_param<F>(
lin_pred: ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
) -> ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>where
F: Float,
By defintion this function is the identity function for canonical links.
Source§fn adjust_errors<F>(
errors: ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
_lin_pred: &ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
) -> ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>where
F: Float,
fn adjust_errors<F>(
errors: ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
_lin_pred: &ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
) -> ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>where
F: Float,
The canonical link function requires no transformation of the error and variance terms.
Source§fn d_nat_param<F>(
lin_pred: &ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
) -> ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>where
F: Float,
fn d_nat_param<F>(
lin_pred: &ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
) -> ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>where
F: Float,
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_variance<F>(
variance: ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
_lin_pred: &ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
) -> ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>where
F: Float,
fn adjust_variance<F>(
variance: ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
_lin_pred: &ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
) -> ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>where
F: Float,
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>(
errors: ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
variance: ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
_lin_pred: &ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
) -> (ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>)where
F: Float,
fn adjust_errors_variance<F>(
errors: ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
variance: ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
_lin_pred: &ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>,
) -> (ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 1]>>)where
F: Float,
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.