pub struct SvmProblem {
pub labels: Vec<f64>,
pub instances: Vec<Vec<SvmNode>>,
}Expand description
A training/test problem: a collection of labelled sparse instances.
load_problem validates that sparse feature indices are ascending and
within the configured crate::io::LoadOptions bounds. When constructing a
problem manually, keep labels.len() == instances.len() and use ascending
feature indices to match LIBSVM input assumptions.
Fields§
§labels: Vec<f64>Label (class for classification, target for regression) per instance.
instances: Vec<Vec<SvmNode>>Sparse feature vectors, one per instance.
Trait Implementations§
Source§impl Clone for SvmProblem
impl Clone for SvmProblem
Source§impl Debug for SvmProblem
impl Debug for SvmProblem
Source§impl PartialEq for SvmProblem
impl PartialEq for SvmProblem
impl StructuralPartialEq for SvmProblem
Auto Trait Implementations§
impl Freeze for SvmProblem
impl RefUnwindSafe for SvmProblem
impl Send for SvmProblem
impl Sync for SvmProblem
impl Unpin for SvmProblem
impl UnsafeUnpin for SvmProblem
impl UnwindSafe for SvmProblem
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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