Approved by: krion@ PR: ports/88711 (related)
calculate precision, recall, F1, accuracy, etc. PR: 60726 Submitted by: Cheng-Lung Sung <clsung@dragon2.net>