pub enum Error {
AttributesUnordered {
index: u32,
value: f32,
last_index: u32,
},
NoProbabilities,
IterationsExceeded,
NoGamma,
NoCoef0,
NoDegree,
Parsing(String),
MissingRequiredAttribute,
}
Expand description
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
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.
Parsing(String)
Wrapper for internal parsing error when unifiying error handling.
MissingRequiredAttribute
A required attribute was not found.