(mu_1, sigma_1, mu_2, sigma_2)
return mu, sigma
Product of two Guasssian PDF.
Product of two Guasssian PDF.
Product of two Guasssian PDF .
def product_two_guassian_pdfs(mu_1, sigma_1, mu_2, sigma_2):
  """Product of two Guasssian PDF."""
  # https://ccrma.stanford.edu/~jos/sasp/Product_Two_Gaussian_PDFs.html
  sigma_1_square = tf.square(sigma_1)
  sigma_2_square = tf.square(sigma_2)
  mu = (mu_1 * sigma_2_square + mu_2 * sigma_1_square) / (
      sigma_1_square + sigma_2_square)
  sigma_square = (sigma_1_square * sigma_2_square) / (
      sigma_1_square + sigma_2_square)
  sigma = tf.sqrt(sigma_square)
  return mu, sigma
def product_two_guassian_pdfs ( mu_1 , sigma_1 , mu_2 , sigma_2 ) : # https://ccrma.stanford.edu/~jos/sasp/Product_Two_Gaussian_PDFs.html sigma_1_square = tf . square ( sigma_1 ) sigma_2_square = tf . square ( sigma_2 ) mu = ( mu_1 * sigma_2_square + mu_2 * sigma_1_square ) / ( sigma_1_square + sigma_2_square ) sigma_square = ( sigma_1_square * sigma_2_square ) / ( sigma_1_square + sigma_2_square ) sigma = tf . sqrt ( sigma_square ) return mu , sigma