pub struct SplitRatios {
pub train: f32,
pub validation: f32,
pub test: f32,
}Expand description
Ratio configuration for train/validation/test assignment.
Fields§
§train: f32Fraction assigned to train.
validation: f32Fraction assigned to validation.
test: f32Fraction assigned to test.
Implementations§
Source§impl SplitRatios
impl SplitRatios
Sourcepub fn normalized(self) -> Result<Self, SamplerError>
pub fn normalized(self) -> Result<Self, SamplerError>
Validate that ratios sum to 1.0 (within epsilon).
Trait Implementations§
Source§impl Clone for SplitRatios
impl Clone for SplitRatios
Source§fn clone(&self) -> SplitRatios
fn clone(&self) -> SplitRatios
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SplitRatios
impl Debug for SplitRatios
Source§impl Default for SplitRatios
impl Default for SplitRatios
Source§impl<'de> Deserialize<'de> for SplitRatios
impl<'de> Deserialize<'de> for SplitRatios
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SplitRatios
impl Serialize for SplitRatios
impl Copy for SplitRatios
impl<'__de> Decode<'__de> for SplitRatioswhere
'__de:,
impl Encode for SplitRatios
Auto Trait Implementations§
impl Freeze for SplitRatios
impl RefUnwindSafe for SplitRatios
impl Send for SplitRatios
impl Sync for SplitRatios
impl Unpin for SplitRatios
impl UnsafeUnpin for SplitRatios
impl UnwindSafe for SplitRatios
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> 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