pub struct MatrixFeatures {
pub n: usize,
pub nnz: usize,
pub density: f64,
pub max_row_nnz: usize,
pub mean_row_nnz: f64,
pub bandwidth: usize,
pub bandwidth_ratio: f64,
pub cond_estimate: f64,
pub spectral_radius: f64,
pub diag_dominance: f64,
pub symmetry_measure: f64,
pub has_positive_diagonal: bool,
}Expand description
Numerical features extracted from a sparse matrix for classification.
Fields§
§n: usizeMatrix dimension (rows = cols for square matrices).
nnz: usizeNumber of non-zero entries.
density: f64Density = nnz / (n * n).
max_row_nnz: usizeMaximum number of non-zeros in any single row.
mean_row_nnz: f64Mean number of non-zeros per row.
bandwidth: usizeHalf-bandwidth: max |i - j| over all stored (i, j).
bandwidth_ratio: f64Bandwidth ratio: bandwidth / n.
cond_estimate: f64Cheap condition number estimate (max diag / min diag).
spectral_radius: f64Spectral radius estimate via Gershgorin bound.
diag_dominance: f64Diagonal dominance ratio: min_i |a_ii| / sum_{j!=i} |a_ij|.
symmetry_measure: f64Symmetry measure: fraction of (i,j) entries that have a matching (j,i).
has_positive_diagonal: boolWhether all diagonal entries are positive.
Trait Implementations§
Source§impl Clone for MatrixFeatures
impl Clone for MatrixFeatures
Source§fn clone(&self) -> MatrixFeatures
fn clone(&self) -> MatrixFeatures
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 moreAuto Trait Implementations§
impl Freeze for MatrixFeatures
impl RefUnwindSafe for MatrixFeatures
impl Send for MatrixFeatures
impl Sync for MatrixFeatures
impl Unpin for MatrixFeatures
impl UnsafeUnpin for MatrixFeatures
impl UnwindSafe for MatrixFeatures
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