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§fn clone(&self) -> SvmProblem
fn clone(&self) -> SvmProblem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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