Skip to main content

fit

Function fit 

Source
pub fn fit(
    x: &[f64],
    times: &[f64],
    event: &[bool],
    n: usize,
    p: usize,
) -> Result<CoxModel, LearningError>
Expand description

Fit Cox PH of right-censored (times, event) on a row-major n × p covariate matrix. event[i] = true is an observed event, false is right-censoring. Fails closed: InvalidDimension, InsufficientData, Singular, NotConverged.