fn add_first_example(&mut self, x: ObjectValue, y: Label) {
        self.error_count = 0;

        self.priors_count.add_example(y);
        let pred = y;

        if let Some(jx) = self.joint_count.get_mut(&x) {
            jx.add_example(y);
        }

        for yi in &self.test_y {
            let error = if *yi != pred { 1 } else { 0 };
            self.error_count += error;
        }
    }
/// Updates the predictions when the very first example is added,
/// and therefore we don't even have any information on priors.
Updates the predictions when the very first example is added,
and therefore we don't even have any information on priors.
Updates the predictions when the very first example is added and therefore we don ' t even have any information on priors .
fn add_first_example(&mut self, x: ObjectValue, y: Label) {
        self.error_count = 0;
        self.priors_count.add_example(y);
        let pred = y;
        if let Some(jx) = self.joint_count.get_mut(&x) {
            jx.add_example(y);
        }
        for yi in &self.test_y {
            let error = if *yi != pred { 1 } else { 0 };
            self.error_count += error;
        }
    }
fn add_first_example ( & mut self , x : ObjectValue , y : Label ) { self . error_count = 0 ; self . priors_count . add_example ( y ) ; let pred = y ; if let Some ( jx ) = self . joint_count . get_mut ( & x ) { jx . add_example ( y ) ; } for yi in & self . test_y { let error = if * yi != pred { 1 } else { 0 } ; self . error_count += error ; } }
Updates the predictions when the very first example is added,
and therefore we don't even have any information on priors.
Updates the predictions when the very first example is added and therefore we don ' t even have any information on priors .
&mut self
x
ObjectValue
y
Label
&mut self
x
ObjectValue
y
Label