private void eval ( List < Tuple > training , List < Tuple > testing , int nfold ) { classifier . train ( training ) ; for ( Tuple tuple : testing ) { String actual = classifier . predict ( tuple ) . entrySet ( ) . stream ( ) . max ( ( e1 , e2 ) -> e1 . getValue ( ) . compareTo ( e2 . getValue ( ) ) ) . map ( Map . Entry :: getKey ) . orElse ( StringUtils . EMPTY ) ; updateScore ( tuple , actual , nfold ) ; } }
This is for one fold .