The error occurs because your command substitution returns nothing effectively making your test look like:
if [ -eq 1 ]
A common way to fix this is to append some constant on both sides of the equation, so that no operand becomes empty at any time:
if [ x`packages/TinySVM-0.09/bin/svm_learn 2>&1| grep TinySVM | wc -l | cut -c0-7 | sed 's/^ *//g'` = x1 ]
Note that = is being used as we are now comparing strings.