Struct fetish_lib::embedding_space::EmbeddingSpace [−][src]
pub struct EmbeddingSpace<'a> { pub type_id: TypeId, pub model_prior_specification: &'a dyn PriorSpecification, pub elaborator: Elaborator<'a>, pub models: HashMap<TermIndex, TermModel<'a>>, pub ctxt: &'a Context, }
Expand description
Collection of all learned information about embeddings for a given type
in and EmbedderState
. This comprises the learned Elaborator
s and
the learned TermModel
s for the type.
Fields
type_id: TypeId
model_prior_specification: &'a dyn PriorSpecification
Expand description
PriorSpecification
to use for any newly-created TermModel
s.
elaborator: Elaborator<'a>
models: HashMap<TermIndex, TermModel<'a>>
ctxt: &'a Context
Implementations
impl<'a> EmbeddingSpace<'a>
[src]
impl<'a> EmbeddingSpace<'a>
[src]pub fn sample(&self, rng: &mut ThreadRng) -> SampledEmbeddingSpace<'a>
[src]
pub fn sample(&self, rng: &mut ThreadRng) -> SampledEmbeddingSpace<'a>
[src]Draws a sample from the distribution defined by this EmbeddingSpace
over collections of TermModel
s of the same type, to yield
a corresponding SampledEmbeddingSpace
containing information about
sampled embeddings.
pub fn schmear_to_prior(
&self,
embedder_state: &EmbedderState<'_>,
elaborator_func_schmear: &FuncSchmear,
func_ptr: TermPointer,
in_schmear: &Schmear
) -> NormalInverseWishart
[src]
&self,
embedder_state: &EmbedderState<'_>,
elaborator_func_schmear: &FuncSchmear,
func_ptr: TermPointer,
in_schmear: &Schmear
) -> NormalInverseWishart
pub fn get_model_mut(&mut self, model_key: TermIndex) -> &mut TermModel<'a>
[src]
pub fn get_model_mut(&mut self, model_key: TermIndex) -> &mut TermModel<'a>
[src]pub fn new(
type_id: TypeId,
model_prior_specification: &'a dyn PriorSpecification,
elaborator_prior_specification: &dyn PriorSpecification,
ctxt: &'a Context
) -> EmbeddingSpace<'a>
[src]
pub fn new(
type_id: TypeId,
model_prior_specification: &'a dyn PriorSpecification,
elaborator_prior_specification: &dyn PriorSpecification,
ctxt: &'a Context
) -> EmbeddingSpace<'a>
[src]Constructs a new embedding space with the given PriorSpecification
s for TermModel
s
and for the Elaborator
, respectively, and occurring within the given Context
.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for EmbeddingSpace<'a>
impl<'a> !Send for EmbeddingSpace<'a>
impl<'a> !Sync for EmbeddingSpace<'a>
impl<'a> Unpin for EmbeddingSpace<'a>
impl<'a> !UnwindSafe for EmbeddingSpace<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,