pub struct SyntheticConfig {
pub augmentation_ratio: f32,
pub quality_threshold: f32,
pub diversity_weight: f32,
pub max_attempts: usize,
pub seed: u64,
pub andon: AndonConfig,
}Expand description
Configuration for synthetic data generation.
Controls the ratio of synthetic to original data, quality thresholds, and diversity weighting for sample selection.
§Example
use aprender::synthetic::SyntheticConfig;
let config = SyntheticConfig::default()
.with_augmentation_ratio(1.0) // 1x synthetic data
.with_quality_threshold(0.8) // 80% minimum quality
.with_diversity_weight(0.3); // 30% weight on diversity
assert_eq!(config.augmentation_ratio, 1.0);
assert_eq!(config.quality_threshold, 0.8);Fields§
§augmentation_ratio: f32Ratio of synthetic to original data (0.0 = none, 2.0 = 2x original).
quality_threshold: f32Minimum quality threshold for accepting generated samples [0.0, 1.0].
diversity_weight: f32Weight given to diversity vs quality in sample selection [0.0, 1.0].
max_attempts: usizeMaximum generation attempts per sample before giving up.
seed: u64Random seed for reproducibility.
andon: AndonConfigAndon configuration for quality monitoring (Toyota Jidoka).
Implementations§
Source§impl SyntheticConfig
impl SyntheticConfig
Sourcepub fn with_augmentation_ratio(self, ratio: f32) -> Self
pub fn with_augmentation_ratio(self, ratio: f32) -> Self
Set the augmentation ratio.
§Arguments
ratio- Ratio of synthetic to original data (clamped to [0.0, 10.0])
Sourcepub fn with_quality_threshold(self, threshold: f32) -> Self
pub fn with_quality_threshold(self, threshold: f32) -> Self
Set the quality threshold.
§Arguments
threshold- Minimum quality score for acceptance (clamped to [0.0, 1.0])
Sourcepub fn with_diversity_weight(self, weight: f32) -> Self
pub fn with_diversity_weight(self, weight: f32) -> Self
Set the diversity weight.
§Arguments
weight- Weight for diversity vs quality (clamped to [0.0, 1.0])
Sourcepub fn with_max_attempts(self, attempts: usize) -> Self
pub fn with_max_attempts(self, attempts: usize) -> Self
Sourcepub fn with_andon(self, andon: AndonConfig) -> Self
pub fn with_andon(self, andon: AndonConfig) -> Self
Set the Andon configuration for quality monitoring.
Sourcepub fn with_andon_enabled(self, enabled: bool) -> Self
pub fn with_andon_enabled(self, enabled: bool) -> Self
Enable or disable Andon monitoring.
Sourcepub fn with_andon_rejection_threshold(self, threshold: f32) -> Self
pub fn with_andon_rejection_threshold(self, threshold: f32) -> Self
Set the Andon rejection threshold.
Sourcepub fn target_count(&self, seed_count: usize) -> usize
pub fn target_count(&self, seed_count: usize) -> usize
Sourcepub fn meets_quality(&self, score: f32) -> bool
pub fn meets_quality(&self, score: f32) -> bool
Check if a quality score meets the threshold.
Sourcepub fn combined_score(&self, quality: f32, diversity: f32) -> f32
pub fn combined_score(&self, quality: f32, diversity: f32) -> f32
Trait Implementations§
Source§impl Clone for SyntheticConfig
impl Clone for SyntheticConfig
Source§fn clone(&self) -> SyntheticConfig
fn clone(&self) -> SyntheticConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SyntheticConfig
impl Debug for SyntheticConfig
Source§impl Default for SyntheticConfig
impl Default for SyntheticConfig
Source§fn default() -> Self
fn default() -> Self
Creates a default configuration with conservative settings.
augmentation_ratio: 0.5 (50% synthetic data)quality_threshold: 0.7 (70% minimum quality)diversity_weight: 0.3 (30% diversity weight)max_attempts: 10 attempts per sampleseed: 42 for reproducibilityandon: Enabled with 90% rejection threshold (Toyota Jidoka)
Source§impl PartialEq for SyntheticConfig
impl PartialEq for SyntheticConfig
impl StructuralPartialEq for SyntheticConfig
Auto Trait Implementations§
impl Freeze for SyntheticConfig
impl RefUnwindSafe for SyntheticConfig
impl Send for SyntheticConfig
impl Sync for SyntheticConfig
impl Unpin for SyntheticConfig
impl UnsafeUnpin for SyntheticConfig
impl UnwindSafe for SyntheticConfig
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
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>
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>
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