Struct fetish_lib::func_schmear::FuncSchmear[][src]

pub struct FuncSchmear {
    pub mean: Array2<f32>,
    pub covariance: FuncScatterTensor,
}
Expand description

Represents a probability distribution over linear mappings whose covariance structure is separable between input and output. This can be conceptualized as a specialization of Schmear for a distribution over matrices where the covariance of the (vectorized) random variable takes the separable form kron(out_covariance, in_covariance) for out_covariance and in_covariance output coordinate and input coordinate covariances, respectively, and kron referring to crate::linalg_utils::kron See also FuncScatterTensor.

Fields

mean: Array2<f32>covariance: FuncScatterTensor

Implementations

impl FuncSchmear[src]

pub fn compress(&self, mat: ArrayView2<'_, f32>) -> Schmear[src]

Given a transformation matrix from the full, flattened dimension of this FuncSchmear to a smaller dimension, performs a fused FuncSchmear::flatten and Schmear::transform operation using the specified transformation. This fused operation is written to be much faster than manually performing the aforementioned operations.

pub fn flatten(&self) -> Schmear[src]

Converts this FuncSchmear over linear maps to its corresponding Schmear over vectorized linear mappings.

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

Computes the output Schmear of this FuncSchmear applied to a given argument Schmear. Given an input schmear, computes the output schmear which would result from sampling (function, input) pairs, computing function(input) for each of them, and then obtaining the Schmear over those results.

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