pub enum PartitionError {
TooFewFolds {
k: usize,
},
MoreFoldsThanSamples {
k: usize,
n: usize,
},
NeedsClasses,
NeedsGroups,
ClassTooSmall {
class: u32,
count: usize,
k: usize,
},
TooFewGroups {
groups: usize,
k: usize,
},
GapTooLarge {
gap: usize,
k: usize,
},
}Expand description
Why the samples cannot be cut that way.
One type for the five schemes, and not one each: they are the ways a cut fails, and which scheme was asked for is already in the message.
Variants§
TooFewFolds
Fewer than two folds.
MoreFoldsThanSamples
More folds than there are samples to put in them.
NeedsClasses
Stratifying was asked for and no class was said.
NeedsGroups
Grouping was asked for and no group was said.
ClassTooSmall
A class with fewer members than folds cannot be in every fold.
TooFewGroups
Fewer groups than folds: one fold would get nothing.
GapTooLarge
The gap eats the whole of the first fold’s training set.
Trait Implementations§
Source§impl Clone for PartitionError
impl Clone for PartitionError
Source§fn clone(&self) -> PartitionError
fn clone(&self) -> PartitionError
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 PartitionError
impl Debug for PartitionError
Source§impl Display for PartitionError
impl Display for PartitionError
Source§impl Error for PartitionError
impl Error for PartitionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for PartitionError
impl PartialEq for PartitionError
impl Eq for PartitionError
impl StructuralPartialEq for PartitionError
Auto Trait Implementations§
impl Freeze for PartitionError
impl RefUnwindSafe for PartitionError
impl Send for PartitionError
impl Sync for PartitionError
impl Unpin for PartitionError
impl UnsafeUnpin for PartitionError
impl UnwindSafe for PartitionError
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