Struct fetish_lib::feature_space_info::FeatureSpaceInfo[][src]

pub struct FeatureSpaceInfo {
    pub base_dimensions: usize,
    pub feature_dimensions: usize,
    pub feature_collections: Vec<Box<dyn FeatureCollection>>,
    pub sketcher: Option<LinearSketch>,
}
Expand description

Information about the base space dimension, the preferred sketcher for the space, the feature dimensions, and the feature mapping. In other words, this struct carries all information defining spaces which are associated to a particular type.

As in the FETISH paper, the way this is conceptually organized is: Base space -(sketcher)-> Compressed space -(feature mapping)-> Feature space.

Fields

base_dimensions: usizefeature_dimensions: usizefeature_collections: Vec<Box<dyn FeatureCollection>>sketcher: Option<LinearSketch>

Implementations

impl FeatureSpaceInfo[src]

pub fn get_projection_matrix(&self) -> Array2<f32>[src]

Gets the projection matrix from the base space to the compressed space.

pub fn get_sketched_dimensions(&self) -> usize[src]

Gets the dimensionality of the compressed space.

pub fn sketch(&self, mean: ArrayView1<'_, f32>) -> Array1<f32>[src]

Transforms a vector from the base space to the compressed space.

pub fn compress_schmear(&self, schmear: &Schmear) -> Schmear[src]

Transforms a schmear from the base space to the compressed space.

pub fn get_feature_jacobian(&self, in_vec: ArrayView1<'_, f32>) -> Array2<f32>[src]

Gets the Jacobian for the feature mapping evaluated at the given compressed vector.

pub fn get_features_from_base(&self, in_vec: ArrayView1<'_, f32>) -> Array1<f32>[src]

Maps a vector from the base space through the sketcher and through the feature map to yield a vector in the feature space.

pub fn get_features(&self, in_vec: ArrayView1<'_, f32>) -> Array1<f32>[src]

Gets the feature vector for the given compressed vector.

pub fn get_features_mat(&self, in_mat: ArrayView2<'_, f32>) -> Array2<f32>[src]

See to_features_mat. Gets features for a collection of compressed vectors.

pub fn featurize_schmear(&self, x: &Schmear) -> Schmear[src]

Given a Schmear in the compressed space, uses an unscented transform to estimate what it would map to through the feature mapping.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V