Struct Cloglog

Source
pub struct Cloglog {}
Expand description

The complementary log-log link g(p) = log(-log(1-p)) is appropriate when modeling the probability of non-zero counts when the counts are Poisson-distributed with mean lambda = exp(lin_pred).

Trait Implementations§

Source§

impl Link<Logistic<Cloglog>> for Cloglog

Source§

fn func<F: Float>(y: F) -> F

Maps the expectation value of the response variable to the linear predictor. In general this is determined by a composition of the inverse natural parameter transformation and the canonical link function.
Source§

fn func_inv<F: Float>(lin_pred: F) -> F

Maps the linear predictor to the expectation value of the response.
Source§

impl Transform for Cloglog

Source§

fn nat_param<F: Float>(lin_pred: Array1<F>) -> Array1<F>

The natural parameter(s) of the response distribution as a function of the linear predictor. For canonical link functions this is the identity. It must be monotonic, invertible, and twice-differentiable. For link function g and canonical link function g_0 it is equal to g_0 ( g^{-1}(lin_pred) ) .
Source§

fn d_nat_param<F: Float>(lin_pred: &Array1<F>) -> Array1<F>

The derivative 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_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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V