SVMError

Enum SVMError 

Source
pub enum SVMError {
Show 37 variants InvalidInput { message: String, suggestion: Option<String>, }, DimensionMismatch { expected: Vec<usize>, actual: Vec<usize>, context: String, expected_str: String, actual_str: String, }, EmptyDataset { context: String, }, InvalidLabels { reason: String, suggestion: String, }, InsufficientData { required: usize, actual: usize, context: String, }, InvalidHyperparameter { parameter: String, value: String, reason: String, valid_range: Option<String>, }, InvalidKernel { kernel_type: String, message: String, suggestion: String, }, InvalidSolver { solver: String, reason: String, compatible_solvers: Vec<String>, }, ConvergenceFailure { iterations: usize, final_objective: Option<f64>, tolerance: f64, suggestions: Vec<String>, }, NumericalInstability { issue: String, context: String, suggestions: Vec<String>, }, OptimizationFailure { algorithm: String, reason: String, iteration: Option<usize>, objective_value: Option<f64>, }, InfeasibleProblem { reason: String, suggestions: Vec<String>, }, KernelComputationError { kernel_type: String, reason: String, sample_indices: Option<Vec<usize>>, }, NonPositiveSemidefiniteKernel { eigenvalue_info: Option<String>, suggestions: Vec<String>, }, KernelCacheError { operation: String, reason: String, memory_usage: Option<usize>, }, OutOfMemory { operation: String, requested_bytes: Option<usize>, available_bytes: Option<usize>, suggestions: Vec<String>, }, InsufficientResources { resource: String, required: String, available: String, }, AllocationError { purpose: String, reason: String, size_bytes: Option<usize>, }, ModelNotTrained { operation: String, suggestions: Vec<String>, }, PredictionError { reason: String, sample_count: Option<usize>, context: String, }, ModelStateInconsistency { issue: String, context: String, }, ParallelProcessingError { operation: String, reason: String, thread_count: Option<usize>, }, SynchronizationError { details: String, operation: String, }, GpuError { reason: String, device_info: Option<String>, fallback_available: bool, }, SimdError { operation: String, reason: String, fallback_used: bool, }, SerializationError { operation: String, reason: String, format: String, }, IoError { operation: String, path: Option<String>, reason: String, }, CrossValidationError { fold: Option<usize>, reason: String, total_folds: Option<usize>, }, HyperparameterOptimizationError { method: String, reason: String, iteration: Option<usize>, best_score: Option<f64>, }, MultiClassError { strategy: String, reason: String, class_count: Option<usize>, }, MultiLabelError { reason: String, label_indices: Option<Vec<usize>>, }, StructuredSVMError { reason: String, sequence_info: Option<String>, }, TopicModelingError { model_type: String, reason: String, topic_count: Option<usize>, }, TextProcessingError { operation: String, reason: String, document_index: Option<usize>, }, ComputerVisionError { kernel_type: String, reason: String, image_dimensions: Option<(usize, usize)>, }, InternalError { message: String, location: String, debug_info: Option<String>, }, Unknown { message: String, context: String, },
}
Expand description

Main SVM Error type that encompasses all possible SVM operation failures

Variants§

§

InvalidInput

Invalid input data dimensions or format

Fields

§message: String
§suggestion: Option<String>
§

DimensionMismatch

Dimension mismatch between arrays

Fields

§expected: Vec<usize>
§actual: Vec<usize>
§context: String
§expected_str: String
§actual_str: String
§

EmptyDataset

Empty dataset provided

Fields

§context: String
§

InvalidLabels

Invalid labels (e.g., non-finite, wrong format)

Fields

§reason: String
§suggestion: String
§

InsufficientData

Insufficient data for training

Fields

§required: usize
§actual: usize
§context: String
§

InvalidHyperparameter

Invalid hyperparameters

Fields

§parameter: String
§value: String
§reason: String
§valid_range: Option<String>
§

InvalidKernel

Invalid kernel configuration

Fields

§kernel_type: String
§message: String
§suggestion: String
§

InvalidSolver

Invalid solver configuration

Fields

§solver: String
§reason: String
§compatible_solvers: Vec<String>
§

ConvergenceFailure

Training failed to converge

Fields

§iterations: usize
§final_objective: Option<f64>
§tolerance: f64
§suggestions: Vec<String>
§

NumericalInstability

Numerical instability during training

Fields

§issue: String
§context: String
§suggestions: Vec<String>
§

OptimizationFailure

Optimization algorithm failure

Fields

§algorithm: String
§reason: String
§iteration: Option<usize>
§objective_value: Option<f64>
§

InfeasibleProblem

Infeasible optimization problem

Fields

§reason: String
§suggestions: Vec<String>
§

KernelComputationError

Kernel matrix computation failed

Fields

§kernel_type: String
§reason: String
§sample_indices: Option<Vec<usize>>
§

NonPositiveSemidefiniteKernel

Kernel matrix is not positive semidefinite

Fields

§eigenvalue_info: Option<String>
§suggestions: Vec<String>
§

KernelCacheError

Kernel cache errors

Fields

§operation: String
§reason: String
§memory_usage: Option<usize>
§

OutOfMemory

Out of memory during computation

Fields

§operation: String
§requested_bytes: Option<usize>
§available_bytes: Option<usize>
§suggestions: Vec<String>
§

InsufficientResources

Insufficient computational resources

Fields

§resource: String
§required: String
§available: String
§

AllocationError

Memory allocation failed

Fields

§purpose: String
§reason: String
§size_bytes: Option<usize>
§

ModelNotTrained

Model not trained

Fields

§operation: String
§suggestions: Vec<String>
§

PredictionError

Prediction failed

Fields

§reason: String
§sample_count: Option<usize>
§context: String
§

ModelStateInconsistency

Model state inconsistency

Fields

§issue: String
§context: String
§

ParallelProcessingError

Parallel processing error

Fields

§operation: String
§reason: String
§thread_count: Option<usize>
§

SynchronizationError

Thread synchronization error

Fields

§details: String
§operation: String
§

GpuError

GPU computation error

Fields

§reason: String
§device_info: Option<String>
§fallback_available: bool
§

SimdError

SIMD operation error

Fields

§operation: String
§reason: String
§fallback_used: bool
§

SerializationError

Model serialization/deserialization error

Fields

§operation: String
§reason: String
§format: String
§

IoError

File I/O error during model operations

Fields

§operation: String
§reason: String
§

CrossValidationError

Cross-validation error

Fields

§reason: String
§total_folds: Option<usize>
§

HyperparameterOptimizationError

Hyperparameter optimization error

Fields

§method: String
§reason: String
§iteration: Option<usize>
§best_score: Option<f64>
§

MultiClassError

Multi-class strategy error

Fields

§strategy: String
§reason: String
§class_count: Option<usize>
§

MultiLabelError

Multi-label SVM error

Fields

§reason: String
§label_indices: Option<Vec<usize>>
§

StructuredSVMError

Structured SVM error

Fields

§reason: String
§sequence_info: Option<String>
§

TopicModelingError

Topic modeling integration error

Fields

§model_type: String
§reason: String
§topic_count: Option<usize>
§

TextProcessingError

Text processing error

Fields

§operation: String
§reason: String
§document_index: Option<usize>
§

ComputerVisionError

Computer vision kernel error

Fields

§kernel_type: String
§reason: String
§image_dimensions: Option<(usize, usize)>
§

InternalError

Internal error (should not normally occur)

Fields

§message: String
§location: String
§debug_info: Option<String>
§

Unknown

Unknown or unexpected error

Fields

§message: String
§context: String

Implementations§

Source§

impl SVMError

Source

pub fn severity(&self) -> ErrorSeverity

Get the severity level of this error

Source

pub fn error_code(&self) -> u32

Get error code for programmatic handling

Source

pub fn suggestions(&self) -> Vec<String>

Get suggestions for resolving this error

Source

pub fn detailed_report(&self) -> String

Create a detailed error report

Source§

impl SVMError

Convenience functions for creating common errors

Source

pub fn invalid_input(message: impl Into<String>) -> Self

Create an invalid input error with suggestions

Source

pub fn invalid_input_with_suggestion( message: impl Into<String>, suggestion: impl Into<String>, ) -> Self

Create an invalid input error with a suggestion

Source

pub fn dimension_mismatch( expected: Vec<usize>, actual: Vec<usize>, context: impl Into<String>, ) -> Self

Create a dimension mismatch error

Source

pub fn convergence_failure( iterations: usize, tolerance: f64, suggestions: Vec<String>, ) -> Self

Create a convergence failure error

Source

pub fn model_not_trained(operation: impl Into<String>) -> Self

Create a model not trained error

Source

pub fn out_of_memory(operation: impl Into<String>) -> Self

Create an out of memory error with suggestions

Trait Implementations§

Source§

impl Clone for SVMError

Source§

fn clone(&self) -> SVMError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SVMError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SVMError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for SVMError

1.30.0 · Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for SVMError

Integration with other error types

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<GpuKernelError> for SVMError

Conversion functions for backward compatibility with existing error types

Source§

fn from(err: GpuKernelError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SVMError

Source§

fn eq(&self, other: &SVMError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SVMError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V