pub struct RuleSimilarityKernel { /* private fields */ }Expand description
Logic-based similarity kernel.
Measures similarity based on which logical rules are satisfied by each input.
§Formula
K(x, y) = Σ_r w_r * agreement(x, y, r)Where:
rranges over logical rulesw_ris the weight for rule ragreement(x, y, r)measures if x and y agree on rule r:- Both satisfy: satisfied_weight
- Both violate: violated_weight
- Disagree: mixed_weight
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuleSimilarityKernel
impl RefUnwindSafe for RuleSimilarityKernel
impl Send for RuleSimilarityKernel
impl Sync for RuleSimilarityKernel
impl Unpin for RuleSimilarityKernel
impl UnwindSafe for RuleSimilarityKernel
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> 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