@ Override public void merge ( Evaluation other ) { if ( other == null ) return ; truePositives . incrementAll ( other . truePositives ) ; falsePositives . incrementAll ( other . falsePositives ) ; trueNegatives . incrementAll ( other . trueNegatives ) ; falseNegatives . incrementAll ( other . falseNegatives ) ; if ( confusion == null ) { if ( other . confusion != null ) confusion = new ConfusionMatrix <> ( other . confusion ) ; } else { if ( other . confusion != null ) confusion ( ) . add ( other . confusion ) ; } numRowCounter += other . numRowCounter ; if ( labelsList . isEmpty ( ) ) labelsList . addAll ( other . labelsList ) ; if ( topN != other . topN ) { log . warn ( "Different topN values ({} vs {}) detected during Evaluation merging. Top N accuracy may not be accurate." , topN , other . topN ) ; } this . topNCorrectCount += other . topNCorrectCount ; this . topNTotalCount += other . topNTotalCount ; }
Merge the other evaluation object into this one . The result is that this Evaluation instance contains the counts etc from both