question: protected double currentScoreFunction ( ) { double score = 0. ; for ( int i = 0 ; i < this . values [ this . currentVar1 ] . length ; i ++ ) { for ( int j = 0 ; j < this . values [ this . currentVar2 ] . length ; j ++ ) { score -= this . currentCounts [ this . currentVar1 ] [ this . currentVar2 ] [ i ] [ j ] * Math . log ( this . currentPi [ i ] [ j ] ) ; } } return score ; }
target:  Function to be minimized: -loglikelihood. It *is* assumed that computeFiBuffer and computeCurrentPi were called before this method.