pub struct Logit {}Expand description
The canonical link function for logistic regression is the logit function g(p) = log(p/(1-p)).
Trait Implementations§
Source§impl Link<Logistic> for Logit
impl Link<Logistic> for Logit
impl Canonical for Logit
Auto Trait Implementations§
impl Freeze for Logit
impl RefUnwindSafe for Logit
impl Send for Logit
impl Sync for Logit
impl Unpin for Logit
impl UnsafeUnpin for Logit
impl UnwindSafe for Logit
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> 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.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.