pub struct SparseRandomProjection {
pub components: Array2<f64>,
pub n_components: usize,
pub n_features_in: usize,
pub density: f64,
pub seed: u64,
}Expand description
SparseRandomProjection — Achlioptas (2003). Entries take one of
{-√(s/k), 0, +√(s/k)} with probabilities {1/2s, 1 − 1/s, 1/2s}.
Fields§
§components: Array2<f64>Projection matrix R.
n_components: usizeKept rank.
n_features_in: usizeInput dimension.
density: f64Density 1/s (fraction of non-zero entries).
seed: u64Seed used at fit.
Implementations§
Source§impl SparseRandomProjection
impl SparseRandomProjection
Trait Implementations§
Source§impl Clone for SparseRandomProjection
impl Clone for SparseRandomProjection
Source§fn clone(&self) -> SparseRandomProjection
fn clone(&self) -> SparseRandomProjection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SparseRandomProjection
impl Debug for SparseRandomProjection
Source§impl<'de> Deserialize<'de> for SparseRandomProjection
impl<'de> Deserialize<'de> for SparseRandomProjection
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
Source§impl PartialEq for SparseRandomProjection
impl PartialEq for SparseRandomProjection
Source§impl Serialize for SparseRandomProjection
impl Serialize for SparseRandomProjection
impl StructuralPartialEq for SparseRandomProjection
Auto Trait Implementations§
impl Freeze for SparseRandomProjection
impl RefUnwindSafe for SparseRandomProjection
impl Send for SparseRandomProjection
impl Sync for SparseRandomProjection
impl Unpin for SparseRandomProjection
impl UnsafeUnpin for SparseRandomProjection
impl UnwindSafe for SparseRandomProjection
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