pub struct LogisticRegression { /* private fields */ }Expand description
Multinomial logistic regression: class probabilities softmax(W x + b), trained by minimising
the mean negative log-likelihood plus an L2 penalty λ/2 ‖W‖² (the intercepts are not
penalised) with L-BFGS. With two classes this is ordinary logistic regression. Standardise the
features first for fast convergence.
Implementations§
Source§impl LogisticRegression
impl LogisticRegression
pub fn with_limits(self, max_iterations: usize, tolerance: f64) -> Self
Sourcepub fn coefficients(&self) -> R2D
pub fn coefficients(&self) -> R2D
The learned weights, (classes, features) without the intercept column.
pub fn intercepts(&self) -> Vec<f64>
Sourcepub fn iterations(&self) -> usize
pub fn iterations(&self) -> usize
L-BFGS iterations used by the last fit.
Trait Implementations§
Source§impl Classifier for LogisticRegression
impl Classifier for LogisticRegression
Source§impl Clone for LogisticRegression
impl Clone for LogisticRegression
Auto Trait Implementations§
impl Freeze for LogisticRegression
impl RefUnwindSafe for LogisticRegression
impl Send for LogisticRegression
impl Sync for LogisticRegression
impl Unpin for LogisticRegression
impl UnsafeUnpin for LogisticRegression
impl UnwindSafe for LogisticRegression
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more