pub struct LogisticRegression { /* private fields */ }Implementations§
Source§impl LogisticRegression
impl LogisticRegression
pub fn new(config: LogisticRegressionConfig) -> LogisticRegression
pub fn from_json(raw: &str) -> Option<LogisticRegression>
Trait Implementations§
Source§impl Clone for LogisticRegression
impl Clone for LogisticRegression
Source§fn clone(&self) -> LogisticRegression
fn clone(&self) -> LogisticRegression
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LogisticRegression
impl Debug for LogisticRegression
Source§impl IncrementalClassifier for LogisticRegression
impl IncrementalClassifier for LogisticRegression
Source§fn fit(&mut self, examples: &[TrainingExample])
fn fit(&mut self, examples: &[TrainingExample])
Train from scratch. Any previous weights are discarded.
Source§fn partial_fit(&mut self, examples: &[TrainingExample])
fn partial_fit(&mut self, examples: &[TrainingExample])
Incrementally update with a mini-batch. Previous weights are
preserved; this is the online-learning entrypoint.
Source§fn predict(&self, features: &[f32]) -> Option<u32>
fn predict(&self, features: &[f32]) -> Option<u32>
Predict the most likely class for one example.
Source§fn predict_proba(&self, features: &[f32]) -> Vec<f32>
fn predict_proba(&self, features: &[f32]) -> Vec<f32>
Predict a probability per class (0..num_classes).
Source§fn num_classes(&self) -> usize
fn num_classes(&self) -> usize
Number of distinct classes seen so far.
Source§fn num_features(&self) -> usize
fn num_features(&self) -> usize
Number of features the model expects. 0 until
fit/
partial_fit has been called with at least one example.Source§fn samples_seen(&self) -> u64
fn samples_seen(&self) -> u64
Total number of training examples the model has seen over
its lifetime — incremented by both
fit (reset to N) and
partial_fit (additive). Useful for lineage + rate-limiting.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request