LinkFunc

Trait LinkFunc 

Source
pub trait LinkFunc {
    // Required methods
    fn func(x: f64) -> f64;
    fn func_grad(x: f64) -> f64;
    fn func_inv(x: f64) -> f64;
}
Expand description

Link functions.

Used within Generalized Linear Regression models.

Required Methods§

Source

fn func(x: f64) -> f64

The link function.

Source

fn func_grad(x: f64) -> f64

The gradient of the link function.

Source

fn func_inv(x: f64) -> f64

The inverse of the link function. Often called the ‘mean’ function.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl LinkFunc for Identity

The Identity link function.

g(u) = u

Source§

impl LinkFunc for Log

The log link function.

g(u) = ln(u)

Source§

impl LinkFunc for Logit

The Logit link function.

g(u) = ln(x / (1 - x))