pub struct DistMultScoring {
pub entity_embeds: Array2<f64>,
pub relation_embeds: Array2<f64>,
}Expand description
DistMult bilinear scoring model (Yang et al. 2015).
Score function:
score(h, r, t) = Σ_k h_k · r_k · t_kThis is a symmetric scoring function: score(h,r,t) = score(t,r,h).
Fields§
§entity_embeds: Array2<f64>Entity embedding table (n_entities, dim)
relation_embeds: Array2<f64>Relation embedding table (n_relations, dim)
Implementations§
Trait Implementations§
Source§impl Clone for DistMultScoring
impl Clone for DistMultScoring
Source§fn clone(&self) -> DistMultScoring
fn clone(&self) -> DistMultScoring
Returns a duplicate of the value. Read more
1.0.0 · 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 DistMultScoring
impl Debug for DistMultScoring
Auto Trait Implementations§
impl Freeze for DistMultScoring
impl RefUnwindSafe for DistMultScoring
impl Send for DistMultScoring
impl Sync for DistMultScoring
impl Unpin for DistMultScoring
impl UnsafeUnpin for DistMultScoring
impl UnwindSafe for DistMultScoring
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more