pub struct ActiveLearningDataset<T, D: Dataset<T>> { /* private fields */ }Expand description
Active learning dataset wrapper that maintains labeled/unlabeled pools
Implementations§
Source§impl<T, D: Dataset<T>> ActiveLearningDataset<T, D>
impl<T, D: Dataset<T>> ActiveLearningDataset<T, D>
Sourcepub fn new(dataset: D, initial_labeled_indices: Vec<usize>) -> Self
pub fn new(dataset: D, initial_labeled_indices: Vec<usize>) -> Self
Create a new active learning dataset with initial labeled samples
Sourcepub fn add_labeled_samples(&mut self, indices: Vec<usize>)
pub fn add_labeled_samples(&mut self, indices: Vec<usize>)
Add samples to the labeled pool
Sourcepub fn get_labeled_dataset(&self) -> LabeledSubset<'_, T, D>where
D: Clone,
pub fn get_labeled_dataset(&self) -> LabeledSubset<'_, T, D>where
D: Clone,
Get labeled dataset
Sourcepub fn get_unlabeled_dataset(&self) -> UnlabeledSubset<'_, T, D>where
D: Clone,
pub fn get_unlabeled_dataset(&self) -> UnlabeledSubset<'_, T, D>where
D: Clone,
Get unlabeled dataset
Sourcepub fn labeled_indices(&self) -> &[usize]
pub fn labeled_indices(&self) -> &[usize]
Get labeled indices
Sourcepub fn unlabeled_indices(&self) -> &[usize]
pub fn unlabeled_indices(&self) -> &[usize]
Get unlabeled indices
Auto Trait Implementations§
impl<T, D> Freeze for ActiveLearningDataset<T, D>where
D: Freeze,
impl<T, D> RefUnwindSafe for ActiveLearningDataset<T, D>where
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, D> Send for ActiveLearningDataset<T, D>
impl<T, D> Sync for ActiveLearningDataset<T, D>
impl<T, D> Unpin for ActiveLearningDataset<T, D>
impl<T, D> UnsafeUnpin for ActiveLearningDataset<T, D>where
D: UnsafeUnpin,
impl<T, D> UnwindSafe for ActiveLearningDataset<T, D>where
D: UnwindSafe,
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
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