Browse files

TP and FN flipped, correcting

  • Loading branch information...
1 parent 9a19484 commit 4067374eecf51f2be806f20f63d3bf525c76e3ae @ninjin committed Apr 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 test.sh
View
4 test.sh
@@ -61,8 +61,8 @@ results() {
PREDS=$2
#echo ${GOLD} ${PREDS}
TP=`grep $'^2\t2$' <(paste <(cut -f 1 -d ' ' ${GOLD}) ${PREDS}) | wc -l`
- FP=`grep $'^2\t1$' <(paste <(cut -f 1 -d ' ' ${GOLD}) ${PREDS}) | wc -l`
- FN=`grep $'^1\t2$' <(paste <(cut -f 1 -d ' ' ${GOLD}) ${PREDS}) | wc -l`
+ FP=`grep $'^1\t2$' <(paste <(cut -f 1 -d ' ' ${GOLD}) ${PREDS}) | wc -l`
+ FN=`grep $'^2\t1$' <(paste <(cut -f 1 -d ' ' ${GOLD}) ${PREDS}) | wc -l`
P=`echo "scale=3; if(${TP} + ${FP} != 0) { ${TP} / (${TP} + ${FP}) } else { 0 }" | bc`
R=`echo "scale=3; if(${TP} + ${FN} != 0) { ${TP} / (${TP} + ${FN}) } else { 0 }" | bc`
F=`echo "scale=3; if(${P} + ${R} != 0) { (2 * ${P} * ${R}) / (${P} + ${R}) } else { 0 }" | bc`

0 comments on commit 4067374

Please sign in to comment.