pub struct ActiveLearner { /* private fields */ }Expand description
Active learning selector.
Implementations§
Source§impl ActiveLearner
impl ActiveLearner
Sourcepub fn new(strategy: SamplingStrategy) -> Self
pub fn new(strategy: SamplingStrategy) -> Self
Create a new active learner with given strategy.
Sourcepub fn with_uncertainty_weight(self, weight: f64) -> Self
pub fn with_uncertainty_weight(self, weight: f64) -> Self
Set uncertainty weight for hybrid mode.
Sourcepub fn select<'a>(
&self,
candidates: &'a [Candidate],
k: usize,
) -> Vec<&'a Candidate>
pub fn select<'a>( &self, candidates: &'a [Candidate], k: usize, ) -> Vec<&'a Candidate>
Select top-k candidates for annotation.
Sourcepub fn select_with_scores(
&self,
candidates: &[Candidate],
k: usize,
) -> SelectionResult
pub fn select_with_scores( &self, candidates: &[Candidate], k: usize, ) -> SelectionResult
Select with detailed results including warnings about fallbacks.
Trait Implementations§
Source§impl Clone for ActiveLearner
impl Clone for ActiveLearner
Source§fn clone(&self) -> ActiveLearner
fn clone(&self) -> ActiveLearner
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 ActiveLearner
impl Debug for ActiveLearner
Auto Trait Implementations§
impl Freeze for ActiveLearner
impl RefUnwindSafe for ActiveLearner
impl Send for ActiveLearner
impl Sync for ActiveLearner
impl Unpin for ActiveLearner
impl UnsafeUnpin for ActiveLearner
impl UnwindSafe for ActiveLearner
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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