#[non_exhaustive]pub struct ElasticMultinomialResult {
pub n_classes: usize,
pub classes: Vec<usize>,
pub class_models: Vec<ElasticLogisticResult>,
pub train_probabilities: FdMatrix,
pub predicted_classes: Vec<usize>,
pub train_accuracy: f64,
}Expand description
Result of elastic multinomial logistic regression (one-vs-rest, K ≥ 2 classes).
Each field corresponds to the joint outcome of fitting K binary
ElasticLogisticResult models — one per class — and then normalizing the
per-class sigmoid outputs to produce class posteriors.
§Probability convention
train_probabilities is an n × K matrix whose row i is the row-normalised
vector of OvR sigmoid scores, so each row sums to 1. Predicted labels are the
per-row argmax mapped through classes.
§K = 2 agreement
When K = 2, the predicted labels agree with the binary elastic_logistic on
separable data (the OvR construction reduces to the binary case).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.n_classes: usizeNumber of classes K.
classes: Vec<usize>Sorted distinct class labels (always 0..K).
class_models: Vec<ElasticLogisticResult>One OvR binary model per class, length K.
train_probabilities: FdMatrixRow-normalised OvR probabilities (n × K); each row sums to 1.
predicted_classes: Vec<usize>Predicted class labels for training data, length n.
train_accuracy: f64Fraction of training curves correctly classified.
Implementations§
Trait Implementations§
Source§impl Clone for ElasticMultinomialResult
impl Clone for ElasticMultinomialResult
Source§fn clone(&self) -> ElasticMultinomialResult
fn clone(&self) -> ElasticMultinomialResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ElasticMultinomialResult
impl Debug for ElasticMultinomialResult
Source§impl PartialEq for ElasticMultinomialResult
impl PartialEq for ElasticMultinomialResult
impl StructuralPartialEq for ElasticMultinomialResult
Auto Trait Implementations§
impl Freeze for ElasticMultinomialResult
impl RefUnwindSafe for ElasticMultinomialResult
impl Send for ElasticMultinomialResult
impl Sync for ElasticMultinomialResult
impl Unpin for ElasticMultinomialResult
impl UnsafeUnpin for ElasticMultinomialResult
impl UnwindSafe for ElasticMultinomialResult
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.