pub struct BatchModeActiveLearning {
pub batch_size: usize,
pub diversity_weight: f64,
pub strategy: String,
pub distance_metric: String,
pub random_state: Option<u64>,
}Expand description
Batch Mode Active Learning using uncertainty and diversity
This method selects a batch of samples by balancing uncertainty (information gain) and diversity (avoiding redundant samples) using various strategies.
Fields§
§batch_size: usizebatch_size
diversity_weight: f64diversity_weight
strategy: Stringstrategy
distance_metric: Stringdistance_metric
random_state: Option<u64>random_state
Implementations§
Source§impl BatchModeActiveLearning
impl BatchModeActiveLearning
pub fn new() -> Self
pub fn batch_size(self, batch_size: usize) -> Result<Self>
pub fn diversity_weight(self, diversity_weight: f64) -> Result<Self>
pub fn strategy(self, strategy: String) -> Self
pub fn distance_metric(self, distance_metric: String) -> Self
pub fn random_state(self, random_state: u64) -> Self
pub fn query( &self, X: &ArrayView2<'_, f64>, probabilities: &ArrayView2<'_, f64>, ) -> Result<Vec<usize>>
Trait Implementations§
Source§impl Clone for BatchModeActiveLearning
impl Clone for BatchModeActiveLearning
Source§fn clone(&self) -> BatchModeActiveLearning
fn clone(&self) -> BatchModeActiveLearning
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 moreSource§impl Debug for BatchModeActiveLearning
impl Debug for BatchModeActiveLearning
Auto Trait Implementations§
impl Freeze for BatchModeActiveLearning
impl RefUnwindSafe for BatchModeActiveLearning
impl Send for BatchModeActiveLearning
impl Sync for BatchModeActiveLearning
impl Unpin for BatchModeActiveLearning
impl UnwindSafe for BatchModeActiveLearning
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> 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