Struct rusty_machine::learning::logistic_reg::BaseLogisticRegressor [] [src]

pub struct BaseLogisticRegressor {
    // some fields omitted
}

The Base Logistic Regression model.

This struct cannot be instantianated and is used internally only.

Trait Implementations

impl Debug for BaseLogisticRegressor
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Optimizable for BaseLogisticRegressor
[src]

Computing the gradient of the underlying Logistic Regression model.

The gradient is given by

XT(h(Xb) - y) / m

where h is the sigmoid function and b the underlying model parameters.

type Inputs = Matrix<f64>

The input data type to the model.

type Targets = Vector<f64>

The target data type to the model.

fn compute_grad(&self, params: &[f64], inputs: &Matrix<f64>, targets: &Vector<f64>) -> (f64, Vec<f64>)

Compute the gradient for the model.