pub struct FunctionSpaceInfo<'a> {
pub in_feat_info: &'a FeatureSpaceInfo,
pub out_feat_info: &'a FeatureSpaceInfo,
}Expand description
Represents information that’s available about a function type A -> B
in terms of the FeatureSpaceInfo for the input and output types.
Here, it is important to bear in mind that the flow of data through
the application of a typical crate::term_model::TermModel is:
input -(input sketcher)-> compressed input -(input feature mapping)-> input features -(model matrix)-> compressed output.
Fields§
§in_feat_info: &'a FeatureSpaceInfo§out_feat_info: &'a FeatureSpaceInfoImplementations§
Source§impl<'a> FunctionSpaceInfo<'a>
impl<'a> FunctionSpaceInfo<'a>
Sourcepub fn get_feature_dimensions(&self) -> usize
pub fn get_feature_dimensions(&self) -> usize
Gets the number of dimensions for the input feature space.
Sourcepub fn get_output_dimensions(&self) -> usize
pub fn get_output_dimensions(&self) -> usize
Gets the output dimensionality of mappings defined by matrices
relative to this FunctionSpaceInfo, so the dimension of the compressed
output space.
Sourcepub fn get_full_dimensions(&self) -> usize
pub fn get_full_dimensions(&self) -> usize
Gets the total number of dimensions required to define a model
matrix for a function within this FunctionSpaceInfo.
Sourcepub fn jacobian(
&self,
mat: ArrayView2<'_, f32>,
input: ArrayView1<'_, f32>,
) -> Array2<f32>
pub fn jacobian( &self, mat: ArrayView2<'_, f32>, input: ArrayView1<'_, f32>, ) -> Array2<f32>
Gets the Jacobian for the composite mapping
compressed input -(input feature mapping)-> input features -(mat)-> compressed output
evaluated at the given compressed input vector.
Sourcepub fn apply(
&self,
mat: ArrayView2<'_, f32>,
input: ArrayView1<'_, f32>,
) -> Array1<f32>
pub fn apply( &self, mat: ArrayView2<'_, f32>, input: ArrayView1<'_, f32>, ) -> Array1<f32>
Given a model matrix for a function with this FunctionSpaceInfo and a compressed
input vector, computes the compressed vector output which results from
applying the function to the argument.
Sourcepub fn get_data_points(&self, in_data_points: DataPoints) -> DataPoints
pub fn get_data_points(&self, in_data_points: DataPoints) -> DataPoints
Given a DataPoints whose input/output pairs are both in the input/output compressed
spaces, yields a new DataPoints whose inputs have been featurized.
Sourcepub fn apply_schmears(&self, f: &FuncSchmear, x: &Schmear) -> Schmear
pub fn apply_schmears(&self, f: &FuncSchmear, x: &Schmear) -> Schmear
Given a model FuncSchmear for this FunctionSpaceInfo, and a
Schmear over compressed inputs, yields an estimated Schmear
over the result of applying drawn models to drawn inputs.
Trait Implementations§
Source§impl<'a> Clone for FunctionSpaceInfo<'a>
impl<'a> Clone for FunctionSpaceInfo<'a>
Source§fn clone(&self) -> FunctionSpaceInfo<'a>
fn clone(&self) -> FunctionSpaceInfo<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more