pub struct CategoricalEncoder<E, V, M>where
V: Clone + Eq + Hash,
M: Number<V>,{ /* private fields */ }Expand description
An encoder wrapper that encodes/decodes to a categorical label.
Implementations§
source§impl<D, M> CategoricalEncoder<D, D::Encoding, M>where
D: SentenceDecoder,
D::Encoding: Clone + Eq + Hash + ToOwned,
M: Number<D::Encoding>,
impl<D, M> CategoricalEncoder<D, D::Encoding, M>where
D: SentenceDecoder,
D::Encoding: Clone + Eq + Hash + ToOwned,
M: Number<D::Encoding>,
sourcepub fn decode_without_inner<S>(
&self,
labels: &[S]
) -> Vec<Vec<EncodingProb<D::Encoding>>>where
S: AsRef<[EncodingProb<usize>]>,
pub fn decode_without_inner<S>(
&self,
labels: &[S]
) -> Vec<Vec<EncodingProb<D::Encoding>>>where
S: AsRef<[EncodingProb<usize>]>,
Decode without applying the inner decoder.
Trait Implementations§
source§impl<'de, E, V, M> Deserialize<'de> for CategoricalEncoder<E, V, M>where
V: Clone + Eq + Hash,
M: Number<V>,
E: Deserialize<'de>,
M: Deserialize<'de>,
impl<'de, E, V, M> Deserialize<'de> for CategoricalEncoder<E, V, M>where
V: Clone + Eq + Hash,
M: Number<V>,
E: Deserialize<'de>,
M: Deserialize<'de>,
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