pub struct DiversityBasedSampling {
pub batch_size: usize,
pub diversity_method: String,
pub distance_metric: String,
pub kernel_bandwidth: f64,
pub regularization: f64,
pub max_iter: usize,
pub random_state: Option<u64>,
}Expand description
Diversity-Based Sampling for active learning
This method focuses purely on selecting diverse samples from the unlabeled data using various diversity measures including determinantal point processes (DPP), maximum marginal relevance (MMR), and clustering-based approaches.
Fields§
§batch_size: usizebatch_size
diversity_method: Stringdiversity_method
distance_metric: Stringdistance_metric
kernel_bandwidth: f64kernel_bandwidth
regularization: f64regularization
max_iter: usizemax_iter
random_state: Option<u64>random_state
Implementations§
Source§impl DiversityBasedSampling
impl DiversityBasedSampling
pub fn new() -> Self
pub fn batch_size(self, batch_size: usize) -> Result<Self>
pub fn diversity_method(self, diversity_method: String) -> Self
pub fn distance_metric(self, distance_metric: String) -> Self
pub fn kernel_bandwidth(self, kernel_bandwidth: f64) -> Self
pub fn regularization(self, regularization: f64) -> Self
pub fn max_iter(self, max_iter: usize) -> 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 DiversityBasedSampling
impl Clone for DiversityBasedSampling
Source§fn clone(&self) -> DiversityBasedSampling
fn clone(&self) -> DiversityBasedSampling
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 DiversityBasedSampling
impl Debug for DiversityBasedSampling
Auto Trait Implementations§
impl Freeze for DiversityBasedSampling
impl RefUnwindSafe for DiversityBasedSampling
impl Send for DiversityBasedSampling
impl Sync for DiversityBasedSampling
impl Unpin for DiversityBasedSampling
impl UnwindSafe for DiversityBasedSampling
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