pub(crate) fn observe(&mut self, feature: u32) {
        match (self.dictionary, &mut self.variant) {
            (
                EncodingDictionaryVariant::TargetEncode(dictionary),
                EncoderVariant::TargetEncode(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::SubmodularExpansion(dictionary),
                EncoderVariant::SubmodularExpansion(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::SubmodularExpansionNoSplit(dictionary),
                EncoderVariant::SubmodularExpansionNoSplit(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::FrequencyTruncation(dictionary),
                EncoderVariant::FrequencyTruncation(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::FieldAwareFrequencyTruncation(dictionary),
                EncoderVariant::FieldAwareFrequencyTruncation(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::SubmodularSort(dictionary),
                EncoderVariant::SubmodularSort(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::NoSplitSubmodularSort(dictionary),
                EncoderVariant::NoSplitSubmodularSort(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::Identity(dictionary),
                EncoderVariant::Identity(ref mut variant),
            ) => variant.observe(dictionary, feature),
            _ => panic!("mismatched dictionary/encoder variants"),
        }
    }
// POTENTIAL ALGORITHMIC IMPROVEMENT: for leave-one-out style encoders we'll need
// an optional observe_target() which should be called before any observe() during
// training.
POTENTIAL ALGORITHMIC IMPROVEMENT: for leave-one-out style encoders we'll need
an optional observe_target() which should be called before any observe() during
training.
POTENTIAL ALGORITHMIC IMPROVEMENT : for leave - one - out style encoders we ' ll need an optional observe_target () which should be called before any observe () during training .
pub(crate) fn observe(&mut self, feature: u32) {
        match (self.dictionary, &mut self.variant) {
            (
                EncodingDictionaryVariant::TargetEncode(dictionary),
                EncoderVariant::TargetEncode(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::SubmodularExpansion(dictionary),
                EncoderVariant::SubmodularExpansion(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::SubmodularExpansionNoSplit(dictionary),
                EncoderVariant::SubmodularExpansionNoSplit(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::FrequencyTruncation(dictionary),
                EncoderVariant::FrequencyTruncation(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::FieldAwareFrequencyTruncation(dictionary),
                EncoderVariant::FieldAwareFrequencyTruncation(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::SubmodularSort(dictionary),
                EncoderVariant::SubmodularSort(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::NoSplitSubmodularSort(dictionary),
                EncoderVariant::NoSplitSubmodularSort(ref mut variant),
            ) => variant.observe(dictionary, feature),
            (
                EncodingDictionaryVariant::Identity(dictionary),
                EncoderVariant::Identity(ref mut variant),
            ) => variant.observe(dictionary, feature),
            _ => panic!("mismatched dictionary/encoder variants"),
        }
    }
pub ( crate ) fn observe ( & mut self , feature : u32 ) { match ( self . dictionary , & mut self . variant ) { ( EncodingDictionaryVariant :: TargetEncode ( dictionary ) , EncoderVariant :: TargetEncode ( ref mut variant ) , ) => variant . observe ( dictionary , feature ) , ( EncodingDictionaryVariant :: SubmodularExpansion ( dictionary ) , EncoderVariant :: SubmodularExpansion ( ref mut variant ) , ) => variant . observe ( dictionary , feature ) , ( EncodingDictionaryVariant :: SubmodularExpansionNoSplit ( dictionary ) , EncoderVariant :: SubmodularExpansionNoSplit ( ref mut variant ) , ) => variant . observe ( dictionary , feature ) , ( EncodingDictionaryVariant :: FrequencyTruncation ( dictionary ) , EncoderVariant :: FrequencyTruncation ( ref mut variant ) , ) => variant . observe ( dictionary , feature ) , ( EncodingDictionaryVariant :: FieldAwareFrequencyTruncation ( dictionary ) , EncoderVariant :: FieldAwareFrequencyTruncation ( ref mut variant ) , ) => variant . observe ( dictionary , feature ) , ( EncodingDictionaryVariant :: SubmodularSort ( dictionary ) , EncoderVariant :: SubmodularSort ( ref mut variant ) , ) => variant . observe ( dictionary , feature ) , ( EncodingDictionaryVariant :: NoSplitSubmodularSort ( dictionary ) , EncoderVariant :: NoSplitSubmodularSort ( ref mut variant ) , ) => variant . observe ( dictionary , feature ) , ( EncodingDictionaryVariant :: Identity ( dictionary ) , EncoderVariant :: Identity ( ref mut variant ) , ) => variant . observe ( dictionary , feature ) , _ => panic ! ( " " ) , } }
POTENTIAL ALGORITHMIC IMPROVEMENT: for leave-one-out style encoders we'll need
an optional observe_target() which should be called before any observe() during
training.
POTENTIAL ALGORITHMIC IMPROVEMENT : for leave - one - out style encoders we ' ll need an optional observe_target () which should be called before any observe () during training .
&mut self
feature
u32
&mut self
feature
u32