private void updatePseudoCounts(double[] m,double[] n,double rho){
  assert m.length == n.length;
  for (int i=0; i < m.length; ++i) {
    pseudoM[i]=decay * pseudoM[i] + m[i];
    pseudoN[i]=decay * pseudoN[i] + n[i];
  }
  pseudoRho=(decay * pseudoRho) + rho;
  if (DEBUG) {
synchronized (System.err) {
      System.err.println("M: " + Arrays.toString(m));
      System.err.println("M-hat: " + Arrays.toString(pseudoM));
      System.err.println("N: " + Arrays.toString(n));
      System.err.println("N-hat: " + Arrays.toString(pseudoN));
      System.err.println("Rho-hat: " + pseudoRho);
      System.err.println();
    }
  }
}

private void updatePseudoCounts ( double [ ] m , double [ ] n , double rho ) { assert m . length == n . length ; for ( int i = 0 ; i < m . length ; ++ i ) { pseudoM [ i ] = decay * pseudoM [ i ] + m [ i ] ; pseudoN [ i ] = decay * pseudoN [ i ] + n [ i ] ; } pseudoRho = ( decay * pseudoRho ) + rho ; if ( DEBUG ) { synchronized ( System . err ) { System . err . println ( "M: " + Arrays . toString ( m ) ) ; System . err . println ( "M-hat: " + Arrays . toString ( pseudoM ) ) ; System . err . println ( "N: " + Arrays . toString ( n ) ) ; System . err . println ( "N-hat: " + Arrays . toString ( pseudoN ) ) ; System . err . println ( "Rho-hat: " + pseudoRho ) ; System . err . println ( ) ; } } }
update the pseudo counts according to an exponentially weighted moving average . chiang ( 2008 ) calls this ewma , but chiang ( 2012 ) calls it " exponential decay . " those don ' t seem to be the same thing ?
