pub enum DataError {
FeatureMatrixError(FeatureMatrixError),
InvalidShape {
expected: String,
got: String,
},
CsvError(Error),
IoError(Error),
SerializationError(Error),
InvalidTargets(String),
PreprocessingError(String),
ValidationError(String),
}Expand description
Unified error type for all data-related operations.
This enum aggregates errors from all data submodules, providing a single error type for data loading, preprocessing, validation, and access operations.
§Error Variants
FeatureMatrixError: Invalid feature matrix operations (index out of bounds, etc.)InvalidShape: Data dimensions don’t match expectationsCsvError: CSV parsing failureIoError: File system or I/O operation failureSerializationError: JSON serialization/deserialization failureInvalidTargets: Target values are invalid for the task- `PreprocessingError**: Data transformation or scaling failed
ValidationError: Data validation checks failed
Variants§
FeatureMatrixError(FeatureMatrixError)
Feature matrix operation error (index out of bounds, invalid access).
InvalidShape
Data dimensions don’t match expected shape.
CsvError(Error)
CSV parsing failed.
IoError(Error)
File system or I/O operation failed.
SerializationError(Error)
JSON serialization or deserialization failed.
InvalidTargets(String)
Target values are invalid for the task (e.g., wrong cardinality, non-finite).
PreprocessingError(String)
Data preprocessing or transformation failed.
ValidationError(String)
Data validation checks failed (finite values, ranges, etc.).
Trait Implementations§
Source§impl Error for DataError
impl Error for DataError
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 From<DataError> for DataLoaderError
impl From<DataError> for DataLoaderError
Source§impl From<DataError> for SplitterError
impl From<DataError> for SplitterError
Source§impl From<FeatureMatrixError> for DataError
impl From<FeatureMatrixError> for DataError
Source§fn from(source: FeatureMatrixError) -> Self
fn from(source: FeatureMatrixError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DataError
impl !RefUnwindSafe for DataError
impl Send for DataError
impl Sync for DataError
impl Unpin for DataError
impl !UnwindSafe for DataError
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> 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