pub struct CategoricalEncoder<E, V, M>{ /* private fields */ }
Expand description
An encoder wrapper that encodes/decodes to a categorical label.
Implementations§
Source§impl<E, V, M> CategoricalEncoder<E, V, M>
impl<E, V, M> CategoricalEncoder<E, V, M>
Source§impl<D, M> CategoricalEncoder<D, D::Encoding, M>
impl<D, M> CategoricalEncoder<D, D::Encoding, M>
Sourcepub fn decode_without_inner<S>(
&self,
labels: &[S],
) -> Vec<Vec<EncodingProb<D::Encoding>>>
pub fn decode_without_inner<S>( &self, labels: &[S], ) -> Vec<Vec<EncodingProb<D::Encoding>>>
Decode without applying the inner decoder.
Trait Implementations§
Source§impl<'de, E, V, M> Deserialize<'de> for CategoricalEncoder<E, V, M>
impl<'de, E, V, M> Deserialize<'de> for CategoricalEncoder<E, V, M>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<D, M> SentenceDecoder for CategoricalEncoder<D, D::Encoding, M>
impl<D, M> SentenceDecoder for CategoricalEncoder<D, D::Encoding, M>
Source§impl<E, M> SentenceEncoder for CategoricalEncoder<E, E::Encoding, M>
impl<E, M> SentenceEncoder for CategoricalEncoder<E, E::Encoding, M>
Auto Trait Implementations§
impl<E, V, M> Freeze for CategoricalEncoder<E, V, M>
impl<E, V, M> RefUnwindSafe for CategoricalEncoder<E, V, M>
impl<E, V, M> Send for CategoricalEncoder<E, V, M>
impl<E, V, M> Sync for CategoricalEncoder<E, V, M>
impl<E, V, M> Unpin for CategoricalEncoder<E, V, M>
impl<E, V, M> UnwindSafe for CategoricalEncoder<E, V, M>
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