pub enum ClusterError {
Show 21 variants
InvalidClusters(usize),
InvalidInput(String),
ConvergenceFailure {
max_iters: usize,
},
EmptyDataset,
InsufficientData {
required: usize,
actual: usize,
},
InvalidDistanceMetric(String),
InvalidLinkage(String),
InvalidEpsilon(f64),
InvalidMinSamples(usize),
InvalidCovarianceType(String),
SingularMatrix,
TensorError(TorshError),
SciRS2Error(String),
InvalidInitialization(String),
InvalidAffinityMatrix(String),
MemoryError(String),
InvalidFeatureDimension {
expected: usize,
actual: usize,
},
InvalidAssignment(String),
NumericalInstability(String),
ConfigError(String),
NotImplemented(String),
}Expand description
Errors that can occur during clustering operations
Variants§
InvalidClusters(usize)
Invalid number of clusters
InvalidInput(String)
Invalid input data
ConvergenceFailure
Convergence failure
EmptyDataset
Empty dataset
InsufficientData
Insufficient data points
InvalidDistanceMetric(String)
Invalid distance metric
InvalidLinkage(String)
Invalid linkage criterion
InvalidEpsilon(f64)
Invalid epsilon parameter for DBSCAN
InvalidMinSamples(usize)
Invalid minimum samples parameter
InvalidCovarianceType(String)
Invalid covariance type for Gaussian Mixture
SingularMatrix
Singular matrix error
TensorError(TorshError)
Tensor operation error
SciRS2Error(String)
SciRS2 core error
InvalidInitialization(String)
Invalid initialization method
InvalidAffinityMatrix(String)
Invalid affinity matrix
MemoryError(String)
Memory allocation error
InvalidFeatureDimension
Invalid feature dimension
InvalidAssignment(String)
Invalid cluster assignment
NumericalInstability(String)
Numerical instability
ConfigError(String)
Configuration error
NotImplemented(String)
Algorithm not implemented
Implementations§
Source§impl ClusterError
impl ClusterError
Sourcepub fn scirs2_error(msg: impl Into<String>) -> Self
pub fn scirs2_error(msg: impl Into<String>) -> Self
Create a new SciRS2 error
Sourcepub fn invalid_input(msg: impl Into<String>) -> Self
pub fn invalid_input(msg: impl Into<String>) -> Self
Create a new invalid input error
Sourcepub fn config_error(msg: impl Into<String>) -> Self
pub fn config_error(msg: impl Into<String>) -> Self
Create a new configuration error
Sourcepub fn numerical_instability(msg: impl Into<String>) -> Self
pub fn numerical_instability(msg: impl Into<String>) -> Self
Create a new numerical instability error
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if error is recoverable
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
Get error severity level
Trait Implementations§
Source§impl Debug for ClusterError
impl Debug for ClusterError
Source§impl Display for ClusterError
impl Display for ClusterError
Source§impl Error for ClusterError
impl Error for ClusterError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<TorshError> for ClusterError
impl From<TorshError> for ClusterError
Source§fn from(source: TorshError) -> Self
fn from(source: TorshError) -> Self
Auto Trait Implementations§
impl Freeze for ClusterError
impl RefUnwindSafe for ClusterError
impl Send for ClusterError
impl Sync for ClusterError
impl Unpin for ClusterError
impl UnsafeUnpin for ClusterError
impl UnwindSafe for ClusterError
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> 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