Struct RustQuant::ml::regression::logistic::LogisticRegressionOutput
source · pub struct LogisticRegressionOutput<T> {
pub coefficients: DVector<T>,
pub iterations: usize,
}Expand description
Struct to hold the output data for a logistic regression.
Fields§
§coefficients: DVector<T>The coefficients of the logistic regression, often denoted as b0, b1, b2, …, bn. The first coefficient is the intercept (aka. b0 or alpha).
iterations: usizeNumber of iterations required to converge.
Implementations§
source§impl LogisticRegressionOutput<f64>
impl LogisticRegressionOutput<f64>
sourcepub fn predict(&self, input: &DMatrix<f64>) -> DVector<f64>
pub fn predict(&self, input: &DMatrix<f64>) -> DVector<f64>
Predicts the output for the given input data.
sourcepub fn predict_proba(&self, input: &DMatrix<f64>) -> DVector<f64>
pub fn predict_proba(&self, input: &DMatrix<f64>) -> DVector<f64>
Compute the probabilities Pr(output_i=1|input_i,coefficients) for the given input data.
Trait Implementations§
source§impl<T: Clone> Clone for LogisticRegressionOutput<T>
impl<T: Clone> Clone for LogisticRegressionOutput<T>
source§fn clone(&self) -> LogisticRegressionOutput<T>
fn clone(&self) -> LogisticRegressionOutput<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> RefUnwindSafe for LogisticRegressionOutput<T>where T: RefUnwindSafe,
impl<T> Send for LogisticRegressionOutput<T>where T: Send,
impl<T> Sync for LogisticRegressionOutput<T>where T: Sync,
impl<T> Unpin for LogisticRegressionOutput<T>where T: Unpin,
impl<T> UnwindSafe for LogisticRegressionOutput<T>where T: UnwindSafe,
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
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.