private void prepareGammaTheta ( Vec gamma_i , Vec eLogTheta_i , Vec expLogTheta_i , Random rand ) { final double lambdaInv = ( W * K ) / ( D * 100.0 ) ; for ( int j = 0 ; j < gamma_i . length ( ) ; j ++ ) gamma_i . set ( j , sampleExpoDist ( lambdaInv , rand . nextDouble ( ) ) + eta ) ; expandPsiMinusPsiSum ( gamma_i , gamma_i . sum ( ) , eLogTheta_i ) ; for ( int j = 0 ; j < eLogTheta_i . length ( ) ; j ++ ) expLogTheta_i . set ( j , FastMath . exp ( eLogTheta_i . get ( j ) ) ) ; }
Prepares gamma and the associated theta expectations are initialized so that the iterative updates to them can begin .