#[non_exhaustive]pub struct SampleConfig {
pub sample_strategy: SampleStrategy,
pub initial_batch_sample_size: Option<InitialBatchSampleSize>,
pub following_batch_sample_size: Option<FollowingBatchSampleSize>,
/* private fields */
}Expand description
Active learning data sampling config. For every active learning labeling iteration, it will select a batch of data based on the sampling strategy.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sample_strategy: SampleStrategyField to choose sampling strategy. Sampling strategy will decide which data should be selected for human labeling in every batch.
initial_batch_sample_size: Option<InitialBatchSampleSize>Decides sample size for the initial batch. initial_batch_sample_percentage is used by default.
following_batch_sample_size: Option<FollowingBatchSampleSize>Decides sample size for the following batches. following_batch_sample_percentage is used by default.
Implementations§
Source§impl SampleConfig
impl SampleConfig
pub fn new() -> Self
Sourcepub fn set_sample_strategy<T: Into<SampleStrategy>>(self, v: T) -> Self
pub fn set_sample_strategy<T: Into<SampleStrategy>>(self, v: T) -> Self
Sets the value of sample_strategy.
Sourcepub fn set_initial_batch_sample_size<T: Into<Option<InitialBatchSampleSize>>>(
self,
v: T,
) -> Self
pub fn set_initial_batch_sample_size<T: Into<Option<InitialBatchSampleSize>>>( self, v: T, ) -> Self
Sets the value of initial_batch_sample_size.
Note that all the setters affecting initial_batch_sample_size are mutually
exclusive.
Sourcepub fn initial_batch_sample_percentage(&self) -> Option<&i32>
pub fn initial_batch_sample_percentage(&self) -> Option<&i32>
The value of initial_batch_sample_size
if it holds a InitialBatchSamplePercentage, None if the field is not set or
holds a different branch.
Sourcepub fn set_initial_batch_sample_percentage<T: Into<i32>>(self, v: T) -> Self
pub fn set_initial_batch_sample_percentage<T: Into<i32>>(self, v: T) -> Self
Sets the value of initial_batch_sample_size
to hold a InitialBatchSamplePercentage.
Note that all the setters affecting initial_batch_sample_size are
mutually exclusive.
Sourcepub fn set_following_batch_sample_size<T: Into<Option<FollowingBatchSampleSize>>>(
self,
v: T,
) -> Self
pub fn set_following_batch_sample_size<T: Into<Option<FollowingBatchSampleSize>>>( self, v: T, ) -> Self
Sets the value of following_batch_sample_size.
Note that all the setters affecting following_batch_sample_size are mutually
exclusive.
Sourcepub fn following_batch_sample_percentage(&self) -> Option<&i32>
pub fn following_batch_sample_percentage(&self) -> Option<&i32>
The value of following_batch_sample_size
if it holds a FollowingBatchSamplePercentage, None if the field is not set or
holds a different branch.
Sourcepub fn set_following_batch_sample_percentage<T: Into<i32>>(self, v: T) -> Self
pub fn set_following_batch_sample_percentage<T: Into<i32>>(self, v: T) -> Self
Sets the value of following_batch_sample_size
to hold a FollowingBatchSamplePercentage.
Note that all the setters affecting following_batch_sample_size are
mutually exclusive.
Trait Implementations§
Source§impl Clone for SampleConfig
impl Clone for SampleConfig
Source§fn clone(&self) -> SampleConfig
fn clone(&self) -> SampleConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more