#[non_exhaustive]pub enum MattenMlprepError {
DynamicTensor,
ExpectedMatrix {
shape: Vec<usize>,
},
InvalidRatio(f64),
EmptySplit {
rows: usize,
train_ratio: f64,
},
ZeroVariance {
column: usize,
},
Matten(MattenError),
}Expand description
Errors produced by matten-mlprep preprocessing functions.
#[non_exhaustive] so future variants are not a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DynamicTensor
A dynamic (Element) tensor was passed. Convert it to a numeric tensor
first with Tensor::try_numeric().
ExpectedMatrix
The input was not rank-2. matten-mlprep operates only on matrices with
the convention rows = samples, columns = features.
InvalidRatio(f64)
train_ratio was not a finite value in the open interval (0.0, 1.0).
EmptySplit
The requested split would leave the train set empty
(floor(rows * train_ratio) == 0).
Fields
ZeroVariance
A column has zero variance / range and therefore cannot be scaled.
Matten(MattenError)
Core matten rejected a constructed result.
Trait Implementations§
Source§impl Debug for MattenMlprepError
impl Debug for MattenMlprepError
Source§impl Display for MattenMlprepError
impl Display for MattenMlprepError
Source§impl Error for MattenMlprepError
impl Error for MattenMlprepError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for MattenMlprepError
impl !UnwindSafe for MattenMlprepError
impl Freeze for MattenMlprepError
impl Send for MattenMlprepError
impl Sync for MattenMlprepError
impl Unpin for MattenMlprepError
impl UnsafeUnpin for MattenMlprepError
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