pub struct SvmNode {
pub index: i32,
pub value: f64,
}Expand description
A single sparse feature: index:value.
In the original LIBSVM, a sentinel node with index = -1 marks the end
of each instance. In this Rust port, instance length is tracked by
Vec::len() instead, so no sentinel is needed.
Fields§
§index: i321-based feature index. Uses i32 to match the original C int and
preserve file-format compatibility.
value: f64Feature value.
Trait Implementations§
impl Copy for SvmNode
Source§impl<'de> Deserialize<'de> for SvmNode
impl<'de> Deserialize<'de> for SvmNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for SvmNode
Auto Trait Implementations§
impl Freeze for SvmNode
impl RefUnwindSafe for SvmNode
impl Send for SvmNode
impl Sync for SvmNode
impl Unpin for SvmNode
impl UnsafeUnpin for SvmNode
impl UnwindSafe for SvmNode
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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