@ Override public double getValueAt ( final int at ) { if ( userDcgAtCutoff . containsKey ( at ) && userIdcgAtCutoff . containsKey ( at ) ) { int n = 0 ; double ndcg = 0.0 ; for ( U u : userIdcgAtCutoff . get ( at ) . keySet ( ) ) { double udcg = getValueAt ( u , at ) ; if ( ! Double . isNaN ( udcg ) ) { ndcg += udcg ; n ++ ; } } if ( n == 0 ) { ndcg = 0.0 ; } else { ndcg = ndcg / n ; } return ndcg ; } return Double . NaN ; }
Method to return the NDCG value at a particular cutoff level .