[][src]Enum ffsvm::Error

pub enum Error {
    AttributesUnordered {
        index: u32,
        value: f32,
        last_index: u32,
    },
    NoProbabilities,
    IterationsExceeded,
    NoGamma,
    NoCoef0,
    NoDegree,
    ParsingError(String),
}

Possible error types when classifying with one of the SVMs.

Variants

AttributesUnordered

This can be emitted when creating a SVM from a ModelFile. For models generated by libSVM's svm-train, the most common reason this occurs is skipping attributes. All attributes must be in sequential order 0, 1, 2, ..., n. If they are not, this error will be emitted. For more details see the documentation provided in ModelFile.

Fields of AttributesUnordered

index: u32

The index process that was not a direct successor of the previous index. Can be used for easier debugging the model file.

value: f32

The value of the given index. Can be used for debugging in conjunction with index.

last_index: u32

The last index processed. If everything were alright, then index should equal last_index + 1.

NoProbabilities

This error can be emitted by Predict::predict_probability in case the model loaded by ModelFile was not trained with probability estimates (svm-train -b 1).

IterationsExceeded

Can be emitted by Predict::predict_probability when predicting probabilities and the internal iteration limit was exceeded.

NoGamma

If the model does not have a gamma set this error may be raised.

NoCoef0

If the model does not have a coef0 set this error may be raised.

NoDegree

If the model does not have a degree set this error may be raised.

ParsingError(String)

Wrapper for internal parsing error when unifiying error handling.

Trait Implementations

impl From<NoneError> for Error[src]

impl From<ParseFloatError> for Error[src]

impl From<ParseIntError> for Error[src]

impl Debug for Error[src]

Auto Trait Implementations

impl Send for Error

impl Sync for Error

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> Cast for T where
    U: FromCast<T>, 
[src]

impl<T> FromCast for T[src]