pub struct OnlineLearningSystem { /* private fields */ }Expand description
Unified online learning system combining multiple strategies
Implementations§
Source§impl OnlineLearningSystem
impl OnlineLearningSystem
Sourcepub fn new(initial_constraint: LinearConstraint) -> Self
pub fn new(initial_constraint: LinearConstraint) -> Self
Create a new online learning system
Sourcepub fn process_labeled_sample(
&mut self,
sample: Array1<f32>,
is_feasible: bool,
) -> LogicResult<()>
pub fn process_labeled_sample( &mut self, sample: Array1<f32>, is_feasible: bool, ) -> LogicResult<()>
Process a new labeled sample
Sourcepub fn process_unlabeled_sample(&mut self, sample: Array1<f32>)
pub fn process_unlabeled_sample(&mut self, sample: Array1<f32>)
Process an unlabeled sample (for anomaly detection and active learning)
Sourcepub fn add_feedback(
&mut self,
sample: &Array1<f32>,
satisfaction: f32,
) -> LogicResult<()>
pub fn add_feedback( &mut self, sample: &Array1<f32>, satisfaction: f32, ) -> LogicResult<()>
Add user feedback
Sourcepub fn get_best_constraint(&self) -> &LinearConstraint
pub fn get_best_constraint(&self) -> &LinearConstraint
Get the current best constraint estimate
Sourcepub fn confidence(&self) -> f32
pub fn confidence(&self) -> f32
Get confidence in current constraint
Sourcepub fn discovered_constraints(&self) -> &[LinearConstraint]
pub fn discovered_constraints(&self) -> &[LinearConstraint]
Get discovered anomaly-based constraints
Sourcepub fn query_next(&self) -> Option<Array1<f32>>
pub fn query_next(&self) -> Option<Array1<f32>>
Get next sample to query (active learning)
Sourcepub fn set_use_incremental(&mut self, use_it: bool)
pub fn set_use_incremental(&mut self, use_it: bool)
Enable/disable components
pub fn set_use_anomaly(&mut self, use_it: bool)
pub fn set_use_active(&mut self, use_it: bool)
pub fn set_use_feedback(&mut self, use_it: bool)
Trait Implementations§
Source§impl Clone for OnlineLearningSystem
impl Clone for OnlineLearningSystem
Source§fn clone(&self) -> OnlineLearningSystem
fn clone(&self) -> OnlineLearningSystem
Returns a duplicate 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 Freeze for OnlineLearningSystem
impl RefUnwindSafe for OnlineLearningSystem
impl Send for OnlineLearningSystem
impl Sync for OnlineLearningSystem
impl Unpin for OnlineLearningSystem
impl UnwindSafe for OnlineLearningSystem
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 more