Skip to main content

logistic_regression

Function logistic_regression 

Source
pub fn logistic_regression(
    x: &[Vec<f64>],
    y: &[bool],
    lr: f64,
    epochs: usize,
) -> Vec<f64>
Expand description

Logistic regression via gradient descent. x is n_samples × n_features, y is bool labels. Returns weight vector (n_features + 1, including intercept).