BayesUpdate_Gaussian.py
def _update(self, prior, observation):
    """
    Peforms a single update and returns the posterior
    Args:
      prior: the current probability distribution of the target variable
    """
    
    #Now update the mean incrementally 
    #math explanation here: http://datagenetics.com/blog/november22017/index.html
    previous_mean = self.mean
    self.mean += (1/n) * (observation + n*previous_mean - previous_mean)

    #Now update the variance incrementally
    previous_variance += self.variance
    self.variance += previous_variance + (observation - previous_mean)*(observation - self.mean)
    
    likelihood = self._likelihood(mean,variance)
    posterior = (likelihood * prior) / sum(posterior)
    return posterior

    Peforms a single update and returns the posterior
    Args:
      prior: the current probability distribution of the target variable
    
Peforms a single update and returns the posterior
Peforms a single update and returns the posterior
def _update(self, prior, observation):
    previous_mean = self.mean
    self.mean += (1/n) * (observation + n*previous_mean - previous_mean)
    previous_variance += self.variance
    self.variance += previous_variance + (observation - previous_mean)*(observation - self.mean)
    likelihood = self._likelihood(mean,variance)
    posterior = (likelihood * prior) / sum(posterior)
    return posterior
def _update ( self , prior , observation ) : previous_mean = self . mean self . mean += ( 1 / n ) * ( observation + n * previous_mean - previous_mean ) previous_variance += self . variance self . variance += previous_variance + ( observation - previous_mean ) * ( observation - self . mean ) likelihood = self . _likelihood ( mean , variance ) posterior = ( likelihood * prior ) / sum ( posterior ) return posterior
Peforms a single update and returns the posterior
Peforms a single update and returns the posterior
"""
    Peforms a single update and returns the posterior
    Args:
      prior: the current probability distribution of the target variable
    """ #Now update the mean incrementally  #math explanation here: http://datagenetics.com/blog/november22017/index.html #Now update the variance incrementally
self
prior
the current probability distribution of the target variable
the current probability distribution of the target variable
observation